diff --git a/src/navigation/jsreference.js b/src/navigation/jsreference.js index 15ed73a72..12321f8bb 100644 --- a/src/navigation/jsreference.js +++ b/src/navigation/jsreference.js @@ -18,288 +18,344 @@ export const navigation = [ href: "/docs/golem-js/reference/classes/activity_activity.Activity" }, { - title: "Result", - href: "/docs/golem-js/reference/classes/activity_results.Result" + title: "ActivityModuleImpl", + href: "/docs/golem-js/reference/classes/activity_activity_module.ActivityModuleImpl" }, { - title: "AgreementCandidate", - href: "/docs/golem-js/reference/classes/agreement_service.AgreementCandidate" + title: "ExeScriptExecutor", + href: "/docs/golem-js/reference/classes/activity_exe_script_executor.ExeScriptExecutor" }, { - title: "GolemAbortError", - href: "/docs/golem-js/reference/classes/error_golem_error.GolemAbortError" + title: "Batch", + href: "/docs/golem-js/reference/classes/activity_exe_unit_batch.Batch" }, { - title: "GolemConfigError", - href: "/docs/golem-js/reference/classes/error_golem_error.GolemConfigError" + title: "GolemWorkError", + href: "/docs/golem-js/reference/classes/activity_exe_unit_error.GolemWorkError" }, { - title: "GolemError", - href: "/docs/golem-js/reference/classes/error_golem_error.GolemError" + title: "ExeUnit", + href: "/docs/golem-js/reference/classes/activity_exe_unit_exe_unit.ExeUnit" }, { - title: "GolemInternalError", - href: "/docs/golem-js/reference/classes/error_golem_error.GolemInternalError" + title: "RemoteProcess", + href: "/docs/golem-js/reference/classes/activity_exe_unit_process.RemoteProcess" }, { - title: "GolemModuleError", - href: "/docs/golem-js/reference/classes/error_golem_error.GolemModuleError" + title: "Result", + href: "/docs/golem-js/reference/classes/activity_results.Result" }, { - title: "GolemPlatformError", - href: "/docs/golem-js/reference/classes/error_golem_error.GolemPlatformError" + title: "Command", + href: "/docs/golem-js/reference/classes/activity_script_command.Command" }, { - title: "GolemTimeoutError", - href: "/docs/golem-js/reference/classes/error_golem_error.GolemTimeoutError" + title: "Deploy", + href: "/docs/golem-js/reference/classes/activity_script_command.Deploy" }, { - title: "GolemUserError", - href: "/docs/golem-js/reference/classes/error_golem_error.GolemUserError" + title: "DownloadData", + href: "/docs/golem-js/reference/classes/activity_script_command.DownloadData" }, { - title: "ActivityCreated", - href: "/docs/golem-js/reference/classes/events_events.ActivityCreated" + title: "DownloadFile", + href: "/docs/golem-js/reference/classes/activity_script_command.DownloadFile" }, { - title: "ActivityDestroyed", - href: "/docs/golem-js/reference/classes/events_events.ActivityDestroyed" + title: "Run", + href: "/docs/golem-js/reference/classes/activity_script_command.Run" }, { - title: "ActivityStateChanged", - href: "/docs/golem-js/reference/classes/events_events.ActivityStateChanged" + title: "Start", + href: "/docs/golem-js/reference/classes/activity_script_command.Start" }, { - title: "AgreementConfirmed", - href: "/docs/golem-js/reference/classes/events_events.AgreementConfirmed" + title: "Terminate", + href: "/docs/golem-js/reference/classes/activity_script_command.Terminate" }, { - title: "AgreementCreated", - href: "/docs/golem-js/reference/classes/events_events.AgreementCreated" + title: "Transfer", + href: "/docs/golem-js/reference/classes/activity_script_command.Transfer" }, { - title: "AgreementRejected", - href: "/docs/golem-js/reference/classes/events_events.AgreementRejected" + title: "UploadData", + href: "/docs/golem-js/reference/classes/activity_script_command.UploadData" }, { - title: "AgreementTerminated", - href: "/docs/golem-js/reference/classes/events_events.AgreementTerminated" + title: "UploadFile", + href: "/docs/golem-js/reference/classes/activity_script_command.UploadFile" }, { - title: "AllocationCreated", - href: "/docs/golem-js/reference/classes/events_events.AllocationCreated" + title: "Script", + href: "/docs/golem-js/reference/classes/activity_script_script.Script" }, { - title: "BaseEvent", - href: "/docs/golem-js/reference/classes/events_events.BaseEvent" + title: "GolemDeploymentBuilder", + href: "/docs/golem-js/reference/classes/experimental_deployment_builder.GolemDeploymentBuilder" }, { - title: "CollectFailed", - href: "/docs/golem-js/reference/classes/events_events.CollectFailed" + title: "Deployment", + href: "/docs/golem-js/reference/classes/experimental_deployment_deployment.Deployment" }, { - title: "ComputationFailed", - href: "/docs/golem-js/reference/classes/events_events.ComputationFailed" + title: "Job", + href: "/docs/golem-js/reference/classes/experimental_job_job.Job" }, { - title: "ComputationFinished", - href: "/docs/golem-js/reference/classes/events_events.ComputationFinished" + title: "JobManager", + href: "/docs/golem-js/reference/classes/experimental_job_job_manager.JobManager" }, { - title: "ComputationStarted", - href: "/docs/golem-js/reference/classes/events_events.ComputationStarted" + title: "GolemReputationError", + href: "/docs/golem-js/reference/classes/experimental_reputation_error.GolemReputationError" }, { - title: "DebitNoteAccepted", - href: "/docs/golem-js/reference/classes/events_events.DebitNoteAccepted" + title: "ReputationSystem", + href: "/docs/golem-js/reference/classes/experimental_reputation_system.ReputationSystem" }, { - title: "DebitNoteReceived", - href: "/docs/golem-js/reference/classes/events_events.DebitNoteReceived" + title: "GolemNetwork", + href: "/docs/golem-js/reference/classes/golem_network_golem_network.GolemNetwork" }, { - title: "DemandFailed", - href: "/docs/golem-js/reference/classes/events_events.DemandFailed" + title: "Agreement", + href: "/docs/golem-js/reference/classes/market_agreement_agreement.Agreement" }, { - title: "DemandSubscribed", - href: "/docs/golem-js/reference/classes/events_events.DemandSubscribed" + title: "Demand", + href: "/docs/golem-js/reference/classes/market_demand_demand.Demand" }, { - title: "DemandUnsubscribed", - href: "/docs/golem-js/reference/classes/events_events.DemandUnsubscribed" + title: "DemandSpecification", + href: "/docs/golem-js/reference/classes/market_demand_demand.DemandSpecification" }, { - title: "InvoiceReceived", - href: "/docs/golem-js/reference/classes/events_events.InvoiceReceived" + title: "DemandBodyBuilder", + href: "/docs/golem-js/reference/classes/market_demand_demand_body_builder.DemandBodyBuilder" }, { - title: "PackageCreated", - href: "/docs/golem-js/reference/classes/events_events.PackageCreated" + title: "BaseConfig", + href: "/docs/golem-js/reference/classes/market_demand_directors_base_config.BaseConfig" }, { - title: "PaymentAccepted", - href: "/docs/golem-js/reference/classes/events_events.PaymentAccepted" + title: "BasicDemandDirector", + href: "/docs/golem-js/reference/classes/market_demand_directors_basic_demand_director.BasicDemandDirector" }, { - title: "PaymentFailed", - href: "/docs/golem-js/reference/classes/events_events.PaymentFailed" + title: "BasicDemandDirectorConfig", + href: "/docs/golem-js/reference/classes/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig" }, { - title: "ProposalConfirmed", - href: "/docs/golem-js/reference/classes/events_events.ProposalConfirmed" + title: "PaymentDemandDirector", + href: "/docs/golem-js/reference/classes/market_demand_directors_payment_demand_director.PaymentDemandDirector" }, { - title: "ProposalFailed", - href: "/docs/golem-js/reference/classes/events_events.ProposalFailed" + title: "PaymentDemandDirectorConfig", + href: "/docs/golem-js/reference/classes/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig" }, { - title: "ProposalReceived", - href: "/docs/golem-js/reference/classes/events_events.ProposalReceived" + title: "WorkloadDemandDirector", + href: "/docs/golem-js/reference/classes/market_demand_directors_workload_demand_director.WorkloadDemandDirector" }, { - title: "ProposalRejected", - href: "/docs/golem-js/reference/classes/events_events.ProposalRejected" + title: "WorkloadDemandDirectorConfig", + href: "/docs/golem-js/reference/classes/market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig" }, { - title: "ProposalResponded", - href: "/docs/golem-js/reference/classes/events_events.ProposalResponded" + title: "DraftOfferProposalPool", + href: "/docs/golem-js/reference/classes/market_draft_offer_proposal_pool.DraftOfferProposalPool" }, { - title: "ScriptExecuted", - href: "/docs/golem-js/reference/classes/events_events.ScriptExecuted" + title: "GolemMarketError", + href: "/docs/golem-js/reference/classes/market_error.GolemMarketError" }, { - title: "ScriptSent", - href: "/docs/golem-js/reference/classes/events_events.ScriptSent" + title: "MarketModuleImpl", + href: "/docs/golem-js/reference/classes/market_market_module.MarketModuleImpl" }, { - title: "TaskFinished", - href: "/docs/golem-js/reference/classes/events_events.TaskFinished" + title: "MarketProposal", + href: "/docs/golem-js/reference/classes/market_proposal_market_proposal.MarketProposal" }, { - title: "TaskRedone", - href: "/docs/golem-js/reference/classes/events_events.TaskRedone" + title: "OfferCounterProposal", + href: "/docs/golem-js/reference/classes/market_proposal_offer_counter_proposal.OfferCounterProposal" }, { - title: "TaskRejected", - href: "/docs/golem-js/reference/classes/events_events.TaskRejected" + title: "OfferProposal", + href: "/docs/golem-js/reference/classes/market_proposal_offer_proposal.OfferProposal" }, { - title: "TaskStarted", - href: "/docs/golem-js/reference/classes/events_events.TaskStarted" + title: "ProposalsBatch", + href: "/docs/golem-js/reference/classes/market_proposal_proposals_batch.ProposalsBatch" }, { - title: "TaskExecutor", - href: "/docs/golem-js/reference/classes/executor_executor.TaskExecutor" + title: "GolemNetworkError", + href: "/docs/golem-js/reference/classes/network_error.GolemNetworkError" }, { - title: "GolemNetwork", - href: "/docs/golem-js/reference/classes/golem_network_golem_network.GolemNetwork" + title: "Network", + href: "/docs/golem-js/reference/classes/network_network.Network" }, { - title: "Job", - href: "/docs/golem-js/reference/classes/job_job.Job" + title: "NetworkModuleImpl", + href: "/docs/golem-js/reference/classes/network_network_module.NetworkModuleImpl" }, { - title: "GolemMarketError", - href: "/docs/golem-js/reference/classes/market_error.GolemMarketError" + title: "NetworkNode", + href: "/docs/golem-js/reference/classes/network_node.NetworkNode" }, { - title: "Proposal", - href: "/docs/golem-js/reference/classes/market_proposal.Proposal" + title: "TcpProxy", + href: "/docs/golem-js/reference/classes/network_tcpProxy.TcpProxy" }, { - title: "ProposalsBatch", - href: "/docs/golem-js/reference/classes/market_proposals_batch.ProposalsBatch" + title: "BaseDocument", + href: "/docs/golem-js/reference/classes/payment_BaseDocument.BaseDocument" }, { - title: "GolemNetworkError", - href: "/docs/golem-js/reference/classes/network_error.GolemNetworkError" + title: "InvoiceProcessor", + href: "/docs/golem-js/reference/classes/payment_InvoiceProcessor.InvoiceProcessor" }, { - title: "NetworkNode", - href: "/docs/golem-js/reference/classes/network_node.NetworkNode" + title: "PayerDetails", + href: "/docs/golem-js/reference/classes/payment_PayerDetails.PayerDetails" }, { - title: "Package", - href: "/docs/golem-js/reference/classes/package_package.Package" + title: "AgreementPaymentProcess", + href: "/docs/golem-js/reference/classes/payment_agreement_payment_process.AgreementPaymentProcess" }, { - title: "InvoiceProcessor", - href: "/docs/golem-js/reference/classes/payment_InvoiceProcessor.InvoiceProcessor" + title: "Allocation", + href: "/docs/golem-js/reference/classes/payment_allocation.Allocation" }, { - title: "AgreementPaymentProcess", - href: "/docs/golem-js/reference/classes/payment_agreement_payment_process.AgreementPaymentProcess" + title: "DebitNote", + href: "/docs/golem-js/reference/classes/payment_debit_note.DebitNote" }, { title: "GolemPaymentError", href: "/docs/golem-js/reference/classes/payment_error.GolemPaymentError" }, { - title: "Payments", - href: "/docs/golem-js/reference/classes/payment_payments.Payments" + title: "Invoice", + href: "/docs/golem-js/reference/classes/payment_invoice.Invoice" }, { - title: "DownloadData", - href: "/docs/golem-js/reference/classes/script_command.DownloadData" + title: "PaymentModuleImpl", + href: "/docs/golem-js/reference/classes/payment_payment_module.PaymentModuleImpl" }, { - title: "Terminate", - href: "/docs/golem-js/reference/classes/script_command.Terminate" + title: "RentalModuleImpl", + href: "/docs/golem-js/reference/classes/resource_rental_rental_module.RentalModuleImpl" }, { - title: "UploadData", - href: "/docs/golem-js/reference/classes/script_command.UploadData" + title: "ResourceRental", + href: "/docs/golem-js/reference/classes/resource_rental_resource_rental.ResourceRental" + }, +{ + title: "ResourceRentalPool", + href: "/docs/golem-js/reference/classes/resource_rental_resource_rental_pool.ResourceRentalPool" + }, +{ + title: "CacheService", + href: "/docs/golem-js/reference/classes/shared_cache_CacheService.CacheService" + }, +{ + title: "GolemAbortError", + href: "/docs/golem-js/reference/classes/shared_error_golem_error.GolemAbortError" + }, +{ + title: "GolemConfigError", + href: "/docs/golem-js/reference/classes/shared_error_golem_error.GolemConfigError" + }, +{ + title: "GolemError", + href: "/docs/golem-js/reference/classes/shared_error_golem_error.GolemError" + }, +{ + title: "GolemInternalError", + href: "/docs/golem-js/reference/classes/shared_error_golem_error.GolemInternalError" + }, +{ + title: "GolemModuleError", + href: "/docs/golem-js/reference/classes/shared_error_golem_error.GolemModuleError" + }, +{ + title: "GolemPlatformError", + href: "/docs/golem-js/reference/classes/shared_error_golem_error.GolemPlatformError" + }, +{ + title: "GolemTimeoutError", + href: "/docs/golem-js/reference/classes/shared_error_golem_error.GolemTimeoutError" + }, +{ + title: "GolemUserError", + href: "/docs/golem-js/reference/classes/shared_error_golem_error.GolemUserError" + }, +{ + title: "GftpServerAdapter", + href: "/docs/golem-js/reference/classes/shared_storage_GftpServerAdapter.GftpServerAdapter" }, { title: "GftpStorageProvider", - href: "/docs/golem-js/reference/classes/storage_gftp.GftpStorageProvider" + href: "/docs/golem-js/reference/classes/shared_storage_gftp.GftpStorageProvider" }, { title: "NullStorageProvider", - href: "/docs/golem-js/reference/classes/storage_null.NullStorageProvider" + href: "/docs/golem-js/reference/classes/shared_storage_null.NullStorageProvider" }, { title: "WebSocketBrowserStorageProvider", - href: "/docs/golem-js/reference/classes/storage_ws_browser.WebSocketBrowserStorageProvider" + href: "/docs/golem-js/reference/classes/shared_storage_ws_browser.WebSocketBrowserStorageProvider" }, { - title: "Batch", - href: "/docs/golem-js/reference/classes/task_batch.Batch" + title: "ActivityApiAdapter", + href: "/docs/golem-js/reference/classes/shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter" }, { - title: "GolemWorkError", - href: "/docs/golem-js/reference/classes/task_error.GolemWorkError" + title: "MarketApiAdapter", + href: "/docs/golem-js/reference/classes/shared_yagna_adapters_market_api_adapter.MarketApiAdapter" }, { - title: "RemoteProcess", - href: "/docs/golem-js/reference/classes/task_process.RemoteProcess" + title: "NetworkApiAdapter", + href: "/docs/golem-js/reference/classes/shared_yagna_adapters_network_api_adapter.NetworkApiAdapter" }, { - title: "Task", - href: "/docs/golem-js/reference/classes/task_task.Task" + title: "PaymentApiAdapter", + href: "/docs/golem-js/reference/classes/shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter" }, { - title: "WorkContext", - href: "/docs/golem-js/reference/classes/task_work.WorkContext" + title: "EventReader", + href: "/docs/golem-js/reference/classes/shared_yagna_event_reader.EventReader" }, { - title: "RequestorApi", - href: "/docs/golem-js/reference/classes/utils_yagna_activity.RequestorApi" + title: "ActivityRepository", + href: "/docs/golem-js/reference/classes/shared_yagna_repository_activity_repository.ActivityRepository" }, { - title: "RequestorApi", - href: "/docs/golem-js/reference/classes/utils_yagna_gsb.RequestorApi" + title: "AgreementRepository", + href: "/docs/golem-js/reference/classes/shared_yagna_repository_agreement_repository.AgreementRepository" }, { - title: "RequestorApi", - href: "/docs/golem-js/reference/classes/utils_yagna_identity.RequestorApi" + title: "DebitNoteRepository", + href: "/docs/golem-js/reference/classes/shared_yagna_repository_debit_note_repository.DebitNoteRepository" }, { - title: "Yagna", - href: "/docs/golem-js/reference/classes/utils_yagna_yagna.Yagna" + title: "DemandRepository", + href: "/docs/golem-js/reference/classes/shared_yagna_repository_demand_repository.DemandRepository" + }, +{ + title: "InvoiceRepository", + href: "/docs/golem-js/reference/classes/shared_yagna_repository_invoice_repository.InvoiceRepository" + }, +{ + title: "ProposalRepository", + href: "/docs/golem-js/reference/classes/shared_yagna_repository_proposal_repository.ProposalRepository" + }, +{ + title: "YagnaApi", + href: "/docs/golem-js/reference/classes/shared_yagna_yagnaApi.YagnaApi" } ] }, @@ -310,6 +366,26 @@ export const navigation = [ title: "ActivityStateEnum", href: "/docs/golem-js/reference/enums/activity_activity.ActivityStateEnum" }, +{ + title: "WorkErrorCode", + href: "/docs/golem-js/reference/enums/activity_exe_unit_error.WorkErrorCode" + }, +{ + title: "DeploymentState", + href: "/docs/golem-js/reference/enums/experimental_deployment_deployment.DeploymentState" + }, +{ + title: "JobState", + href: "/docs/golem-js/reference/enums/experimental_job_job.JobState" + }, +{ + title: "ComparisonOperator", + href: "/docs/golem-js/reference/enums/market_demand_demand_body_builder.ComparisonOperator" + }, +{ + title: "PackageFormat", + href: "/docs/golem-js/reference/enums/market_demand_directors_workload_demand_director_config.PackageFormat" + }, { title: "MarketErrorCode", href: "/docs/golem-js/reference/enums/market_error.MarketErrorCode" @@ -319,16 +395,16 @@ export const navigation = [ href: "/docs/golem-js/reference/enums/network_error.NetworkErrorCode" }, { - title: "PaymentErrorCode", - href: "/docs/golem-js/reference/enums/payment_error.PaymentErrorCode" + title: "NetworkState", + href: "/docs/golem-js/reference/enums/network_network.NetworkState" }, { - title: "WorkErrorCode", - href: "/docs/golem-js/reference/enums/task_error.WorkErrorCode" + title: "PaymentErrorCode", + href: "/docs/golem-js/reference/enums/payment_error.PaymentErrorCode" }, { - title: "TaskState", - href: "/docs/golem-js/reference/enums/task_task.TaskState" + title: "RejectionReason", + href: "/docs/golem-js/reference/enums/payment_rejection.RejectionReason" } ] }, @@ -336,116 +412,316 @@ export const navigation = [ title: "interfaces", children: [ { - title: "ActivityOptions", - href: "/docs/golem-js/reference/interfaces/activity_activity.ActivityOptions" + title: "IActivityRepository", + href: "/docs/golem-js/reference/interfaces/activity_activity.IActivityRepository" + }, +{ + title: "ActivityModule", + href: "/docs/golem-js/reference/interfaces/activity_activity_module.ActivityModule" + }, +{ + title: "ActivityModuleOptions", + href: "/docs/golem-js/reference/interfaces/activity_activity_module.ActivityModuleOptions" + }, +{ + title: "IFileServer", + href: "/docs/golem-js/reference/interfaces/activity_activity_module.IFileServer" + }, +{ + title: "IActivityApi", + href: "/docs/golem-js/reference/interfaces/activity_api.IActivityApi" }, { title: "ExeScriptRequest", - href: "/docs/golem-js/reference/interfaces/activity_activity.ExeScriptRequest" + href: "/docs/golem-js/reference/interfaces/activity_exe_script_executor.ExeScriptRequest" + }, +{ + title: "ExecutionOptions", + href: "/docs/golem-js/reference/interfaces/activity_exe_script_executor.ExecutionOptions" + }, +{ + title: "ActivityDTO", + href: "/docs/golem-js/reference/interfaces/activity_exe_unit_exe_unit.ActivityDTO" + }, +{ + title: "CommandOptions", + href: "/docs/golem-js/reference/interfaces/activity_exe_unit_exe_unit.CommandOptions" + }, +{ + title: "ExeUnitOptions", + href: "/docs/golem-js/reference/interfaces/activity_exe_unit_exe_unit.ExeUnitOptions" }, { title: "ResultData", href: "/docs/golem-js/reference/interfaces/activity_results.ResultData" }, +{ + title: "RuntimeEventFinished", + href: "/docs/golem-js/reference/interfaces/activity_results.RuntimeEventFinished" + }, { title: "RuntimeEventKind", href: "/docs/golem-js/reference/interfaces/activity_results.RuntimeEventKind" }, +{ + title: "RuntimeEventStarted", + href: "/docs/golem-js/reference/interfaces/activity_results.RuntimeEventStarted" + }, { title: "StreamingBatchEvent", href: "/docs/golem-js/reference/interfaces/activity_results.StreamingBatchEvent" }, +{ + title: "CreateResourceRentalPoolOptions", + href: "/docs/golem-js/reference/interfaces/experimental_deployment_builder.CreateResourceRentalPoolOptions" + }, +{ + title: "DeploymentOptions", + href: "/docs/golem-js/reference/interfaces/experimental_deployment_builder.DeploymentOptions" + }, +{ + title: "DeploymentEvents", + href: "/docs/golem-js/reference/interfaces/experimental_deployment_deployment.DeploymentEvents" + }, +{ + title: "JobEventsDict", + href: "/docs/golem-js/reference/interfaces/experimental_job_job.JobEventsDict" + }, +{ + title: "ProposalFilterOptions", + href: "/docs/golem-js/reference/interfaces/experimental_reputation_types.ProposalFilterOptions" + }, +{ + title: "ProposalSelectorOptions", + href: "/docs/golem-js/reference/interfaces/experimental_reputation_types.ProposalSelectorOptions" + }, +{ + title: "ReputationConfig", + href: "/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationConfig" + }, +{ + title: "ReputationData", + href: "/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationData" + }, +{ + title: "ReputationPreset", + href: "/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationPreset" + }, +{ + title: "ReputationPresets", + href: "/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationPresets" + }, +{ + title: "ReputationProviderEntry", + href: "/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationProviderEntry" + }, +{ + title: "ReputationProviderScores", + href: "/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationProviderScores" + }, +{ + title: "ReputationRejectedOperator", + href: "/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationRejectedOperator" + }, +{ + title: "ReputationRejectedProvider", + href: "/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationRejectedProvider" + }, +{ + title: "ReputationUntestedProvider", + href: "/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationUntestedProvider" + }, +{ + title: "ReputationWeightsMixin", + href: "/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationWeightsMixin" + }, +{ + title: "GolemNetworkEvents", + href: "/docs/golem-js/reference/interfaces/golem_network_golem_network.GolemNetworkEvents" + }, +{ + title: "GolemNetworkOptions", + href: "/docs/golem-js/reference/interfaces/golem_network_golem_network.GolemNetworkOptions" + }, +{ + title: "ManyOfOptions", + href: "/docs/golem-js/reference/interfaces/golem_network_golem_network.ManyOfOptions" + }, +{ + title: "MarketOrderSpec", + href: "/docs/golem-js/reference/interfaces/golem_network_golem_network.MarketOrderSpec" + }, +{ + title: "OneOfOptions", + href: "/docs/golem-js/reference/interfaces/golem_network_golem_network.OneOfOptions" + }, +{ + title: "AgreementOptions", + href: "/docs/golem-js/reference/interfaces/market_agreement_agreement.AgreementOptions" + }, +{ + title: "IAgreementRepository", + href: "/docs/golem-js/reference/interfaces/market_agreement_agreement.IAgreementRepository" + }, { title: "ProviderInfo", - href: "/docs/golem-js/reference/interfaces/agreement_agreement.ProviderInfo" + href: "/docs/golem-js/reference/interfaces/market_agreement_agreement.ProviderInfo" }, { - title: "AgreementDTO", - href: "/docs/golem-js/reference/interfaces/agreement_service.AgreementDTO" + title: "IMarketApi", + href: "/docs/golem-js/reference/interfaces/market_api.IMarketApi" }, { - title: "AgreementServiceOptions", - href: "/docs/golem-js/reference/interfaces/agreement_service.AgreementServiceOptions" + title: "BasicDemandPropertyConfig", + href: "/docs/golem-js/reference/interfaces/market_demand_demand.BasicDemandPropertyConfig" }, { - title: "TaskExecutorEventsDict", - href: "/docs/golem-js/reference/interfaces/executor_events.TaskExecutorEventsDict" + title: "IDemandRepository", + href: "/docs/golem-js/reference/interfaces/market_demand_demand.IDemandRepository" }, { - title: "JobEventsDict", - href: "/docs/golem-js/reference/interfaces/job_job.JobEventsDict" + title: "BasicDemandDirectorConfigOptions", + href: "/docs/golem-js/reference/interfaces/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions" + }, +{ + title: "PaymentDemandDirectorConfigOptions", + href: "/docs/golem-js/reference/interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions" + }, +{ + title: "ProposalPoolEvents", + href: "/docs/golem-js/reference/interfaces/market_draft_offer_proposal_pool.ProposalPoolEvents" }, { - title: "DemandDetails", - href: "/docs/golem-js/reference/interfaces/market_demand.DemandDetails" + title: "ProposalPoolOptions", + href: "/docs/golem-js/reference/interfaces/market_draft_offer_proposal_pool.ProposalPoolOptions" }, { - title: "DemandOptions", - href: "/docs/golem-js/reference/interfaces/market_demand.DemandOptions" + title: "IDemandDirector", + href: "/docs/golem-js/reference/interfaces/market_market_module.IDemandDirector" }, { - title: "ProposalDetails", - href: "/docs/golem-js/reference/interfaces/market_proposal.ProposalDetails" + title: "MarketModule", + href: "/docs/golem-js/reference/interfaces/market_market_module.MarketModule" }, { title: "MarketOptions", - href: "/docs/golem-js/reference/interfaces/market_service.MarketOptions" + href: "/docs/golem-js/reference/interfaces/market_market_module.MarketOptions" + }, +{ + title: "IProposalRepository", + href: "/docs/golem-js/reference/interfaces/market_proposal_market_proposal.IProposalRepository" + }, +{ + title: "INetworkApi", + href: "/docs/golem-js/reference/interfaces/network_api.INetworkApi" + }, +{ + title: "NetworkEvents", + href: "/docs/golem-js/reference/interfaces/network_api.NetworkEvents" }, { title: "NetworkInfo", href: "/docs/golem-js/reference/interfaces/network_network.NetworkInfo" }, { - title: "PackageDetails", - href: "/docs/golem-js/reference/interfaces/package_package.PackageDetails" + title: "NetworkModule", + href: "/docs/golem-js/reference/interfaces/network_network_module.NetworkModule" + }, +{ + title: "NetworkOptions", + href: "/docs/golem-js/reference/interfaces/network_network_module.NetworkOptions" + }, +{ + title: "TcpProxyEvents", + href: "/docs/golem-js/reference/interfaces/network_tcpProxy.TcpProxyEvents" + }, +{ + title: "TcpProxyOptions", + href: "/docs/golem-js/reference/interfaces/network_tcpProxy.TcpProxyOptions" + }, +{ + title: "BaseModel", + href: "/docs/golem-js/reference/interfaces/payment_BaseDocument.BaseModel" + }, +{ + title: "PaymentProcessOptions", + href: "/docs/golem-js/reference/interfaces/payment_agreement_payment_process.PaymentProcessOptions" + }, +{ + title: "AllocationOptions", + href: "/docs/golem-js/reference/interfaces/payment_allocation.AllocationOptions" + }, +{ + title: "IPaymentApi", + href: "/docs/golem-js/reference/interfaces/payment_api.IPaymentApi" }, { title: "BasePaymentOptions", href: "/docs/golem-js/reference/interfaces/payment_config.BasePaymentOptions" }, { - title: "DebitNoteDTO", - href: "/docs/golem-js/reference/interfaces/payment_debit_note.DebitNoteDTO" + title: "IDebitNoteRepository", + href: "/docs/golem-js/reference/interfaces/payment_debit_note.IDebitNoteRepository" }, { - title: "InvoiceDTO", - href: "/docs/golem-js/reference/interfaces/payment_invoice.InvoiceDTO" + title: "IInvoiceRepository", + href: "/docs/golem-js/reference/interfaces/payment_invoice.IInvoiceRepository" }, { - title: "PaymentOptions", - href: "/docs/golem-js/reference/interfaces/payment_payments.PaymentOptions" + title: "PaymentModule", + href: "/docs/golem-js/reference/interfaces/payment_payment_module.PaymentModule" + }, +{ + title: "PaymentModuleOptions", + href: "/docs/golem-js/reference/interfaces/payment_payment_module.PaymentModuleOptions" + }, +{ + title: "Rejection", + href: "/docs/golem-js/reference/interfaces/payment_rejection.Rejection" }, { title: "PaymentOptions", href: "/docs/golem-js/reference/interfaces/payment_service.PaymentOptions" }, { - title: "StorageProvider", - href: "/docs/golem-js/reference/interfaces/storage_provider.StorageProvider" + title: "RentalModule", + href: "/docs/golem-js/reference/interfaces/resource_rental_rental_module.RentalModule" }, { - title: "WebSocketStorageProviderOptions", - href: "/docs/golem-js/reference/interfaces/storage_ws_browser.WebSocketStorageProviderOptions" + title: "ResourceRentalEvents", + href: "/docs/golem-js/reference/interfaces/resource_rental_resource_rental.ResourceRentalEvents" }, { - title: "TaskServiceOptions", - href: "/docs/golem-js/reference/interfaces/task_service.TaskServiceOptions" + title: "ResourceRentalOptions", + href: "/docs/golem-js/reference/interfaces/resource_rental_resource_rental.ResourceRentalOptions" }, { - title: "CommandOptions", - href: "/docs/golem-js/reference/interfaces/task_work.CommandOptions" + title: "ResourceRentalPoolDependencies", + href: "/docs/golem-js/reference/interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolDependencies" + }, +{ + title: "ResourceRentalPoolEvents", + href: "/docs/golem-js/reference/interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolEvents" }, { - title: "WorkOptions", - href: "/docs/golem-js/reference/interfaces/task_work.WorkOptions" + title: "ResourceRentalPoolOptions", + href: "/docs/golem-js/reference/interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolOptions" + }, +{ + title: "StorageProvider", + href: "/docs/golem-js/reference/interfaces/shared_storage_provider.StorageProvider" + }, +{ + title: "WebSocketStorageProviderOptions", + href: "/docs/golem-js/reference/interfaces/shared_storage_ws_browser.WebSocketStorageProviderOptions" }, { title: "Logger", - href: "/docs/golem-js/reference/interfaces/utils_logger_logger.Logger" + href: "/docs/golem-js/reference/interfaces/shared_utils_logger_logger.Logger" }, { - title: "IdentityModel", - href: "/docs/golem-js/reference/interfaces/utils_yagna_identity.IdentityModel" + title: "YagnaExeScriptObserver", + href: "/docs/golem-js/reference/interfaces/shared_yagna_yagnaApi.YagnaExeScriptObserver" } ] }, @@ -456,53 +732,137 @@ export const navigation = [ title: "Activity_activity", href: "/docs/golem-js/reference/modules/activity_activity" }, +{ + title: "Activity_activity_module", + href: "/docs/golem-js/reference/modules/activity_activity_module" + }, +{ + title: "Activity_api", + href: "/docs/golem-js/reference/modules/activity_api" + }, +{ + title: "Activity_exe_script_executor", + href: "/docs/golem-js/reference/modules/activity_exe_script_executor" + }, +{ + title: "Activity_exe_unit_batch", + href: "/docs/golem-js/reference/modules/activity_exe_unit_batch" + }, +{ + title: "Activity_exe_unit_error", + href: "/docs/golem-js/reference/modules/activity_exe_unit_error" + }, +{ + title: "Activity_exe_unit_exe_unit", + href: "/docs/golem-js/reference/modules/activity_exe_unit_exe_unit" + }, +{ + title: "Activity_exe_unit_process", + href: "/docs/golem-js/reference/modules/activity_exe_unit_process" + }, { title: "Activity_results", href: "/docs/golem-js/reference/modules/activity_results" }, { - title: "Agreement_agreement", - href: "/docs/golem-js/reference/modules/agreement_agreement" + title: "Activity_script_command", + href: "/docs/golem-js/reference/modules/activity_script_command" + }, +{ + title: "Activity_script_script", + href: "/docs/golem-js/reference/modules/activity_script_script" + }, +{ + title: "Experimental_deployment_builder", + href: "/docs/golem-js/reference/modules/experimental_deployment_builder" + }, +{ + title: "Experimental_deployment_deployment", + href: "/docs/golem-js/reference/modules/experimental_deployment_deployment" }, { - title: "Agreement_service", - href: "/docs/golem-js/reference/modules/agreement_service" + title: "Experimental_deployment_validate_deployment", + href: "/docs/golem-js/reference/modules/experimental_deployment_validate_deployment" }, { - title: "Agreement_strategy", - href: "/docs/golem-js/reference/modules/agreement_strategy" + title: "Experimental_job_job", + href: "/docs/golem-js/reference/modules/experimental_job_job" }, { - title: "Error_golem_error", - href: "/docs/golem-js/reference/modules/error_golem_error" + title: "Experimental_job_job_manager", + href: "/docs/golem-js/reference/modules/experimental_job_job_manager" }, { - title: "Events_events", - href: "/docs/golem-js/reference/modules/events_events" + title: "Experimental_reputation_error", + href: "/docs/golem-js/reference/modules/experimental_reputation_error" }, { - title: "Executor_events", - href: "/docs/golem-js/reference/modules/executor_events" + title: "Experimental_reputation_system", + href: "/docs/golem-js/reference/modules/experimental_reputation_system" }, { - title: "Executor_executor", - href: "/docs/golem-js/reference/modules/executor_executor" + title: "Experimental_reputation_types", + href: "/docs/golem-js/reference/modules/experimental_reputation_types" }, { title: "Golem_network_golem_network", href: "/docs/golem-js/reference/modules/golem_network_golem_network" }, { - title: "Job_job", - href: "/docs/golem-js/reference/modules/job_job" + title: "Market_agreement_agreement", + href: "/docs/golem-js/reference/modules/market_agreement_agreement" + }, +{ + title: "Market_agreement_agreement_event", + href: "/docs/golem-js/reference/modules/market_agreement_agreement_event" }, { - title: "Market_builder", - href: "/docs/golem-js/reference/modules/market_builder" + title: "Market_api", + href: "/docs/golem-js/reference/modules/market_api" }, { - title: "Market_demand", - href: "/docs/golem-js/reference/modules/market_demand" + title: "Market_demand_demand", + href: "/docs/golem-js/reference/modules/market_demand_demand" + }, +{ + title: "Market_demand_demand_body_builder", + href: "/docs/golem-js/reference/modules/market_demand_demand_body_builder" + }, +{ + title: "Market_demand_directors_base_config", + href: "/docs/golem-js/reference/modules/market_demand_directors_base_config" + }, +{ + title: "Market_demand_directors_basic_demand_director", + href: "/docs/golem-js/reference/modules/market_demand_directors_basic_demand_director" + }, +{ + title: "Market_demand_directors_basic_demand_director_config", + href: "/docs/golem-js/reference/modules/market_demand_directors_basic_demand_director_config" + }, +{ + title: "Market_demand_directors_payment_demand_director", + href: "/docs/golem-js/reference/modules/market_demand_directors_payment_demand_director" + }, +{ + title: "Market_demand_directors_payment_demand_director_config", + href: "/docs/golem-js/reference/modules/market_demand_directors_payment_demand_director_config" + }, +{ + title: "Market_demand_directors_workload_demand_director", + href: "/docs/golem-js/reference/modules/market_demand_directors_workload_demand_director" + }, +{ + title: "Market_demand_directors_workload_demand_director_config", + href: "/docs/golem-js/reference/modules/market_demand_directors_workload_demand_director_config" + }, +{ + title: "Market_demand_options", + href: "/docs/golem-js/reference/modules/market_demand_options" + }, +{ + title: "Market_draft_offer_proposal_pool", + href: "/docs/golem-js/reference/modules/market_draft_offer_proposal_pool" }, { title: "Market_error", @@ -513,21 +873,41 @@ export const navigation = [ href: "/docs/golem-js/reference/modules/market_helpers" }, { - title: "Market_proposal", - href: "/docs/golem-js/reference/modules/market_proposal" + title: "Market_market_module", + href: "/docs/golem-js/reference/modules/market_market_module" + }, +{ + title: "Market_proposal_market_proposal", + href: "/docs/golem-js/reference/modules/market_proposal_market_proposal" + }, +{ + title: "Market_proposal_market_proposal_event", + href: "/docs/golem-js/reference/modules/market_proposal_market_proposal_event" + }, +{ + title: "Market_proposal_offer_counter_proposal", + href: "/docs/golem-js/reference/modules/market_proposal_offer_counter_proposal" + }, +{ + title: "Market_proposal_offer_proposal", + href: "/docs/golem-js/reference/modules/market_proposal_offer_proposal" }, { - title: "Market_proposals_batch", - href: "/docs/golem-js/reference/modules/market_proposals_batch" + title: "Market_proposal_proposal_properties", + href: "/docs/golem-js/reference/modules/market_proposal_proposal_properties" }, { - title: "Market_service", - href: "/docs/golem-js/reference/modules/market_service" + title: "Market_proposal_proposals_batch", + href: "/docs/golem-js/reference/modules/market_proposal_proposals_batch" }, { title: "Market_strategy", href: "/docs/golem-js/reference/modules/market_strategy" }, +{ + title: "Network_api", + href: "/docs/golem-js/reference/modules/network_api" + }, { title: "Network_error", href: "/docs/golem-js/reference/modules/network_error" @@ -536,26 +916,42 @@ export const navigation = [ title: "Network_network", href: "/docs/golem-js/reference/modules/network_network" }, +{ + title: "Network_network_module", + href: "/docs/golem-js/reference/modules/network_network_module" + }, { title: "Network_node", href: "/docs/golem-js/reference/modules/network_node" }, { - title: "Network_service", - href: "/docs/golem-js/reference/modules/network_service" + title: "Network_tcpProxy", + href: "/docs/golem-js/reference/modules/network_tcpProxy" }, { - title: "Package_package", - href: "/docs/golem-js/reference/modules/package_package" + title: "Payment_BaseDocument", + href: "/docs/golem-js/reference/modules/payment_BaseDocument" }, { title: "Payment_InvoiceProcessor", href: "/docs/golem-js/reference/modules/payment_InvoiceProcessor" }, +{ + title: "Payment_PayerDetails", + href: "/docs/golem-js/reference/modules/payment_PayerDetails" + }, { title: "Payment_agreement_payment_process", href: "/docs/golem-js/reference/modules/payment_agreement_payment_process" }, +{ + title: "Payment_allocation", + href: "/docs/golem-js/reference/modules/payment_allocation" + }, +{ + title: "Payment_api", + href: "/docs/golem-js/reference/modules/payment_api" + }, { title: "Payment_config", href: "/docs/golem-js/reference/modules/payment_config" @@ -573,8 +969,12 @@ export const navigation = [ href: "/docs/golem-js/reference/modules/payment_invoice" }, { - title: "Payment_payments", - href: "/docs/golem-js/reference/modules/payment_payments" + title: "Payment_payment_module", + href: "/docs/golem-js/reference/modules/payment_payment_module" + }, +{ + title: "Payment_rejection", + href: "/docs/golem-js/reference/modules/payment_rejection" }, { title: "Payment_service", @@ -585,96 +985,144 @@ export const navigation = [ href: "/docs/golem-js/reference/modules/payment_strategy" }, { - title: "Script_command", - href: "/docs/golem-js/reference/modules/script_command" + title: "Resource_rental_rental_module", + href: "/docs/golem-js/reference/modules/resource_rental_rental_module" + }, +{ + title: "Resource_rental_resource_rental", + href: "/docs/golem-js/reference/modules/resource_rental_resource_rental" + }, +{ + title: "Resource_rental_resource_rental_pool", + href: "/docs/golem-js/reference/modules/resource_rental_resource_rental_pool" + }, +{ + title: "Shared_cache_CacheService", + href: "/docs/golem-js/reference/modules/shared_cache_CacheService" + }, +{ + title: "Shared_error_golem_error", + href: "/docs/golem-js/reference/modules/shared_error_golem_error" + }, +{ + title: "Shared_storage_GftpServerAdapter", + href: "/docs/golem-js/reference/modules/shared_storage_GftpServerAdapter" + }, +{ + title: "Shared_storage_default", + href: "/docs/golem-js/reference/modules/shared_storage_default" + }, +{ + title: "Shared_storage_gftp", + href: "/docs/golem-js/reference/modules/shared_storage_gftp" + }, +{ + title: "Shared_storage_null", + href: "/docs/golem-js/reference/modules/shared_storage_null" + }, +{ + title: "Shared_storage_provider", + href: "/docs/golem-js/reference/modules/shared_storage_provider" + }, +{ + title: "Shared_storage_ws_browser", + href: "/docs/golem-js/reference/modules/shared_storage_ws_browser" + }, +{ + title: "Shared_types", + href: "/docs/golem-js/reference/modules/shared_types" + }, +{ + title: "Shared_utils_abortSignal", + href: "/docs/golem-js/reference/modules/shared_utils_abortSignal" }, { - title: "Storage_gftp", - href: "/docs/golem-js/reference/modules/storage_gftp" + title: "Shared_utils_apiErrorMessage", + href: "/docs/golem-js/reference/modules/shared_utils_apiErrorMessage" }, { - title: "Storage_null", - href: "/docs/golem-js/reference/modules/storage_null" + title: "Shared_utils_env", + href: "/docs/golem-js/reference/modules/shared_utils_env" }, { - title: "Storage_provider", - href: "/docs/golem-js/reference/modules/storage_provider" + title: "Shared_utils_eventLoop", + href: "/docs/golem-js/reference/modules/shared_utils_eventLoop" }, { - title: "Storage_ws_browser", - href: "/docs/golem-js/reference/modules/storage_ws_browser" + title: "Shared_utils_logger_defaultLogger", + href: "/docs/golem-js/reference/modules/shared_utils_logger_defaultLogger" }, { - title: "Task_batch", - href: "/docs/golem-js/reference/modules/task_batch" + title: "Shared_utils_logger_logger", + href: "/docs/golem-js/reference/modules/shared_utils_logger_logger" }, { - title: "Task_error", - href: "/docs/golem-js/reference/modules/task_error" + title: "Shared_utils_logger_nullLogger", + href: "/docs/golem-js/reference/modules/shared_utils_logger_nullLogger" }, { - title: "Task_process", - href: "/docs/golem-js/reference/modules/task_process" + title: "Shared_utils_runtimeContextChecker", + href: "/docs/golem-js/reference/modules/shared_utils_runtimeContextChecker" }, { - title: "Task_service", - href: "/docs/golem-js/reference/modules/task_service" + title: "Shared_utils_timeout", + href: "/docs/golem-js/reference/modules/shared_utils_timeout" }, { - title: "Task_task", - href: "/docs/golem-js/reference/modules/task_task" + title: "Shared_utils_types", + href: "/docs/golem-js/reference/modules/shared_utils_types" }, { - title: "Task_work", - href: "/docs/golem-js/reference/modules/task_work" + title: "Shared_utils_wait", + href: "/docs/golem-js/reference/modules/shared_utils_wait" }, { - title: "Utils_env", - href: "/docs/golem-js/reference/modules/utils_env" + title: "Shared_yagna_adapters_activity_api_adapter", + href: "/docs/golem-js/reference/modules/shared_yagna_adapters_activity_api_adapter" }, { - title: "Utils_logger_defaultLogger", - href: "/docs/golem-js/reference/modules/utils_logger_defaultLogger" + title: "Shared_yagna_adapters_market_api_adapter", + href: "/docs/golem-js/reference/modules/shared_yagna_adapters_market_api_adapter" }, { - title: "Utils_logger_jsonLogger", - href: "/docs/golem-js/reference/modules/utils_logger_jsonLogger" + title: "Shared_yagna_adapters_network_api_adapter", + href: "/docs/golem-js/reference/modules/shared_yagna_adapters_network_api_adapter" }, { - title: "Utils_logger_logger", - href: "/docs/golem-js/reference/modules/utils_logger_logger" + title: "Shared_yagna_adapters_payment_api_adapter", + href: "/docs/golem-js/reference/modules/shared_yagna_adapters_payment_api_adapter" }, { - title: "Utils_logger_nullLogger", - href: "/docs/golem-js/reference/modules/utils_logger_nullLogger" + title: "Shared_yagna_event_reader", + href: "/docs/golem-js/reference/modules/shared_yagna_event_reader" }, { - title: "Utils_logger_pinoLogger", - href: "/docs/golem-js/reference/modules/utils_logger_pinoLogger" + title: "Shared_yagna_repository_activity_repository", + href: "/docs/golem-js/reference/modules/shared_yagna_repository_activity_repository" }, { - title: "Utils_runtimeContextChecker", - href: "/docs/golem-js/reference/modules/utils_runtimeContextChecker" + title: "Shared_yagna_repository_agreement_repository", + href: "/docs/golem-js/reference/modules/shared_yagna_repository_agreement_repository" }, { - title: "Utils_types", - href: "/docs/golem-js/reference/modules/utils_types" + title: "Shared_yagna_repository_debit_note_repository", + href: "/docs/golem-js/reference/modules/shared_yagna_repository_debit_note_repository" }, { - title: "Utils_yagna_activity", - href: "/docs/golem-js/reference/modules/utils_yagna_activity" + title: "Shared_yagna_repository_demand_repository", + href: "/docs/golem-js/reference/modules/shared_yagna_repository_demand_repository" }, { - title: "Utils_yagna_gsb", - href: "/docs/golem-js/reference/modules/utils_yagna_gsb" + title: "Shared_yagna_repository_invoice_repository", + href: "/docs/golem-js/reference/modules/shared_yagna_repository_invoice_repository" }, { - title: "Utils_yagna_identity", - href: "/docs/golem-js/reference/modules/utils_yagna_identity" + title: "Shared_yagna_repository_proposal_repository", + href: "/docs/golem-js/reference/modules/shared_yagna_repository_proposal_repository" }, { - title: "Utils_yagna_yagna", - href: "/docs/golem-js/reference/modules/utils_yagna_yagna" + title: "Shared_yagna_yagnaApi", + href: "/docs/golem-js/reference/modules/shared_yagna_yagnaApi" } ] } diff --git a/src/pages/docs/golem-js/reference/README.md b/src/pages/docs/golem-js/reference/README.md index 42b5f2f50..36115f953 100644 --- a/src/pages/docs/golem-js/reference/README.md +++ b/src/pages/docs/golem-js/reference/README.md @@ -1,7 +1,7 @@ --- -title: "Project JavaScript API reference" -pageTitle: "Project JavaScript API reference - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Project JavaScript API reference within the golem-js SDK for the Golem Network." +title: "Project Golem-JS API reference" +pageTitle: "Project Golem-JS API reference - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Project Golem-JS API reference within the golem-js SDK for the Golem Network." type: "JS API Reference" --- # Golem JavaScript API @@ -21,22 +21,29 @@ type: "JS API Reference" - [Golem JavaScript API](#golem-javascript-api) - [Table of contents](#table-of-contents) - [What's Golem and `golem-js`?](#whats-golem-and-golem-js) - - [System requirements](#system-requirements) + - [Documentation](#documentation) - [Installation](#installation) - - [Building](#building) - - [Usage](#usage) - - [Hello World example](#hello-world-example) - - [More examples](#more-examples) - [Supported environments](#supported-environments) - - [Golem Network Market Basics](#golem-network-market-basics) - - [Mid-agreement payments to the Providers for used resources](#mid-agreement-payments-to-the-providers-for-used-resources) - - [Limit price limits to filter out offers that are too expensive](#limit-price-limits-to-filter-out-offers-that-are-too-expensive) - - [Work with reliable providers](#work-with-reliable-providers) + - [Getting started with Golem Network](#getting-started-with-golem-network) + - [Obtain an `app-key` to use with SDK](#obtain-an-app-key-to-use-with-sdk) + - [Usage](#usage) + - [Renting a single machine and running a simple task on it](#renting-a-single-machine-and-running-a-simple-task-on-it) + - [Renting many machines and running tasks in parallel](#renting-many-machines-and-running-tasks-in-parallel) + - [Features](#features) + - [Streaming command results](#streaming-command-results) + - [File transfer](#file-transfer) + - [VPN](#vpn) + - [Events](#events) + - [Custom filters](#custom-filters) + - [Custom ranking of proposals](#custom-ranking-of-proposals) + - [Uploading local images to the provider](#uploading-local-images-to-the-provider) + - [Setup and teardown methods](#setup-and-teardown-methods) + - [Going further](#going-further) + - [More examples](#more-examples) - [Debugging](#debugging) - [Testing](#testing) - [Contributing](#contributing) - [See also](#see-also) - ## What's Golem and `golem-js`? @@ -48,19 +55,42 @@ resources and connecting users through a flexible, open-source platform. **golem-js** is the JavaScript API that allows developers to connect to their Golem nodes and manage their distributed, computational loads through Golem Network. -## System requirements +## Documentation -To use `golem-js`, it is necessary to have yagna installed, with a **minimum version requirement of v0.13.2**. Yagna is a -service that communicates and performs operations on the Golem Network, upon your requests via the SDK. You -can [follow these instructions](https://docs.golem.network/docs/creators/javascript/quickstarts/quickstart#install-yagna-2) -to set it up. +Visit our [official documentation](https://docs.golem.network/docs/creators/javascript) to learn more about the +JavaScript SDK and how to use it. + +## Installation -### Simplified installation steps +To quickly get started with a new project using `golem-js`, you can use the following template: + +```bash +npx @golem-sdk/cli@latest new my-awesome-golem-project +``` -In order to get started and on Golem Network and obtain test GLM tokens (`tGLM`) that will allow you to build on the -test network, follow these steps: +`@golem-sdk/golem-js` is available as a [NPM package](https://www.npmjs.com/package/@golem-sdk/golem-js). -#### Join the network as a requestor and obtain test tokens +You can install it through `npm`: + +```bash +npm install @golem-sdk/golem-js +``` + +or by `yarn`: + +```bash +yarn add @golem-sdk/golem-js +``` + +## Supported environments + +The SDK is designed to work with LTS versions of Node (starting from 18) +and with browsers. + +## Getting started with Golem Network + +Before you start using the SDK, you need to have `yagna` installed and running on your machine. Yagna is a service that +communicates and performs operations on the Golem Network, upon your requests via the SDK. You can follow the instructions below or visit the [official documentation](https://docs.golem.network/docs/creators/javascript/quickstarts/quickstart#install-yagna-2) to set it up. ```bash # Join the network as a requestor @@ -69,200 +99,333 @@ curl -sSf https://join.golem.network/as-requestor | bash - # Start the golem node on your machine, # you can use `daemonize` to run this in background yagna service run +``` +Now that you have `yagna` running, you can initialize your requestor and request funds (`tGLM` tokens) on the test network. + +```bash # IN SEPARATE TERMINAL (if not daemonized) # Initialize your requestor -yagna payment init --sender --network goerli +yagna payment init --sender --network holesky # Request funds on the test network -yagna payment fund --network goerli +yagna payment fund --network holesky # Check the status of the funds -yagna payment status --network goerli +yagna payment status --network holesky ``` -#### Obtain your `app-key` to use with SDK +### Obtain an `app-key` to use with SDK If you don't have any app-keys available from `yagna app-key list`, go ahead and create one with the command below. -You will need this key in order to communicate with `yagna` from your application via `golem-js`.You can set it +You will need this key in order to communicate with `yagna` from your application. You can set it as `YAGNA_APPKEY` environment variable. ```bash yagna app-key create my-golem-app ``` -## Installation - -`@golem-sdk/golem-js` is available as a [NPM package](https://www.npmjs.com/package/@golem-sdk/golem-js). - -You can install it through `npm`: - -```bash -npm install @golem-sdk/golem-js -``` +## Usage -or by `yarn`: +### Renting a single machine and running a simple task on it -```bash -yarn add @golem-sdk/golem-js -``` +```ts +import { MarketOrderSpec, GolemNetwork } from "@golem-sdk/golem-js"; -## Building +// Define the order that we're going to place on the market +const order: MarketOrderSpec = { + demand: { + workload: { imageTag: "golem/alpine:latest" }, + }, + market: { + // We're only going to rent the provider for 5 minutes max + rentHours: 5 / 60, + pricing: { + model: "linear", + maxStartPrice: 0.5, + maxCpuPerHourPrice: 1.0, + maxEnvPerHourPrice: 0.5, + }, + }, +}; -To build a library available to the NodeJS environment: +(async () => { + const glm = new GolemNetwork(); -```bash -npm run build -# or -yarn build + try { + await glm.connect(); + // Rent a machine + const rental = await glm.oneOf(order); + await rental + .getExeUnit() + .then((exe) => exe.run("echo Hello, Golem! 👋")) + .then((res) => console.log(res.stdout)); + await rental.stopAndFinalize(); + } catch (err) { + console.error("Failed to run the example", err); + } finally { + await glm.disconnect(); + } +})().catch(console.error); ``` -This will generate production code in the `dist/` directory ready to be used in your nodejs or browser applications. +### Renting many machines and running tasks in parallel -## Usage +```ts +import { GolemNetwork, MarketOrderSpec } from "@golem-sdk/golem-js"; -### Hello World example +// Define the order that we're going to place on the market +const order: MarketOrderSpec = { + demand: { + workload: { imageTag: "golem/alpine:latest" }, + }, + market: { + rentHours: 0.5, + pricing: { + model: "linear", + maxStartPrice: 0.5, + maxCpuPerHourPrice: 1.0, + maxEnvPerHourPrice: 0.5, + }, + }, +}; -```ts -import { TaskExecutor } from "@golem-sdk/golem-js"; +(async () => { + const glm = new GolemNetwork(); -(async function main() { - const executor = await TaskExecutor.create("golem/alpine:latest"); try { - await executor.run(async (ctx) => console.log((await ctx.run("echo 'Hello World'")).stdout)); - } catch (error) { - console.error("Computation failed:", error); + await glm.connect(); + // create a pool that can grow up to 3 rentals at the same time + const pool = await glm.manyOf({ + concurrency: 3, + order, + }); + // run 3 tasks in parallel on 3 different machines + await Promise.allSettled([ + pool.withRental(async (rental) => + rental + .getExeUnit() + .then((exe) => exe.run("echo Hello, Golem from the first machine! 👋")) + .then((res) => console.log(res.stdout)), + ), + pool.withRental(async (rental) => + rental + .getExeUnit() + .then((exe) => exe.run("echo Hello, Golem from the second machine! 👋")) + .then((res) => console.log(res.stdout)), + ), + pool.withRental(async (rental) => + rental + .getExeUnit() + .then((exe) => exe.run("echo Hello, Golem from the third machine! 👋")) + .then((res) => console.log(res.stdout)), + ), + ]); + } catch (err) { + console.error("Failed to run the example", err); } finally { - await executor.shutdown(); + await glm.disconnect(); } -})(); +})().catch(console.error); ``` -### More examples +## Features -The [examples directory](./examples) in the repository contains various usage patterns for the SDK. You can browse -through them and learn about the recommended practices. All examples are automatically tested during our release -process. +### Streaming command results -In case you find an issue with the examples, feel free to submit -an [issue report](https://github.com/golemfactory/golem-js/issues) to the repository. +Instead of waiting for the command to finish, you can stream the results as they come in. This is useful for long-running +commands, where you want to see the output as it's being produced. -You can find even more examples and tutorials in -the [JavaScript API section of the Golem Network Docs](https://docs.golem.network/docs/creators/javascript). +```ts +const remoteProcess = await exe.runAndStream( + ` +sleep 1 +echo -n 'Hello from stdout' >&1 +sleep 1 +echo -n 'Hello from stdout again' >&1 +sleep 1 +echo -n 'Hello from stdout yet again' >&1 +`, +); +remoteProcess.stdout.on("data", (data) => console.log("stdout>", data)); +await remoteProcess.waitForExit(); +``` -## Supported environments +[Check the full example](./examples/basic/run-and-stream.ts) -The SDK is designed to work with LTS versions of Node (starting from 18) -and with browsers. +### File transfer -## Golem Network Market Basics +You can transfer files to and from the remote machine. This is useful when you need to provide input files or retrieve +the results of the computation. -The Golem Network provides an open marketplace where anyone can join as a Provider and supply the network with their -computing power. In return for their service, they are billing Requestors (users of this SDK) according to the pricing -that they define. +```ts +await exe + .beginBatch() + .run(`echo "Message from provider ${exe.provider.name}. Hello 😻" >> /golem/work/message.txt`) + .downloadFile("/golem/work/message.txt", "./message.txt") + .end(); +console.log(await readFile("./results.txt", { encoding: "utf-8" })); +``` -As a Requestor, you might want to: +[Check the full example](./examples/basic/transfer.ts) -- control the limit price so that you're not going to over-spend your funds -- control the interactions with the providers if you have a list of the ones which you like or the ones which you would - like to avoid +### VPN -To make this easy, we provided you with a set of predefined market proposal filters, which you can combine to implement -your own market strategy (described below). +You can connect yourself and multiple providers to a VPN network. This is useful when you want to communicate +securely between the nodes. -### Mid-agreement payments to the Providers for used resources +```ts +const network = await glm.createNetwork({ ip: "192.168.7.0/24" }); +// ... +const exe1 = await rental1.getExeUnit(); +const exe2 = await rental2.getExeUnit(); +await exe1 + .run(`ping ${exe2.getIp()} -c 4`) + .then((res) => console.log(`Response from provider: ${exe1.provider.name} (ip: ${exe1.getIp()})`, res.stdout)); +``` -When you obtain resources from the Provider and start using them, the billing cycle will start immediately. -Since reliable service and payments are important for all actors in the Golem Network, -the SDK makes use of the mid-agreement payments model and implements best practices for the market, which include: +[Check the full example](./examples/basic/vpn.ts) -- responding and accepting debit notes for activities that last longer than 30 minutes -- issuing mid-agreement payments (pay-as-you-go) +### Events -By default, the SDK will: +You can listen to various events that are emitted by the SDK. This is useful when you want to react to certain +conditions, like calculating the total cost of all invoices received. -- accept debit notes sent by the Providers within two minutes of receipt (so that the Provider knows that we're alive, - and it will continue serving the resources) -- issue a mid-agreement payment every 12 hours (so that the provider will be paid on a regular interval for serving the - resources for more than 10 hours) +```ts +glm.payment.events.on("invoiceAccepted", (invoice) => { + console.log("Invoice '%s' accepted for %s GLM", invoice.id, invoice.amount); +}); +``` -You can learn more about -the [mid-agreement and other payment models from the official docs](https://docs.golem.network/docs/golem/payments). +[Check the full example](./examples/basic/events.ts) -These values are defaults and can be influenced by the following settings: +### Custom filters -- `DemandOptions.expirationSec` -- `DemandOptions.debitNotesAcceptanceTimeoutSec` -- `DemandOptions.midAgreementPaymentTimeoutSec` +You can define custom filters to select the providers that you want to work with. This is useful when you want to +blacklist or whitelist certain providers. -If you're using `TaskExecutor` to run tasks on Golem, you can pass them as part of the configuration object accepted -by `TaskExecutor.create`. Consult [JS API reference](https://docs.golem.network/docs/golem-js/reference/overview) for -details. +```ts +const myFilter: ProposalFilter = (proposal) => proposal.provider.name !== "bad-provider"; + +const order: MarketOrderSpec = { + market: { + proposalFilter: myFilter, + // other options + }, +}; +``` -### Limit price limits to filter out offers that are too expensive +[Check the full example](./examples/advanced/proposal-filter.ts) -```typescript -import { TaskExecutor, ProposalFilterFactory } from "@golem-sdk/golem-js"; +We have also prepared a set of predefined filters for common use-cases. [Check out the example with predefined filters here](./examples/advanced/proposal-predefined-filter.ts) -const executor = await TaskExecutor.create({ - // What do you want to run - package: "golem/alpine:3.18.2", +### Custom ranking of proposals - // How much you wish to spend - budget: 0.5, - proposalFilter: ProposalFilterFactory.limitPriceFilter({ - start: 1, - cpuPerSec: 1 / 3600, - envPerSec: 1 / 3600, - }), +You can define a method that will select which proposal should be chosen first. This is useful when you want to +prioritize certain providers over others. - // Where you want to spend - payment: { - network: "polygon", +```ts +const scores = { + "very-good-provider": 10, + "good-provider": 5, + "bad-provider": -10, +}; + +const bestProviderSelector = (proposals: OfferProposal[]) => { + return proposals.sort((a, b) => (scores[b.provider.name] || 0) - (scores[a.provider.name] || 0))[0]; +}; + +const order: MarketOrderSpec = { + market: { + proposalSelector: bestProviderSelector, + // other options }, -}); +}; ``` -To learn more about other filters, please check -the [API reference of the market/strategy module](https://docs.golem.network/docs/golem-js/reference/modules/market_strategy) +[Check the full example](./examples/advanced/proposal-selector.ts) -### Work with reliable providers +### Uploading local images to the provider -The `getHealthyProvidersWhiteList` helper will provide you with a list of Provider ID's that were checked with basic -health-checks. Using this whitelist will increase the chance of working with a reliable provider. Please note, that you -can also build up your own list of favourite providers and use it in a similar fashion. +You can avoid using the registry and upload a GVMI image directly to the provider. This is useful when you want to +quickly prototype your image without having to update the registry with every change. -```typescript -import { MarketHelpers, ProposalFilterFactory, TaskExecutor } from "@golem-sdk/golem-js"; +```ts +const order: MarketOrderSpec = { + demand: { + workload: { + imageUrl: "file:///path/to/your/image.gvmi", + }, + // other options + }, +}; +``` + +[Check the full example](./examples/advanced//local-image/) -// Collect the whitelist -const verifiedProviders = await MarketHelpers.getHealthyProvidersWhiteList(); +### Setup and teardown methods + +You can define a setup method that will be executed the first time a provider is rented and a teardown method +that will be executed before the rental is done. This is useful when you want to avoid doing the same work +multiple times when running multiple tasks on the same provider. + +```ts +// I want to upload a big file to each provider only once +const setup: LifecycleFunction = async (exe) => exe.uploadFile("./big-file.txt", "/golem/work/big-file.txt"); -// Prepare the whitelist filter -const whiteList = ProposalFilterFactory.allowProvidersById(verifiedProviders); +// I want to remove the file after I'm done +const teardown: LifecycleFunction = async (exe) => exe.run("rm /golem/work/big-file.txt"); -// Prepare the price filter -const acceptablePrice = ProposalFilterFactory.limitPriceFilter({ - start: 1, - cpuPerSec: 1 / 3600, - envPerSec: 1 / 3600, +const pool = await glm.manyOf({ + order, + concurrency, + setup, + teardown, }); +``` + +[Check the full example](./examples/advanced/setup-and-teardown.ts) -const executor = await TaskExecutor.create({ - // What do you want to run - package: "golem/alpine:3.18.2", + + +## Going further + +If you wish to learn more about how the SDK functions under the hood, please check out our more advanced examples: + +- [Creating pools manually](./examples/advanced/manual-pools.ts) +- [Performing all market operations manually](./examples/advanced/step-by-step.ts) +- [(for library authors) Override internal module](./examples/advanced/override-module.ts) + +## More examples + +The [examples directory](./examples) in the repository contains various usage patterns for the SDK. You can browse +through them and learn about the recommended practices. All examples are automatically tested during our release +process. + +In case you find an issue with the examples, feel free to submit +an [issue report](https://github.com/golemfactory/golem-js/issues) to the repository. + +You can find even more examples and tutorials in +the [JavaScript API section of the Golem Network Docs](https://docs.golem.network/docs/creators/javascript). + ## Debugging The SDK uses the [debug](https://www.npmjs.com/package/debug) package to provide debug logs. To enable them, set the `DEBUG` environment variable to `golem-js:*` or `golem-js:market:*` to see all logs or only the market-related ones, respectively. For more information, please refer to the [debug package documentation](https://www.npmjs.com/package/debug). diff --git a/src/pages/docs/golem-js/reference/classes/activity_activity.Activity.md b/src/pages/docs/golem-js/reference/classes/activity_activity.Activity.md index cacf3b4e3..110d72971 100644 --- a/src/pages/docs/golem-js/reference/classes/activity_activity.Activity.md +++ b/src/pages/docs/golem-js/reference/classes/activity_activity.Activity.md @@ -13,191 +13,149 @@ As part of a given activity, it is possible to execute exe script commands and c ## Table of contents +### Constructors + +- [constructor](activity_activity.Activity#constructor) + ### Properties - [id](activity_activity.Activity#id) - [agreement](activity_activity.Activity#agreement) -- [yagnaApi](activity_activity.Activity#yagnaapi) -- [options](activity_activity.Activity#options) +- [currentState](activity_activity.Activity#currentstate) +- [previousState](activity_activity.Activity#previousstate) +- [usage](activity_activity.Activity#usage) -### Methods +### Accessors -- [create](activity_activity.Activity#create) -- [getProviderInfo](activity_activity.Activity#getproviderinfo) -- [execute](activity_activity.Activity#execute) -- [stop](activity_activity.Activity#stop) -- [getState](activity_activity.Activity#getstate) -- [send](activity_activity.Activity#send) +- [provider](activity_activity.Activity#provider) -## Properties - -### id +### Methods -• `Readonly` **id**: `string` +- [getState](activity_activity.Activity#getstate) +- [getPreviousState](activity_activity.Activity#getpreviousstate) -activity ID +## Constructors -#### Defined in +### constructor -[src/activity/activity.ts:62](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L62) +• **new Activity**(`id`, `agreement`, `currentState?`, `previousState?`, `usage`): [`Activity`](activity_activity.Activity) -___ +#### Parameters -### agreement +| Name | Type | Default value | Description | +| :------ | :------ | :------ | :------ | +| `id` | `string` | `undefined` | The ID of the activity in Yagna | +| `agreement` | [`Agreement`](market_agreement_agreement.Agreement) | `undefined` | The agreement that's related to this activity | +| `currentState` | [`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum) | `ActivityStateEnum.New` | The current state as it was obtained from yagna | +| `previousState` | [`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum) | `ActivityStateEnum.Unknown` | The previous state (or New if this is the first time we're creating the activity) | +| `usage` | [`ActivityUsageInfo`](../modules/activity_activity#activityusageinfo) | `undefined` | Current resource usage vector information | -• `Readonly` **agreement**: `Agreement` +#### Returns -Agreement +[`Activity`](activity_activity.Activity) #### Defined in -[src/activity/activity.ts:63](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L63) +[src/activity/activity.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L37) -___ +## Properties -### yagnaApi +### id -• `Protected` `Readonly` **yagnaApi**: [`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi) +• `Readonly` **id**: `string` -[YagnaApi](../modules/utils_yagna_yagna#yagnaapi) +The ID of the activity in Yagna #### Defined in -[src/activity/activity.ts:64](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L64) +[src/activity/activity.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L38) ___ -### options +### agreement -• `Protected` `Readonly` **options**: `ActivityConfig` +• `Readonly` **agreement**: [`Agreement`](market_agreement_agreement.Agreement) -[ActivityOptions](../interfaces/activity_activity.ActivityOptions) +The agreement that's related to this activity #### Defined in -[src/activity/activity.ts:65](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L65) - -## Methods - -### create - -▸ **create**(`agreement`, `yagnaApi`, `options?`, `secure?`): `Promise`\<[`Activity`](activity_activity.Activity)\> - -Create activity for given agreement ID +[src/activity/activity.ts:39](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L39) -#### Parameters - -| Name | Type | Default value | Description | -| :------ | :------ | :------ | :------ | -| `agreement` | `Agreement` | `undefined` | | -| `yagnaApi` | [`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi) | `undefined` | | -| `options?` | [`ActivityOptions`](../interfaces/activity_activity.ActivityOptions) | `undefined` | [ActivityOptions](../interfaces/activity_activity.ActivityOptions) | -| `secure` | `boolean` | `false` | defines if activity will be secure type | +___ -#### Returns +### currentState -`Promise`\<[`Activity`](activity_activity.Activity)\> +• `Protected` `Readonly` **currentState**: [`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum) = `ActivityStateEnum.New` -Activity +The current state as it was obtained from yagna #### Defined in -[src/activity/activity.ts:79](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L79) +[src/activity/activity.ts:40](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L40) ___ -### getProviderInfo +### previousState -▸ **getProviderInfo**(): [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) +• `Protected` `Readonly` **previousState**: [`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum) = `ActivityStateEnum.Unknown` -#### Returns - -[`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) +The previous state (or New if this is the first time we're creating the activity) #### Defined in -[src/activity/activity.ts:89](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L89) +[src/activity/activity.ts:41](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L41) ___ -### execute - -▸ **execute**(`script`, `stream?`, `timeout?`): `Promise`\<`Readable`\> - -Execute script - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `script` | [`ExeScriptRequest`](../interfaces/activity_activity.ExeScriptRequest) | exe script request | -| `stream?` | `boolean` | define type of getting results from execution (polling or streaming) | -| `timeout?` | `number` | execution timeout | +### usage -#### Returns +• `Protected` `Readonly` **usage**: [`ActivityUsageInfo`](../modules/activity_activity#activityusageinfo) -`Promise`\<`Readable`\> +Current resource usage vector information #### Defined in -[src/activity/activity.ts:100](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L100) - -___ +[src/activity/activity.ts:42](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L42) -### stop +## Accessors -▸ **stop**(): `Promise`\<`boolean`\> +### provider -Stop and destroy activity +• `get` **provider**(): [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) #### Returns -`Promise`\<`boolean`\> - -boolean +[`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) #### Defined in -[src/activity/activity.ts:138](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L138) +[src/activity/activity.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L45) -___ +## Methods ### getState -▸ **getState**(): `Promise`\<[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum)\> - -Getting current state of activity +▸ **getState**(): [`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum) #### Returns -`Promise`\<[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum)\> - -state - -**`Throws`** - -Error when cannot query the state +[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum) #### Defined in -[src/activity/activity.ts:150](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L150) +[src/activity/activity.ts:49](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L49) ___ -### send - -▸ **send**(`script`): `Promise`\<`string`\> - -#### Parameters +### getPreviousState -| Name | Type | -| :------ | :------ | -| `script` | [`ExeScriptRequest`](../interfaces/activity_activity.ExeScriptRequest) | +▸ **getPreviousState**(): [`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum) #### Returns -`Promise`\<`string`\> +[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum) #### Defined in -[src/activity/activity.ts:176](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L176) +[src/activity/activity.ts:53](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L53) diff --git a/src/pages/docs/golem-js/reference/classes/activity_activity_module.ActivityModuleImpl.md b/src/pages/docs/golem-js/reference/classes/activity_activity_module.ActivityModuleImpl.md new file mode 100644 index 000000000..edb70ca7d --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_activity_module.ActivityModuleImpl.md @@ -0,0 +1,319 @@ +--- +title: "Class ActivityModuleImpl" +pageTitle: "Class ActivityModuleImpl - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class ActivityModuleImpl within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: ActivityModuleImpl + +[activity/activity.module](../modules/activity_activity_module).ActivityModuleImpl + +## Implements + +- [`ActivityModule`](../interfaces/activity_activity_module.ActivityModule) + +## Table of contents + +### Constructors + +- [constructor](activity_activity_module.ActivityModuleImpl#constructor) + +### Properties + +- [events](activity_activity_module.ActivityModuleImpl#events) + +### Methods + +- [createScriptExecutor](activity_activity_module.ActivityModuleImpl#createscriptexecutor) +- [executeScript](activity_activity_module.ActivityModuleImpl#executescript) +- [getBatchResults](activity_activity_module.ActivityModuleImpl#getbatchresults) +- [observeStreamingBatchEvents](activity_activity_module.ActivityModuleImpl#observestreamingbatchevents) +- [createActivity](activity_activity_module.ActivityModuleImpl#createactivity) +- [destroyActivity](activity_activity_module.ActivityModuleImpl#destroyactivity) +- [refreshActivity](activity_activity_module.ActivityModuleImpl#refreshactivity) +- [findActivityById](activity_activity_module.ActivityModuleImpl#findactivitybyid) +- [createExeUnit](activity_activity_module.ActivityModuleImpl#createexeunit) + +## Constructors + +### constructor + +• **new ActivityModuleImpl**(`services`): [`ActivityModuleImpl`](activity_activity_module.ActivityModuleImpl) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `services` | [`GolemServices`](../modules/golem_network_golem_network#golemservices) | + +#### Returns + +[`ActivityModuleImpl`](activity_activity_module.ActivityModuleImpl) + +#### Defined in + +[src/activity/activity.module.ts:117](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L117) + +## Properties + +### events + +• `Readonly` **events**: `EventEmitter`\<[`ActivityEvents`](../modules/activity_api#activityevents), `any`\> + +#### Implementation of + +[ActivityModule](../interfaces/activity_activity_module.ActivityModule).[events](../interfaces/activity_activity_module.ActivityModule#events) + +#### Defined in + +[src/activity/activity.module.ts:111](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L111) + +## Methods + +### createScriptExecutor + +▸ **createScriptExecutor**(`activity`, `options?`): [`ExeScriptExecutor`](activity_exe_script_executor.ExeScriptExecutor) + +Factory method for creating a script executor for the activity + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](activity_activity.Activity) | +| `options?` | [`ExecutionOptions`](../interfaces/activity_exe_script_executor.ExecutionOptions) | + +#### Returns + +[`ExeScriptExecutor`](activity_exe_script_executor.ExeScriptExecutor) + +#### Implementation of + +[ActivityModule](../interfaces/activity_activity_module.ActivityModule).[createScriptExecutor](../interfaces/activity_activity_module.ActivityModule#createscriptexecutor) + +#### Defined in + +[src/activity/activity.module.ts:121](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L121) + +___ + +### executeScript + +▸ **executeScript**(`activity`, `script`): `Promise`\<`string`\> + +Execute a script on the activity. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](activity_activity.Activity) | +| `script` | [`ExeScriptRequest`](../interfaces/activity_exe_script_executor.ExeScriptRequest) | + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[ActivityModule](../interfaces/activity_activity_module.ActivityModule).[executeScript](../interfaces/activity_activity_module.ActivityModule#executescript) + +#### Defined in + +[src/activity/activity.module.ts:125](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L125) + +___ + +### getBatchResults + +▸ **getBatchResults**(`activity`, `batchId`, `commandIndex?`, `timeout?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>[]\> + +Fetch the results of a batch execution. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](activity_activity.Activity) | +| `batchId` | `string` | +| `commandIndex?` | `number` | +| `timeout?` | `number` | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>[]\> + +#### Implementation of + +[ActivityModule](../interfaces/activity_activity_module.ActivityModule).[getBatchResults](../interfaces/activity_activity_module.ActivityModule#getbatchresults) + +#### Defined in + +[src/activity/activity.module.ts:153](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L153) + +___ + +### observeStreamingBatchEvents + +▸ **observeStreamingBatchEvents**(`activity`, `batchId`, `commandIndex?`): `Observable`\<[`StreamingBatchEvent`](../interfaces/activity_results.StreamingBatchEvent)\> + +Create an observable that will emit events from the streaming batch. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](activity_activity.Activity) | +| `batchId` | `string` | +| `commandIndex?` | `number` | + +#### Returns + +`Observable`\<[`StreamingBatchEvent`](../interfaces/activity_results.StreamingBatchEvent)\> + +#### Implementation of + +[ActivityModule](../interfaces/activity_activity_module.ActivityModule).[observeStreamingBatchEvents](../interfaces/activity_activity_module.ActivityModule#observestreamingbatchevents) + +#### Defined in + +[src/activity/activity.module.ts:185](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L185) + +___ + +### createActivity + +▸ **createActivity**(`agreement`): `Promise`\<[`Activity`](activity_activity.Activity)\> + +Create and start a new activity on the provider for the supplied agreement + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](market_agreement_agreement.Agreement) | + +#### Returns + +`Promise`\<[`Activity`](activity_activity.Activity)\> + +The resulting activity on the provider for further use + +#### Implementation of + +[ActivityModule](../interfaces/activity_activity_module.ActivityModule).[createActivity](../interfaces/activity_activity_module.ActivityModule#createactivity) + +#### Defined in + +[src/activity/activity.module.ts:218](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L218) + +___ + +### destroyActivity + +▸ **destroyActivity**(`activity`): `Promise`\<[`Activity`](activity_activity.Activity)\> + +Definitely terminate any work on the provider + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](activity_activity.Activity) | + +#### Returns + +`Promise`\<[`Activity`](activity_activity.Activity)\> + +The activity that was permanently terminated + +#### Implementation of + +[ActivityModule](../interfaces/activity_activity_module.ActivityModule).[destroyActivity](../interfaces/activity_activity_module.ActivityModule#destroyactivity) + +#### Defined in + +[src/activity/activity.module.ts:233](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L233) + +___ + +### refreshActivity + +▸ **refreshActivity**(`staleActivity`): `Promise`\<[`Activity`](activity_activity.Activity)\> + +Fetches the latest state of the activity. It's recommended to use this method +before performing any actions on the activity to make sure it's in the correct state. +If the fetched activity's state is different from the one you have, an event will be emitted. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `staleActivity` | [`Activity`](activity_activity.Activity) | + +#### Returns + +`Promise`\<[`Activity`](activity_activity.Activity)\> + +#### Implementation of + +[ActivityModule](../interfaces/activity_activity_module.ActivityModule).[refreshActivity](../interfaces/activity_activity_module.ActivityModule#refreshactivity) + +#### Defined in + +[src/activity/activity.module.ts:249](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L249) + +___ + +### findActivityById + +▸ **findActivityById**(`activityId`): `Promise`\<[`Activity`](activity_activity.Activity)\> + +Fetches the activity by its ID from yagna. If the activity doesn't exist, an error will be thrown. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activityId` | `string` | + +#### Returns + +`Promise`\<[`Activity`](activity_activity.Activity)\> + +#### Implementation of + +[ActivityModule](../interfaces/activity_activity_module.ActivityModule).[findActivityById](../interfaces/activity_activity_module.ActivityModule#findactivitybyid) + +#### Defined in + +[src/activity/activity.module.ts:272](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L272) + +___ + +### createExeUnit + +▸ **createExeUnit**(`activity`, `options?`): `Promise`\<[`ExeUnit`](activity_exe_unit_exe_unit.ExeUnit)\> + +Create a exe-unit "within" the activity so that you can perform commands on the rented resources + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](activity_activity.Activity) | +| `options?` | [`ExeUnitOptions`](../interfaces/activity_exe_unit_exe_unit.ExeUnitOptions) | + +#### Returns + +`Promise`\<[`ExeUnit`](activity_exe_unit_exe_unit.ExeUnit)\> + +An ExeUnit that's fully commissioned and the user can execute their commands + +#### Implementation of + +[ActivityModule](../interfaces/activity_activity_module.ActivityModule).[createExeUnit](../interfaces/activity_activity_module.ActivityModule#createexeunit) + +#### Defined in + +[src/activity/activity.module.ts:277](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L277) diff --git a/src/pages/docs/golem-js/reference/classes/activity_exe_script_executor.ExeScriptExecutor.md b/src/pages/docs/golem-js/reference/classes/activity_exe_script_executor.ExeScriptExecutor.md new file mode 100644 index 000000000..1e61b1954 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_exe_script_executor.ExeScriptExecutor.md @@ -0,0 +1,102 @@ +--- +title: "Class ExeScriptExecutor" +pageTitle: "Class ExeScriptExecutor - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class ExeScriptExecutor within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: ExeScriptExecutor + +[activity/exe-script-executor](../modules/activity_exe_script_executor).ExeScriptExecutor + +## Table of contents + +### Constructors + +- [constructor](activity_exe_script_executor.ExeScriptExecutor#constructor) + +### Properties + +- [activity](activity_exe_script_executor.ExeScriptExecutor#activity) + +### Methods + +- [execute](activity_exe_script_executor.ExeScriptExecutor#execute) +- [send](activity_exe_script_executor.ExeScriptExecutor#send) + +## Constructors + +### constructor + +• **new ExeScriptExecutor**(`activity`, `activityModule`, `logger`, `options?`): [`ExeScriptExecutor`](activity_exe_script_executor.ExeScriptExecutor) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](activity_activity.Activity) | +| `activityModule` | [`ActivityModule`](../interfaces/activity_activity_module.ActivityModule) | +| `logger` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | +| `options?` | [`ExecutionOptions`](../interfaces/activity_exe_script_executor.ExecutionOptions) | + +#### Returns + +[`ExeScriptExecutor`](activity_exe_script_executor.ExeScriptExecutor) + +#### Defined in + +[src/activity/exe-script-executor.ts:33](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-script-executor.ts#L33) + +## Properties + +### activity + +• `Readonly` **activity**: [`Activity`](activity_activity.Activity) + +#### Defined in + +[src/activity/exe-script-executor.ts:34](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-script-executor.ts#L34) + +## Methods + +### execute + +▸ **execute**(`script`, `stream?`, `signalOrTimeout?`, `maxRetries?`): `Promise`\<`Readable`\> + +Execute script + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `script` | [`ExeScriptRequest`](../interfaces/activity_exe_script_executor.ExeScriptRequest) | exe script request | +| `stream?` | `boolean` | define type of getting results from execution (polling or streaming) | +| `signalOrTimeout?` | `number` \| `AbortSignal` | the timeout in milliseconds or an AbortSignal that will be used to cancel the execution | +| `maxRetries?` | `number` | maximum number of retries retrieving results when an error occurs, default: 10 | + +#### Returns + +`Promise`\<`Readable`\> + +#### Defined in + +[src/activity/exe-script-executor.ts:51](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-script-executor.ts#L51) + +___ + +### send + +▸ **send**(`script`): `Promise`\<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `script` | [`ExeScriptRequest`](../interfaces/activity_exe_script_executor.ExeScriptRequest) | + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[src/activity/exe-script-executor.ts:98](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-script-executor.ts#L98) diff --git a/src/pages/docs/golem-js/reference/classes/activity_exe_unit_batch.Batch.md b/src/pages/docs/golem-js/reference/classes/activity_exe_unit_batch.Batch.md new file mode 100644 index 000000000..d2dcf3551 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_exe_unit_batch.Batch.md @@ -0,0 +1,224 @@ +--- +title: "Class Batch" +pageTitle: "Class Batch - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Batch within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Batch + +[activity/exe-unit/batch](../modules/activity_exe_unit_batch).Batch + +## Table of contents + +### Constructors + +- [constructor](activity_exe_unit_batch.Batch#constructor) + +### Methods + +- [run](activity_exe_unit_batch.Batch#run) +- [transfer](activity_exe_unit_batch.Batch#transfer) +- [uploadFile](activity_exe_unit_batch.Batch#uploadfile) +- [uploadJson](activity_exe_unit_batch.Batch#uploadjson) +- [uploadData](activity_exe_unit_batch.Batch#uploaddata) +- [downloadFile](activity_exe_unit_batch.Batch#downloadfile) +- [end](activity_exe_unit_batch.Batch#end) +- [endStream](activity_exe_unit_batch.Batch#endstream) + +## Constructors + +### constructor + +• **new Batch**(`executor`, `storageProvider`, `logger`): [`Batch`](activity_exe_unit_batch.Batch) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `executor` | [`ExeScriptExecutor`](activity_exe_script_executor.ExeScriptExecutor) | +| `storageProvider` | [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) | +| `logger` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | + +#### Returns + +[`Batch`](activity_exe_unit_batch.Batch) + +#### Defined in + +[src/activity/exe-unit/batch.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/batch.ts#L13) + +## Methods + +### run + +▸ **run**(`commandLine`): [`Batch`](activity_exe_unit_batch.Batch) + +Execute a command on provider using a shell (/bin/sh). + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `commandLine` | `string` | Shell command to execute. | + +#### Returns + +[`Batch`](activity_exe_unit_batch.Batch) + +#### Defined in + +[src/activity/exe-unit/batch.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/batch.ts#L26) + +▸ **run**(`executable`, `args`): [`Batch`](activity_exe_unit_batch.Batch) + +Execute an executable on provider. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `executable` | `string` | Executable to run. | +| `args` | `string`[] | Executable arguments. | + +#### Returns + +[`Batch`](activity_exe_unit_batch.Batch) + +#### Defined in + +[src/activity/exe-unit/batch.ts:34](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/batch.ts#L34) + +___ + +### transfer + +▸ **transfer**(`from`, `to`): [`Batch`](activity_exe_unit_batch.Batch) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `from` | `string` | +| `to` | `string` | + +#### Returns + +[`Batch`](activity_exe_unit_batch.Batch) + +#### Defined in + +[src/activity/exe-unit/batch.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/batch.ts#L45) + +___ + +### uploadFile + +▸ **uploadFile**(`src`, `dst`): [`Batch`](activity_exe_unit_batch.Batch) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `src` | `string` | +| `dst` | `string` | + +#### Returns + +[`Batch`](activity_exe_unit_batch.Batch) + +#### Defined in + +[src/activity/exe-unit/batch.ts:50](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/batch.ts#L50) + +___ + +### uploadJson + +▸ **uploadJson**(`json`, `dst`): [`Batch`](activity_exe_unit_batch.Batch) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `object` | +| `dst` | `string` | + +#### Returns + +[`Batch`](activity_exe_unit_batch.Batch) + +#### Defined in + +[src/activity/exe-unit/batch.ts:55](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/batch.ts#L55) + +___ + +### uploadData + +▸ **uploadData**(`data`, `dst`): [`Batch`](activity_exe_unit_batch.Batch) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `Uint8Array` | +| `dst` | `string` | + +#### Returns + +[`Batch`](activity_exe_unit_batch.Batch) + +#### Defined in + +[src/activity/exe-unit/batch.ts:61](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/batch.ts#L61) + +___ + +### downloadFile + +▸ **downloadFile**(`src`, `dst`): [`Batch`](activity_exe_unit_batch.Batch) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `src` | `string` | +| `dst` | `string` | + +#### Returns + +[`Batch`](activity_exe_unit_batch.Batch) + +#### Defined in + +[src/activity/exe-unit/batch.ts:66](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/batch.ts#L66) + +___ + +### end + +▸ **end**(): `Promise`\<[`Result`](activity_results.Result)\<`any`\>[]\> + +Executes the batch of commands added via [run](activity_exe_unit_batch.Batch#run) returning result for each of the steps. + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>[]\> + +#### Defined in + +[src/activity/exe-unit/batch.ts:74](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/batch.ts#L74) + +___ + +### endStream + +▸ **endStream**(): `Promise`\<`Readable`\> + +#### Returns + +`Promise`\<`Readable`\> + +#### Defined in + +[src/activity/exe-unit/batch.ts:139](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/batch.ts#L139) diff --git a/src/pages/docs/golem-js/reference/classes/activity_exe_unit_error.GolemWorkError.md b/src/pages/docs/golem-js/reference/classes/activity_exe_unit_error.GolemWorkError.md new file mode 100644 index 000000000..554f4e612 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_exe_unit_error.GolemWorkError.md @@ -0,0 +1,137 @@ +--- +title: "Class GolemWorkError" +pageTitle: "Class GolemWorkError - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class GolemWorkError within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: GolemWorkError + +[activity/exe-unit/error](../modules/activity_exe_unit_error).GolemWorkError + +Module specific errors - Market, Work, Payment. +Each of the major modules will have its own domain specific root error type, +additionally containing an error code specific to a given subdomain + +## Hierarchy + +- [`GolemModuleError`](shared_error_golem_error.GolemModuleError) + + ↳ **`GolemWorkError`** + +## Table of contents + +### Constructors + +- [constructor](activity_exe_unit_error.GolemWorkError#constructor) + +### Properties + +- [code](activity_exe_unit_error.GolemWorkError#code) +- [previous](activity_exe_unit_error.GolemWorkError#previous) + +### Methods + +- [getAgreement](activity_exe_unit_error.GolemWorkError#getagreement) +- [getActivity](activity_exe_unit_error.GolemWorkError#getactivity) +- [getProvider](activity_exe_unit_error.GolemWorkError#getprovider) + +## Constructors + +### constructor + +• **new GolemWorkError**(`message`, `code`, `agreement?`, `activity?`, `provider?`, `previous?`): [`GolemWorkError`](activity_exe_unit_error.GolemWorkError) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `message` | `string` | +| `code` | [`WorkErrorCode`](../enums/activity_exe_unit_error.WorkErrorCode) | +| `agreement?` | [`Agreement`](market_agreement_agreement.Agreement) | +| `activity?` | [`Activity`](activity_activity.Activity) | +| `provider?` | [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) | +| `previous?` | `Error` | + +#### Returns + +[`GolemWorkError`](activity_exe_unit_error.GolemWorkError) + +#### Overrides + +[GolemModuleError](shared_error_golem_error.GolemModuleError).[constructor](shared_error_golem_error.GolemModuleError#constructor) + +#### Defined in + +[src/activity/exe-unit/error.ts:21](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L21) + +## Properties + +### code + +• **code**: [`WorkErrorCode`](../enums/activity_exe_unit_error.WorkErrorCode) + +#### Inherited from + +[GolemModuleError](shared_error_golem_error.GolemModuleError).[code](shared_error_golem_error.GolemModuleError#code) + +#### Defined in + +[src/activity/exe-unit/error.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L23) + +___ + +### previous + +• `Optional` **previous**: `Error` + +The previous error, if any, that led to this error. + +#### Inherited from + +[GolemModuleError](shared_error_golem_error.GolemModuleError).[previous](shared_error_golem_error.GolemModuleError#previous) + +#### Defined in + +[src/activity/exe-unit/error.ts:27](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L27) + +## Methods + +### getAgreement + +▸ **getAgreement**(): `undefined` \| [`Agreement`](market_agreement_agreement.Agreement) + +#### Returns + +`undefined` \| [`Agreement`](market_agreement_agreement.Agreement) + +#### Defined in + +[src/activity/exe-unit/error.ts:34](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L34) + +___ + +### getActivity + +▸ **getActivity**(): `undefined` \| [`Activity`](activity_activity.Activity) + +#### Returns + +`undefined` \| [`Activity`](activity_activity.Activity) + +#### Defined in + +[src/activity/exe-unit/error.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L37) + +___ + +### getProvider + +▸ **getProvider**(): `undefined` \| [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) + +#### Returns + +`undefined` \| [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) + +#### Defined in + +[src/activity/exe-unit/error.ts:40](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L40) diff --git a/src/pages/docs/golem-js/reference/classes/activity_exe_unit_exe_unit.ExeUnit.md b/src/pages/docs/golem-js/reference/classes/activity_exe_unit_exe_unit.ExeUnit.md new file mode 100644 index 000000000..3b97a06c7 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_exe_unit_exe_unit.ExeUnit.md @@ -0,0 +1,454 @@ +--- +title: "Class ExeUnit" +pageTitle: "Class ExeUnit - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class ExeUnit within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: ExeUnit + +[activity/exe-unit/exe-unit](../modules/activity_exe_unit_exe_unit).ExeUnit + +Groups most common operations that the requestors might need to implement their workflows + +## Table of contents + +### Constructors + +- [constructor](activity_exe_unit_exe_unit.ExeUnit#constructor) + +### Properties + +- [provider](activity_exe_unit_exe_unit.ExeUnit#provider) +- [activity](activity_exe_unit_exe_unit.ExeUnit#activity) +- [activityModule](activity_exe_unit_exe_unit.ExeUnit#activitymodule) + +### Methods + +- [setup](activity_exe_unit_exe_unit.ExeUnit#setup) +- [teardown](activity_exe_unit_exe_unit.ExeUnit#teardown) +- [run](activity_exe_unit_exe_unit.ExeUnit#run) +- [runAndStream](activity_exe_unit_exe_unit.ExeUnit#runandstream) +- [transfer](activity_exe_unit_exe_unit.ExeUnit#transfer) +- [uploadFile](activity_exe_unit_exe_unit.ExeUnit#uploadfile) +- [uploadJson](activity_exe_unit_exe_unit.ExeUnit#uploadjson) +- [uploadData](activity_exe_unit_exe_unit.ExeUnit#uploaddata) +- [downloadFile](activity_exe_unit_exe_unit.ExeUnit#downloadfile) +- [downloadData](activity_exe_unit_exe_unit.ExeUnit#downloaddata) +- [downloadJson](activity_exe_unit_exe_unit.ExeUnit#downloadjson) +- [beginBatch](activity_exe_unit_exe_unit.ExeUnit#beginbatch) +- [getWebsocketUri](activity_exe_unit_exe_unit.ExeUnit#getwebsocketuri) +- [getIp](activity_exe_unit_exe_unit.ExeUnit#getip) +- [createTcpProxy](activity_exe_unit_exe_unit.ExeUnit#createtcpproxy) +- [getDto](activity_exe_unit_exe_unit.ExeUnit#getdto) + +## Constructors + +### constructor + +• **new ExeUnit**(`activity`, `activityModule`, `options?`): [`ExeUnit`](activity_exe_unit_exe_unit.ExeUnit) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](activity_activity.Activity) | +| `activityModule` | [`ActivityModule`](../interfaces/activity_activity_module.ActivityModule) | +| `options?` | [`ExeUnitOptions`](../interfaces/activity_exe_unit_exe_unit.ExeUnitOptions) | + +#### Returns + +[`ExeUnit`](activity_exe_unit_exe_unit.ExeUnit) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:74](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L74) + +## Properties + +### provider + +• `Readonly` **provider**: [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:65](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L65) + +___ + +### activity + +• `Readonly` **activity**: [`Activity`](activity_activity.Activity) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:75](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L75) + +___ + +### activityModule + +• `Readonly` **activityModule**: [`ActivityModule`](../interfaces/activity_activity_module.ActivityModule) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:76](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L76) + +## Methods + +### setup + +▸ **setup**(): `Promise`\<`void` \| [`Result`](activity_results.Result)\<`any`\>[]\> + +This function initializes the exe unit by deploying the image to the remote machine +and preparing and running the environment. +This process also includes running setup function if the user has defined it + +#### Returns + +`Promise`\<`void` \| [`Result`](activity_results.Result)\<`any`\>[]\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:117](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L117) + +___ + +### teardown + +▸ **teardown**(): `Promise`\<`void`\> + +This function starts the teardown function if the user has defined it. +It is run before the machine is destroyed. + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:159](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L159) + +___ + +### run + +▸ **run**(`commandLine`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +Execute a command on provider using a shell (/bin/sh). + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `commandLine` | `string` | Shell command to execute. | +| `options?` | [`CommandOptions`](../interfaces/activity_exe_unit_exe_unit.CommandOptions) | Additional run options. | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:234](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L234) + +▸ **run**(`executable`, `args`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +Execute an executable on provider. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `executable` | `string` | Executable to run. | +| `args` | `string`[] | Executable arguments. | +| `options?` | [`CommandOptions`](../interfaces/activity_exe_unit_exe_unit.CommandOptions) | Additional run options. | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:243](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L243) + +___ + +### runAndStream + +▸ **runAndStream**(`commandLine`, `options?`): `Promise`\<[`RemoteProcess`](activity_exe_unit_process.RemoteProcess)\> + +Run an executable on provider and return [RemoteProcess](activity_exe_unit_process.RemoteProcess) that will allow streaming + that contain stdout and stderr as Readable + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `commandLine` | `string` | Shell command to execute. | +| `options?` | `Omit`\<[`CommandOptions`](../interfaces/activity_exe_unit_exe_unit.CommandOptions), ``"capture"``\> | Additional run options. | + +#### Returns + +`Promise`\<[`RemoteProcess`](activity_exe_unit_process.RemoteProcess)\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:267](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L267) + +▸ **runAndStream**(`executable`, `args`, `options?`): `Promise`\<[`RemoteProcess`](activity_exe_unit_process.RemoteProcess)\> + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `executable` | `string` | Executable to run. | +| `args` | `string`[] | Executable arguments. | +| `options?` | [`CommandOptions`](../interfaces/activity_exe_unit_exe_unit.CommandOptions) | Additional run options. | + +#### Returns + +`Promise`\<[`RemoteProcess`](activity_exe_unit_process.RemoteProcess)\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:273](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L273) + +___ + +### transfer + +▸ **transfer**(`from`, `to`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +Generic transfer command, requires the user to provide a publicly readable transfer source + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `from` | `string` | publicly available resource for reading. Supported protocols: file, http, ftp or gftp | +| `to` | `string` | file path | +| `options?` | [`CommandOptions`](../interfaces/activity_exe_unit_exe_unit.CommandOptions) | Additional run options. | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:315](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L315) + +___ + +### uploadFile + +▸ **uploadFile**(`src`, `dst`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `src` | `string` | +| `dst` | `string` | +| `options?` | [`CommandOptions`](../interfaces/activity_exe_unit_exe_unit.CommandOptions) | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:320](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L320) + +___ + +### uploadJson + +▸ **uploadJson**(`json`, `dst`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | +| `dst` | `string` | +| `options?` | [`CommandOptions`](../interfaces/activity_exe_unit_exe_unit.CommandOptions) | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:326](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L326) + +___ + +### uploadData + +▸ **uploadData**(`data`, `dst`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `Uint8Array` | +| `dst` | `string` | +| `options?` | [`CommandOptions`](../interfaces/activity_exe_unit_exe_unit.CommandOptions) | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:332](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L332) + +___ + +### downloadFile + +▸ **downloadFile**(`src`, `dst`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `src` | `string` | +| `dst` | `string` | +| `options?` | [`CommandOptions`](../interfaces/activity_exe_unit_exe_unit.CommandOptions) | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:337](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L337) + +___ + +### downloadData + +▸ **downloadData**(`src`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`Uint8Array`\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `src` | `string` | +| `options?` | [`CommandOptions`](../interfaces/activity_exe_unit_exe_unit.CommandOptions) | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`Uint8Array`\>\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:342](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L342) + +___ + +### downloadJson + +▸ **downloadJson**(`src`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `src` | `string` | +| `options?` | [`CommandOptions`](../interfaces/activity_exe_unit_exe_unit.CommandOptions) | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:347](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L347) + +___ + +### beginBatch + +▸ **beginBatch**(): [`Batch`](activity_exe_unit_batch.Batch) + +#### Returns + +[`Batch`](activity_exe_unit_batch.Batch) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:363](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L363) + +___ + +### getWebsocketUri + +▸ **getWebsocketUri**(`port`): `string` + +Provides a WebSocket URI that allows communicating with a remote process listening on the target port + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `port` | `number` | The port number used by the service running within an activity on the provider | + +#### Returns + +`string` + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:372](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L372) + +___ + +### getIp + +▸ **getIp**(): `string` + +#### Returns + +`string` + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:385](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L385) + +___ + +### createTcpProxy + +▸ **createTcpProxy**(`portOnProvider`): [`TcpProxy`](network_tcpProxy.TcpProxy) + +Creates a new TCP proxy that will allow tunnelling the TPC traffic from the provider via the requestor + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `portOnProvider` | `number` | The port that the service running on the provider is listening to | + +#### Returns + +[`TcpProxy`](network_tcpProxy.TcpProxy) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:402](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L402) + +___ + +### getDto + +▸ **getDto**(): [`ActivityDTO`](../interfaces/activity_exe_unit_exe_unit.ActivityDTO) + +#### Returns + +[`ActivityDTO`](../interfaces/activity_exe_unit_exe_unit.ActivityDTO) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:412](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L412) diff --git a/src/pages/docs/golem-js/reference/classes/task_process.RemoteProcess.md b/src/pages/docs/golem-js/reference/classes/activity_exe_unit_process.RemoteProcess.md similarity index 53% rename from src/pages/docs/golem-js/reference/classes/task_process.RemoteProcess.md rename to src/pages/docs/golem-js/reference/classes/activity_exe_unit_process.RemoteProcess.md index 111b3be07..377ec5ab4 100644 --- a/src/pages/docs/golem-js/reference/classes/task_process.RemoteProcess.md +++ b/src/pages/docs/golem-js/reference/classes/activity_exe_unit_process.RemoteProcess.md @@ -6,45 +6,47 @@ type: "JS API Reference" --- # Class: RemoteProcess -[task/process](../modules/task_process).RemoteProcess +[activity/exe-unit/process](../modules/activity_exe_unit_process).RemoteProcess -RemoteProcess class representing the process spawned on the provider by WorkContext.spawn +RemoteProcess class representing the process spawned on the provider by activity/exe-unit/exeunit.ExeUnit.runAndStream ## Table of contents ### Constructors -- [constructor](task_process.RemoteProcess#constructor) +- [constructor](activity_exe_unit_process.RemoteProcess#constructor) ### Properties -- [stdout](task_process.RemoteProcess#stdout) -- [stderr](task_process.RemoteProcess#stderr) +- [stdout](activity_exe_unit_process.RemoteProcess#stdout) +- [stderr](activity_exe_unit_process.RemoteProcess#stderr) ### Methods -- [waitForExit](task_process.RemoteProcess#waitforexit) +- [waitForExit](activity_exe_unit_process.RemoteProcess#waitforexit) ## Constructors ### constructor -• **new RemoteProcess**(`streamOfActivityResults`, `activity`): [`RemoteProcess`](task_process.RemoteProcess) +• **new RemoteProcess**(`activityModule`, `streamOfActivityResults`, `activity`, `logger`): [`RemoteProcess`](activity_exe_unit_process.RemoteProcess) #### Parameters | Name | Type | | :------ | :------ | +| `activityModule` | [`ActivityModule`](../interfaces/activity_activity_module.ActivityModule) | | `streamOfActivityResults` | `Readable` | | `activity` | [`Activity`](activity_activity.Activity) | +| `logger` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | #### Returns -[`RemoteProcess`](task_process.RemoteProcess) +[`RemoteProcess`](activity_exe_unit_process.RemoteProcess) #### Defined in -[src/task/process.ts:23](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/process.ts#L23) +[src/activity/exe-unit/process.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/process.ts#L28) ## Properties @@ -56,7 +58,7 @@ Stream connected to stdout from provider process #### Defined in -[src/task/process.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/process.ts#L16) +[src/activity/exe-unit/process.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/process.ts#L18) ___ @@ -68,7 +70,7 @@ Stream connected to stderr from provider process #### Defined in -[src/task/process.ts:20](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/process.ts#L20) +[src/activity/exe-unit/process.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/process.ts#L22) ## Methods @@ -91,4 +93,4 @@ If the timeout is reached, the return promise will be rejected. #### Defined in -[src/task/process.ts:39](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/process.ts#L39) +[src/activity/exe-unit/process.ts:46](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/process.ts#L46) diff --git a/src/pages/docs/golem-js/reference/classes/activity_results.Result.md b/src/pages/docs/golem-js/reference/classes/activity_results.Result.md index b31a89a5d..4adea8d45 100644 --- a/src/pages/docs/golem-js/reference/classes/activity_results.Result.md +++ b/src/pages/docs/golem-js/reference/classes/activity_results.Result.md @@ -63,7 +63,7 @@ type: "JS API Reference" #### Defined in -[src/activity/results.ts:40](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L40) +[src/activity/results.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L38) ## Properties @@ -79,7 +79,7 @@ Index of script command #### Defined in -[src/activity/results.ts:31](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L31) +[src/activity/results.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L29) ___ @@ -95,13 +95,13 @@ The datetime of the event on which the result was received #### Defined in -[src/activity/results.ts:32](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L32) +[src/activity/results.ts:30](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L30) ___ ### result -• **result**: `ExeScriptCommandResultResultEnum` +• **result**: ``"Ok"`` \| ``"Error"`` If is success @@ -111,7 +111,7 @@ If is success #### Defined in -[src/activity/results.ts:33](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L33) +[src/activity/results.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L31) ___ @@ -127,7 +127,7 @@ stdout of script command #### Defined in -[src/activity/results.ts:34](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L34) +[src/activity/results.ts:32](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L32) ___ @@ -143,7 +143,7 @@ stderr of script command #### Defined in -[src/activity/results.ts:35](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L35) +[src/activity/results.ts:33](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L33) ___ @@ -159,7 +159,7 @@ an error message if the result is not successful #### Defined in -[src/activity/results.ts:36](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L36) +[src/activity/results.ts:34](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L34) ___ @@ -175,7 +175,7 @@ Is batch of already finished #### Defined in -[src/activity/results.ts:37](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L37) +[src/activity/results.ts:35](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L35) ___ @@ -191,7 +191,7 @@ In case the command was related to upload or download, this will contain the tra #### Defined in -[src/activity/results.ts:38](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L38) +[src/activity/results.ts:36](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L36) ## Methods @@ -213,4 +213,4 @@ Helper method making JSON-like output results more accessible #### Defined in -[src/activity/results.ts:54](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L54) +[src/activity/results.ts:52](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L52) diff --git a/src/pages/docs/golem-js/reference/classes/activity_script_command.Command.md b/src/pages/docs/golem-js/reference/classes/activity_script_command.Command.md new file mode 100644 index 000000000..ce7dd1e06 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_script_command.Command.md @@ -0,0 +1,161 @@ +--- +title: "Class Command" +pageTitle: "Class Command - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Command within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Command\ + +[activity/script/command](../modules/activity_script_command).Command + +Generic command that can be send to an exe-unit via yagna's API + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +## Hierarchy + +- **`Command`** + + ↳ [`Deploy`](activity_script_command.Deploy) + + ↳ [`Start`](activity_script_command.Start) + + ↳ [`Run`](activity_script_command.Run) + + ↳ [`Terminate`](activity_script_command.Terminate) + + ↳ [`Transfer`](activity_script_command.Transfer) + +## Table of contents + +### Constructors + +- [constructor](activity_script_command.Command#constructor) + +### Properties + +- [args](activity_script_command.Command#args) + +### Methods + +- [toJson](activity_script_command.Command#tojson) +- [toExeScriptRequest](activity_script_command.Command#toexescriptrequest) +- [before](activity_script_command.Command#before) +- [after](activity_script_command.Command#after) + +## Constructors + +### constructor + +• **new Command**\<`T`\>(`commandName`, `args?`): [`Command`](activity_script_command.Command)\<`T`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `commandName` | `string` | +| `args?` | `Record`\<`string`, `unknown`\> | + +#### Returns + +[`Command`](activity_script_command.Command)\<`T`\> + +#### Defined in + +[src/activity/script/command.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L18) + +## Properties + +### args + +• `Protected` **args**: `Record`\<`string`, `unknown`\> + +#### Defined in + +[src/activity/script/command.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L16) + +## Methods + +### toJson + +▸ **toJson**(): `Object` + +Serializes the command to a JSON representation + +#### Returns + +`Object` + +#### Defined in + +[src/activity/script/command.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L28) + +___ + +### toExeScriptRequest + +▸ **toExeScriptRequest**(): `ExeScriptRequest` + +Converts the command into + +#### Returns + +`ExeScriptRequest` + +#### Defined in + +[src/activity/script/command.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L37) + +___ + +### before + +▸ **before**(): `Promise`\<`void`\> + +Setup local environment for executing this command. + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/activity/script/command.ts:44](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L44) + +___ + +### after + +▸ **after**(`result?`): `Promise`\<[`Result`](activity_results.Result)\<`T`\>\> + +Cleanup local setup that was needed for the command to run. + +It is called after the command was sent to the activity, and the command was processed. + +When run within scripts or batch commands, after() might be called without any results, as one of the previous +commands might have failed. In this case, the command should still cleanup its local setup and return an empty +error result. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `result?` | [`Result`](activity_results.Result)\<`T`\> | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`T`\>\> + +#### Defined in + +[src/activity/script/command.ts:57](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L57) diff --git a/src/pages/docs/golem-js/reference/classes/activity_script_command.Deploy.md b/src/pages/docs/golem-js/reference/classes/activity_script_command.Deploy.md new file mode 100644 index 000000000..05d821892 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_script_command.Deploy.md @@ -0,0 +1,164 @@ +--- +title: "Class Deploy" +pageTitle: "Class Deploy - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Deploy within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Deploy + +[activity/script/command](../modules/activity_script_command).Deploy + +Generic command that can be send to an exe-unit via yagna's API + +## Hierarchy + +- [`Command`](activity_script_command.Command) + + ↳ **`Deploy`** + +## Table of contents + +### Constructors + +- [constructor](activity_script_command.Deploy#constructor) + +### Properties + +- [args](activity_script_command.Deploy#args) + +### Methods + +- [toJson](activity_script_command.Deploy#tojson) +- [toExeScriptRequest](activity_script_command.Deploy#toexescriptrequest) +- [before](activity_script_command.Deploy#before) +- [after](activity_script_command.Deploy#after) + +## Constructors + +### constructor + +• **new Deploy**(`args?`): [`Deploy`](activity_script_command.Deploy) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `args?` | `Record`\<`string`, `unknown`\> | + +#### Returns + +[`Deploy`](activity_script_command.Deploy) + +#### Overrides + +[Command](activity_script_command.Command).[constructor](activity_script_command.Command#constructor) + +#### Defined in + +[src/activity/script/command.ts:63](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L63) + +## Properties + +### args + +• `Protected` **args**: `Record`\<`string`, `unknown`\> + +#### Inherited from + +[Command](activity_script_command.Command).[args](activity_script_command.Command#args) + +#### Defined in + +[src/activity/script/command.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L16) + +## Methods + +### toJson + +▸ **toJson**(): `Object` + +Serializes the command to a JSON representation + +#### Returns + +`Object` + +#### Inherited from + +[Command](activity_script_command.Command).[toJson](activity_script_command.Command#tojson) + +#### Defined in + +[src/activity/script/command.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L28) + +___ + +### toExeScriptRequest + +▸ **toExeScriptRequest**(): `ExeScriptRequest` + +Converts the command into + +#### Returns + +`ExeScriptRequest` + +#### Inherited from + +[Command](activity_script_command.Command).[toExeScriptRequest](activity_script_command.Command#toexescriptrequest) + +#### Defined in + +[src/activity/script/command.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L37) + +___ + +### before + +▸ **before**(): `Promise`\<`void`\> + +Setup local environment for executing this command. + +#### Returns + +`Promise`\<`void`\> + +#### Inherited from + +[Command](activity_script_command.Command).[before](activity_script_command.Command#before) + +#### Defined in + +[src/activity/script/command.ts:44](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L44) + +___ + +### after + +▸ **after**(`result?`): `Promise`\<[`Result`](activity_results.Result)\<`unknown`\>\> + +Cleanup local setup that was needed for the command to run. + +It is called after the command was sent to the activity, and the command was processed. + +When run within scripts or batch commands, after() might be called without any results, as one of the previous +commands might have failed. In this case, the command should still cleanup its local setup and return an empty +error result. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `result?` | [`Result`](activity_results.Result)\<`unknown`\> | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`unknown`\>\> + +#### Inherited from + +[Command](activity_script_command.Command).[after](activity_script_command.Command#after) + +#### Defined in + +[src/activity/script/command.ts:57](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L57) diff --git a/src/pages/docs/golem-js/reference/classes/activity_script_command.DownloadData.md b/src/pages/docs/golem-js/reference/classes/activity_script_command.DownloadData.md new file mode 100644 index 000000000..43f7306f2 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_script_command.DownloadData.md @@ -0,0 +1,195 @@ +--- +title: "Class DownloadData" +pageTitle: "Class DownloadData - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class DownloadData within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: DownloadData + +[activity/script/command](../modules/activity_script_command).DownloadData + +Generic command that can be send to an exe-unit via yagna's API + +## Hierarchy + +- [`Transfer`](activity_script_command.Transfer)\<`Uint8Array`\> + + ↳ **`DownloadData`** + +## Table of contents + +### Constructors + +- [constructor](activity_script_command.DownloadData#constructor) + +### Properties + +- [from](activity_script_command.DownloadData#from) +- [to](activity_script_command.DownloadData#to) +- [args](activity_script_command.DownloadData#args) + +### Methods + +- [before](activity_script_command.DownloadData#before) +- [after](activity_script_command.DownloadData#after) +- [toJson](activity_script_command.DownloadData#tojson) +- [toExeScriptRequest](activity_script_command.DownloadData#toexescriptrequest) + +## Constructors + +### constructor + +• **new DownloadData**(`storageProvider`, `srcPath`): [`DownloadData`](activity_script_command.DownloadData) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storageProvider` | [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) | +| `srcPath` | `string` | + +#### Returns + +[`DownloadData`](activity_script_command.DownloadData) + +#### Overrides + +[Transfer](activity_script_command.Transfer).[constructor](activity_script_command.Transfer#constructor) + +#### Defined in + +[src/activity/script/command.ts:181](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L181) + +## Properties + +### from + +• `Protected` `Optional` **from**: `string` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[from](activity_script_command.Transfer#from) + +#### Defined in + +[src/activity/script/command.ts:110](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L110) + +___ + +### to + +• `Protected` `Optional` **to**: `string` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[to](activity_script_command.Transfer#to) + +#### Defined in + +[src/activity/script/command.ts:111](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L111) + +___ + +### args + +• `Protected` **args**: `Record`\<`string`, `unknown`\> + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[args](activity_script_command.Transfer#args) + +#### Defined in + +[src/activity/script/command.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L16) + +## Methods + +### before + +▸ **before**(): `Promise`\<`void`\> + +Setup local environment for executing this command. + +#### Returns + +`Promise`\<`void`\> + +#### Overrides + +[Transfer](activity_script_command.Transfer).[before](activity_script_command.Transfer#before) + +#### Defined in + +[src/activity/script/command.ts:189](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L189) + +___ + +### after + +▸ **after**(`result`): `Promise`\<[`Result`](activity_results.Result)\<`Uint8Array`\>\> + +Cleanup local setup that was needed for the command to run. + +It is called after the command was sent to the activity, and the command was processed. + +When run within scripts or batch commands, after() might be called without any results, as one of the previous +commands might have failed. In this case, the command should still cleanup its local setup and return an empty +error result. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `result` | [`Result`](activity_results.Result)\<`any`\> | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`Uint8Array`\>\> + +#### Overrides + +[Transfer](activity_script_command.Transfer).[after](activity_script_command.Transfer#after) + +#### Defined in + +[src/activity/script/command.ts:196](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L196) + +___ + +### toJson + +▸ **toJson**(): `Object` + +Serializes the command to a JSON representation + +#### Returns + +`Object` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[toJson](activity_script_command.Transfer#tojson) + +#### Defined in + +[src/activity/script/command.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L28) + +___ + +### toExeScriptRequest + +▸ **toExeScriptRequest**(): `ExeScriptRequest` + +Converts the command into + +#### Returns + +`ExeScriptRequest` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[toExeScriptRequest](activity_script_command.Transfer#toexescriptrequest) + +#### Defined in + +[src/activity/script/command.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L37) diff --git a/src/pages/docs/golem-js/reference/classes/activity_script_command.DownloadFile.md b/src/pages/docs/golem-js/reference/classes/activity_script_command.DownloadFile.md new file mode 100644 index 000000000..798e72c30 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_script_command.DownloadFile.md @@ -0,0 +1,196 @@ +--- +title: "Class DownloadFile" +pageTitle: "Class DownloadFile - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class DownloadFile within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: DownloadFile + +[activity/script/command](../modules/activity_script_command).DownloadFile + +Generic command that can be send to an exe-unit via yagna's API + +## Hierarchy + +- [`Transfer`](activity_script_command.Transfer) + + ↳ **`DownloadFile`** + +## Table of contents + +### Constructors + +- [constructor](activity_script_command.DownloadFile#constructor) + +### Properties + +- [from](activity_script_command.DownloadFile#from) +- [to](activity_script_command.DownloadFile#to) +- [args](activity_script_command.DownloadFile#args) + +### Methods + +- [before](activity_script_command.DownloadFile#before) +- [after](activity_script_command.DownloadFile#after) +- [toJson](activity_script_command.DownloadFile#tojson) +- [toExeScriptRequest](activity_script_command.DownloadFile#toexescriptrequest) + +## Constructors + +### constructor + +• **new DownloadFile**(`storageProvider`, `srcPath`, `dstPath`): [`DownloadFile`](activity_script_command.DownloadFile) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storageProvider` | [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) | +| `srcPath` | `string` | +| `dstPath` | `string` | + +#### Returns + +[`DownloadFile`](activity_script_command.DownloadFile) + +#### Overrides + +[Transfer](activity_script_command.Transfer).[constructor](activity_script_command.Transfer#constructor) + +#### Defined in + +[src/activity/script/command.ts:159](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L159) + +## Properties + +### from + +• `Protected` `Optional` **from**: `string` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[from](activity_script_command.Transfer#from) + +#### Defined in + +[src/activity/script/command.ts:110](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L110) + +___ + +### to + +• `Protected` `Optional` **to**: `string` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[to](activity_script_command.Transfer#to) + +#### Defined in + +[src/activity/script/command.ts:111](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L111) + +___ + +### args + +• `Protected` **args**: `Record`\<`string`, `unknown`\> + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[args](activity_script_command.Transfer#args) + +#### Defined in + +[src/activity/script/command.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L16) + +## Methods + +### before + +▸ **before**(): `Promise`\<`void`\> + +Setup local environment for executing this command. + +#### Returns + +`Promise`\<`void`\> + +#### Overrides + +[Transfer](activity_script_command.Transfer).[before](activity_script_command.Transfer#before) + +#### Defined in + +[src/activity/script/command.ts:168](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L168) + +___ + +### after + +▸ **after**(`result`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +Cleanup local setup that was needed for the command to run. + +It is called after the command was sent to the activity, and the command was processed. + +When run within scripts or batch commands, after() might be called without any results, as one of the previous +commands might have failed. In this case, the command should still cleanup its local setup and return an empty +error result. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `result` | [`Result`](activity_results.Result)\<`any`\> | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Overrides + +[Transfer](activity_script_command.Transfer).[after](activity_script_command.Transfer#after) + +#### Defined in + +[src/activity/script/command.ts:172](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L172) + +___ + +### toJson + +▸ **toJson**(): `Object` + +Serializes the command to a JSON representation + +#### Returns + +`Object` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[toJson](activity_script_command.Transfer#tojson) + +#### Defined in + +[src/activity/script/command.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L28) + +___ + +### toExeScriptRequest + +▸ **toExeScriptRequest**(): `ExeScriptRequest` + +Converts the command into + +#### Returns + +`ExeScriptRequest` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[toExeScriptRequest](activity_script_command.Transfer#toexescriptrequest) + +#### Defined in + +[src/activity/script/command.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L37) diff --git a/src/pages/docs/golem-js/reference/classes/activity_script_command.Run.md b/src/pages/docs/golem-js/reference/classes/activity_script_command.Run.md new file mode 100644 index 000000000..e6cdf9b22 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_script_command.Run.md @@ -0,0 +1,167 @@ +--- +title: "Class Run" +pageTitle: "Class Run - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Run within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Run + +[activity/script/command](../modules/activity_script_command).Run + +Generic command that can be send to an exe-unit via yagna's API + +## Hierarchy + +- [`Command`](activity_script_command.Command) + + ↳ **`Run`** + +## Table of contents + +### Constructors + +- [constructor](activity_script_command.Run#constructor) + +### Properties + +- [args](activity_script_command.Run#args) + +### Methods + +- [toJson](activity_script_command.Run#tojson) +- [toExeScriptRequest](activity_script_command.Run#toexescriptrequest) +- [before](activity_script_command.Run#before) +- [after](activity_script_command.Run#after) + +## Constructors + +### constructor + +• **new Run**(`cmd`, `args?`, `env?`, `capture?`): [`Run`](activity_script_command.Run) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `cmd` | `string` | +| `args?` | ``null`` \| `string`[] | +| `env?` | ``null`` \| `object` | +| `capture?` | [`Capture`](../modules/activity_script_command#capture) | + +#### Returns + +[`Run`](activity_script_command.Run) + +#### Overrides + +[Command](activity_script_command.Command).[constructor](activity_script_command.Command#constructor) + +#### Defined in + +[src/activity/script/command.ts:88](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L88) + +## Properties + +### args + +• `Protected` **args**: `Record`\<`string`, `unknown`\> + +#### Inherited from + +[Command](activity_script_command.Command).[args](activity_script_command.Command#args) + +#### Defined in + +[src/activity/script/command.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L16) + +## Methods + +### toJson + +▸ **toJson**(): `Object` + +Serializes the command to a JSON representation + +#### Returns + +`Object` + +#### Inherited from + +[Command](activity_script_command.Command).[toJson](activity_script_command.Command#tojson) + +#### Defined in + +[src/activity/script/command.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L28) + +___ + +### toExeScriptRequest + +▸ **toExeScriptRequest**(): `ExeScriptRequest` + +Converts the command into + +#### Returns + +`ExeScriptRequest` + +#### Inherited from + +[Command](activity_script_command.Command).[toExeScriptRequest](activity_script_command.Command#toexescriptrequest) + +#### Defined in + +[src/activity/script/command.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L37) + +___ + +### before + +▸ **before**(): `Promise`\<`void`\> + +Setup local environment for executing this command. + +#### Returns + +`Promise`\<`void`\> + +#### Inherited from + +[Command](activity_script_command.Command).[before](activity_script_command.Command#before) + +#### Defined in + +[src/activity/script/command.ts:44](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L44) + +___ + +### after + +▸ **after**(`result?`): `Promise`\<[`Result`](activity_results.Result)\<`unknown`\>\> + +Cleanup local setup that was needed for the command to run. + +It is called after the command was sent to the activity, and the command was processed. + +When run within scripts or batch commands, after() might be called without any results, as one of the previous +commands might have failed. In this case, the command should still cleanup its local setup and return an empty +error result. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `result?` | [`Result`](activity_results.Result)\<`unknown`\> | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`unknown`\>\> + +#### Inherited from + +[Command](activity_script_command.Command).[after](activity_script_command.Command#after) + +#### Defined in + +[src/activity/script/command.ts:57](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L57) diff --git a/src/pages/docs/golem-js/reference/classes/activity_script_command.Start.md b/src/pages/docs/golem-js/reference/classes/activity_script_command.Start.md new file mode 100644 index 000000000..18986b8ed --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_script_command.Start.md @@ -0,0 +1,164 @@ +--- +title: "Class Start" +pageTitle: "Class Start - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Start within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Start + +[activity/script/command](../modules/activity_script_command).Start + +Generic command that can be send to an exe-unit via yagna's API + +## Hierarchy + +- [`Command`](activity_script_command.Command) + + ↳ **`Start`** + +## Table of contents + +### Constructors + +- [constructor](activity_script_command.Start#constructor) + +### Properties + +- [args](activity_script_command.Start#args) + +### Methods + +- [toJson](activity_script_command.Start#tojson) +- [toExeScriptRequest](activity_script_command.Start#toexescriptrequest) +- [before](activity_script_command.Start#before) +- [after](activity_script_command.Start#after) + +## Constructors + +### constructor + +• **new Start**(`args?`): [`Start`](activity_script_command.Start) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `args?` | `Record`\<`string`, `unknown`\> | + +#### Returns + +[`Start`](activity_script_command.Start) + +#### Overrides + +[Command](activity_script_command.Command).[constructor](activity_script_command.Command#constructor) + +#### Defined in + +[src/activity/script/command.ts:69](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L69) + +## Properties + +### args + +• `Protected` **args**: `Record`\<`string`, `unknown`\> + +#### Inherited from + +[Command](activity_script_command.Command).[args](activity_script_command.Command#args) + +#### Defined in + +[src/activity/script/command.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L16) + +## Methods + +### toJson + +▸ **toJson**(): `Object` + +Serializes the command to a JSON representation + +#### Returns + +`Object` + +#### Inherited from + +[Command](activity_script_command.Command).[toJson](activity_script_command.Command#tojson) + +#### Defined in + +[src/activity/script/command.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L28) + +___ + +### toExeScriptRequest + +▸ **toExeScriptRequest**(): `ExeScriptRequest` + +Converts the command into + +#### Returns + +`ExeScriptRequest` + +#### Inherited from + +[Command](activity_script_command.Command).[toExeScriptRequest](activity_script_command.Command#toexescriptrequest) + +#### Defined in + +[src/activity/script/command.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L37) + +___ + +### before + +▸ **before**(): `Promise`\<`void`\> + +Setup local environment for executing this command. + +#### Returns + +`Promise`\<`void`\> + +#### Inherited from + +[Command](activity_script_command.Command).[before](activity_script_command.Command#before) + +#### Defined in + +[src/activity/script/command.ts:44](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L44) + +___ + +### after + +▸ **after**(`result?`): `Promise`\<[`Result`](activity_results.Result)\<`unknown`\>\> + +Cleanup local setup that was needed for the command to run. + +It is called after the command was sent to the activity, and the command was processed. + +When run within scripts or batch commands, after() might be called without any results, as one of the previous +commands might have failed. In this case, the command should still cleanup its local setup and return an empty +error result. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `result?` | [`Result`](activity_results.Result)\<`unknown`\> | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`unknown`\>\> + +#### Inherited from + +[Command](activity_script_command.Command).[after](activity_script_command.Command#after) + +#### Defined in + +[src/activity/script/command.ts:57](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L57) diff --git a/src/pages/docs/golem-js/reference/classes/activity_script_command.Terminate.md b/src/pages/docs/golem-js/reference/classes/activity_script_command.Terminate.md new file mode 100644 index 000000000..e851ae3f6 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_script_command.Terminate.md @@ -0,0 +1,164 @@ +--- +title: "Class Terminate" +pageTitle: "Class Terminate - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Terminate within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Terminate + +[activity/script/command](../modules/activity_script_command).Terminate + +Generic command that can be send to an exe-unit via yagna's API + +## Hierarchy + +- [`Command`](activity_script_command.Command) + + ↳ **`Terminate`** + +## Table of contents + +### Constructors + +- [constructor](activity_script_command.Terminate#constructor) + +### Properties + +- [args](activity_script_command.Terminate#args) + +### Methods + +- [toJson](activity_script_command.Terminate#tojson) +- [toExeScriptRequest](activity_script_command.Terminate#toexescriptrequest) +- [before](activity_script_command.Terminate#before) +- [after](activity_script_command.Terminate#after) + +## Constructors + +### constructor + +• **new Terminate**(`args?`): [`Terminate`](activity_script_command.Terminate) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `args?` | `Record`\<`string`, `unknown`\> | + +#### Returns + +[`Terminate`](activity_script_command.Terminate) + +#### Overrides + +[Command](activity_script_command.Command).[constructor](activity_script_command.Command#constructor) + +#### Defined in + +[src/activity/script/command.ts:103](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L103) + +## Properties + +### args + +• `Protected` **args**: `Record`\<`string`, `unknown`\> + +#### Inherited from + +[Command](activity_script_command.Command).[args](activity_script_command.Command#args) + +#### Defined in + +[src/activity/script/command.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L16) + +## Methods + +### toJson + +▸ **toJson**(): `Object` + +Serializes the command to a JSON representation + +#### Returns + +`Object` + +#### Inherited from + +[Command](activity_script_command.Command).[toJson](activity_script_command.Command#tojson) + +#### Defined in + +[src/activity/script/command.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L28) + +___ + +### toExeScriptRequest + +▸ **toExeScriptRequest**(): `ExeScriptRequest` + +Converts the command into + +#### Returns + +`ExeScriptRequest` + +#### Inherited from + +[Command](activity_script_command.Command).[toExeScriptRequest](activity_script_command.Command#toexescriptrequest) + +#### Defined in + +[src/activity/script/command.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L37) + +___ + +### before + +▸ **before**(): `Promise`\<`void`\> + +Setup local environment for executing this command. + +#### Returns + +`Promise`\<`void`\> + +#### Inherited from + +[Command](activity_script_command.Command).[before](activity_script_command.Command#before) + +#### Defined in + +[src/activity/script/command.ts:44](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L44) + +___ + +### after + +▸ **after**(`result?`): `Promise`\<[`Result`](activity_results.Result)\<`unknown`\>\> + +Cleanup local setup that was needed for the command to run. + +It is called after the command was sent to the activity, and the command was processed. + +When run within scripts or batch commands, after() might be called without any results, as one of the previous +commands might have failed. In this case, the command should still cleanup its local setup and return an empty +error result. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `result?` | [`Result`](activity_results.Result)\<`unknown`\> | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`unknown`\>\> + +#### Inherited from + +[Command](activity_script_command.Command).[after](activity_script_command.Command#after) + +#### Defined in + +[src/activity/script/command.ts:57](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L57) diff --git a/src/pages/docs/golem-js/reference/classes/activity_script_command.Transfer.md b/src/pages/docs/golem-js/reference/classes/activity_script_command.Transfer.md new file mode 100644 index 000000000..1140676cb --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_script_command.Transfer.md @@ -0,0 +1,208 @@ +--- +title: "Class Transfer" +pageTitle: "Class Transfer - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Transfer within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Transfer\ + +[activity/script/command](../modules/activity_script_command).Transfer + +Generic command that can be send to an exe-unit via yagna's API + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +## Hierarchy + +- [`Command`](activity_script_command.Command)\<`T`\> + + ↳ **`Transfer`** + + ↳↳ [`UploadFile`](activity_script_command.UploadFile) + + ↳↳ [`UploadData`](activity_script_command.UploadData) + + ↳↳ [`DownloadFile`](activity_script_command.DownloadFile) + + ↳↳ [`DownloadData`](activity_script_command.DownloadData) + +## Table of contents + +### Constructors + +- [constructor](activity_script_command.Transfer#constructor) + +### Properties + +- [from](activity_script_command.Transfer#from) +- [to](activity_script_command.Transfer#to) +- [args](activity_script_command.Transfer#args) + +### Methods + +- [toJson](activity_script_command.Transfer#tojson) +- [toExeScriptRequest](activity_script_command.Transfer#toexescriptrequest) +- [before](activity_script_command.Transfer#before) +- [after](activity_script_command.Transfer#after) + +## Constructors + +### constructor + +• **new Transfer**\<`T`\>(`from?`, `to?`, `args?`): [`Transfer`](activity_script_command.Transfer)\<`T`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `from?` | `string` | +| `to?` | `string` | +| `args?` | `object` | + +#### Returns + +[`Transfer`](activity_script_command.Transfer)\<`T`\> + +#### Overrides + +[Command](activity_script_command.Command).[constructor](activity_script_command.Command#constructor) + +#### Defined in + +[src/activity/script/command.ts:109](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L109) + +## Properties + +### from + +• `Protected` `Optional` **from**: `string` + +#### Defined in + +[src/activity/script/command.ts:110](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L110) + +___ + +### to + +• `Protected` `Optional` **to**: `string` + +#### Defined in + +[src/activity/script/command.ts:111](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L111) + +___ + +### args + +• `Protected` **args**: `Record`\<`string`, `unknown`\> + +#### Inherited from + +[Command](activity_script_command.Command).[args](activity_script_command.Command#args) + +#### Defined in + +[src/activity/script/command.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L16) + +## Methods + +### toJson + +▸ **toJson**(): `Object` + +Serializes the command to a JSON representation + +#### Returns + +`Object` + +#### Inherited from + +[Command](activity_script_command.Command).[toJson](activity_script_command.Command#tojson) + +#### Defined in + +[src/activity/script/command.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L28) + +___ + +### toExeScriptRequest + +▸ **toExeScriptRequest**(): `ExeScriptRequest` + +Converts the command into + +#### Returns + +`ExeScriptRequest` + +#### Inherited from + +[Command](activity_script_command.Command).[toExeScriptRequest](activity_script_command.Command#toexescriptrequest) + +#### Defined in + +[src/activity/script/command.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L37) + +___ + +### before + +▸ **before**(): `Promise`\<`void`\> + +Setup local environment for executing this command. + +#### Returns + +`Promise`\<`void`\> + +#### Inherited from + +[Command](activity_script_command.Command).[before](activity_script_command.Command#before) + +#### Defined in + +[src/activity/script/command.ts:44](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L44) + +___ + +### after + +▸ **after**(`result?`): `Promise`\<[`Result`](activity_results.Result)\<`T`\>\> + +Cleanup local setup that was needed for the command to run. + +It is called after the command was sent to the activity, and the command was processed. + +When run within scripts or batch commands, after() might be called without any results, as one of the previous +commands might have failed. In this case, the command should still cleanup its local setup and return an empty +error result. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `result?` | [`Result`](activity_results.Result)\<`T`\> | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`T`\>\> + +#### Inherited from + +[Command](activity_script_command.Command).[after](activity_script_command.Command#after) + +#### Defined in + +[src/activity/script/command.ts:57](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L57) diff --git a/src/pages/docs/golem-js/reference/classes/activity_script_command.UploadData.md b/src/pages/docs/golem-js/reference/classes/activity_script_command.UploadData.md new file mode 100644 index 000000000..50a43e2eb --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_script_command.UploadData.md @@ -0,0 +1,196 @@ +--- +title: "Class UploadData" +pageTitle: "Class UploadData - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class UploadData within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: UploadData + +[activity/script/command](../modules/activity_script_command).UploadData + +Generic command that can be send to an exe-unit via yagna's API + +## Hierarchy + +- [`Transfer`](activity_script_command.Transfer) + + ↳ **`UploadData`** + +## Table of contents + +### Constructors + +- [constructor](activity_script_command.UploadData#constructor) + +### Properties + +- [from](activity_script_command.UploadData#from) +- [to](activity_script_command.UploadData#to) +- [args](activity_script_command.UploadData#args) + +### Methods + +- [before](activity_script_command.UploadData#before) +- [after](activity_script_command.UploadData#after) +- [toJson](activity_script_command.UploadData#tojson) +- [toExeScriptRequest](activity_script_command.UploadData#toexescriptrequest) + +## Constructors + +### constructor + +• **new UploadData**(`storageProvider`, `src`, `dstPath`): [`UploadData`](activity_script_command.UploadData) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storageProvider` | [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) | +| `src` | `Uint8Array` | +| `dstPath` | `string` | + +#### Returns + +[`UploadData`](activity_script_command.UploadData) + +#### Overrides + +[Transfer](activity_script_command.Transfer).[constructor](activity_script_command.Transfer#constructor) + +#### Defined in + +[src/activity/script/command.ts:139](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L139) + +## Properties + +### from + +• `Protected` `Optional` **from**: `string` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[from](activity_script_command.Transfer#from) + +#### Defined in + +[src/activity/script/command.ts:110](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L110) + +___ + +### to + +• `Protected` `Optional` **to**: `string` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[to](activity_script_command.Transfer#to) + +#### Defined in + +[src/activity/script/command.ts:111](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L111) + +___ + +### args + +• `Protected` **args**: `Record`\<`string`, `unknown`\> + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[args](activity_script_command.Transfer#args) + +#### Defined in + +[src/activity/script/command.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L16) + +## Methods + +### before + +▸ **before**(): `Promise`\<`void`\> + +Setup local environment for executing this command. + +#### Returns + +`Promise`\<`void`\> + +#### Overrides + +[Transfer](activity_script_command.Transfer).[before](activity_script_command.Transfer#before) + +#### Defined in + +[src/activity/script/command.ts:148](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L148) + +___ + +### after + +▸ **after**(`result`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +Cleanup local setup that was needed for the command to run. + +It is called after the command was sent to the activity, and the command was processed. + +When run within scripts or batch commands, after() might be called without any results, as one of the previous +commands might have failed. In this case, the command should still cleanup its local setup and return an empty +error result. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `result` | [`Result`](activity_results.Result)\<`any`\> | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Overrides + +[Transfer](activity_script_command.Transfer).[after](activity_script_command.Transfer#after) + +#### Defined in + +[src/activity/script/command.ts:152](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L152) + +___ + +### toJson + +▸ **toJson**(): `Object` + +Serializes the command to a JSON representation + +#### Returns + +`Object` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[toJson](activity_script_command.Transfer#tojson) + +#### Defined in + +[src/activity/script/command.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L28) + +___ + +### toExeScriptRequest + +▸ **toExeScriptRequest**(): `ExeScriptRequest` + +Converts the command into + +#### Returns + +`ExeScriptRequest` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[toExeScriptRequest](activity_script_command.Transfer#toexescriptrequest) + +#### Defined in + +[src/activity/script/command.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L37) diff --git a/src/pages/docs/golem-js/reference/classes/activity_script_command.UploadFile.md b/src/pages/docs/golem-js/reference/classes/activity_script_command.UploadFile.md new file mode 100644 index 000000000..4c1604c72 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_script_command.UploadFile.md @@ -0,0 +1,196 @@ +--- +title: "Class UploadFile" +pageTitle: "Class UploadFile - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class UploadFile within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: UploadFile + +[activity/script/command](../modules/activity_script_command).UploadFile + +Generic command that can be send to an exe-unit via yagna's API + +## Hierarchy + +- [`Transfer`](activity_script_command.Transfer) + + ↳ **`UploadFile`** + +## Table of contents + +### Constructors + +- [constructor](activity_script_command.UploadFile#constructor) + +### Properties + +- [from](activity_script_command.UploadFile#from) +- [to](activity_script_command.UploadFile#to) +- [args](activity_script_command.UploadFile#args) + +### Methods + +- [before](activity_script_command.UploadFile#before) +- [after](activity_script_command.UploadFile#after) +- [toJson](activity_script_command.UploadFile#tojson) +- [toExeScriptRequest](activity_script_command.UploadFile#toexescriptrequest) + +## Constructors + +### constructor + +• **new UploadFile**(`storageProvider`, `src`, `dstPath`): [`UploadFile`](activity_script_command.UploadFile) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storageProvider` | [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) | +| `src` | `string` | +| `dstPath` | `string` | + +#### Returns + +[`UploadFile`](activity_script_command.UploadFile) + +#### Overrides + +[Transfer](activity_script_command.Transfer).[constructor](activity_script_command.Transfer#constructor) + +#### Defined in + +[src/activity/script/command.ts:119](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L119) + +## Properties + +### from + +• `Protected` `Optional` **from**: `string` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[from](activity_script_command.Transfer#from) + +#### Defined in + +[src/activity/script/command.ts:110](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L110) + +___ + +### to + +• `Protected` `Optional` **to**: `string` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[to](activity_script_command.Transfer#to) + +#### Defined in + +[src/activity/script/command.ts:111](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L111) + +___ + +### args + +• `Protected` **args**: `Record`\<`string`, `unknown`\> + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[args](activity_script_command.Transfer#args) + +#### Defined in + +[src/activity/script/command.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L16) + +## Methods + +### before + +▸ **before**(): `Promise`\<`void`\> + +Setup local environment for executing this command. + +#### Returns + +`Promise`\<`void`\> + +#### Overrides + +[Transfer](activity_script_command.Transfer).[before](activity_script_command.Transfer#before) + +#### Defined in + +[src/activity/script/command.ts:128](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L128) + +___ + +### after + +▸ **after**(`result`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +Cleanup local setup that was needed for the command to run. + +It is called after the command was sent to the activity, and the command was processed. + +When run within scripts or batch commands, after() might be called without any results, as one of the previous +commands might have failed. In this case, the command should still cleanup its local setup and return an empty +error result. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `result` | [`Result`](activity_results.Result)\<`any`\> | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> + +#### Overrides + +[Transfer](activity_script_command.Transfer).[after](activity_script_command.Transfer#after) + +#### Defined in + +[src/activity/script/command.ts:132](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L132) + +___ + +### toJson + +▸ **toJson**(): `Object` + +Serializes the command to a JSON representation + +#### Returns + +`Object` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[toJson](activity_script_command.Transfer#tojson) + +#### Defined in + +[src/activity/script/command.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L28) + +___ + +### toExeScriptRequest + +▸ **toExeScriptRequest**(): `ExeScriptRequest` + +Converts the command into + +#### Returns + +`ExeScriptRequest` + +#### Inherited from + +[Transfer](activity_script_command.Transfer).[toExeScriptRequest](activity_script_command.Transfer#toexescriptrequest) + +#### Defined in + +[src/activity/script/command.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L37) diff --git a/src/pages/docs/golem-js/reference/classes/activity_script_script.Script.md b/src/pages/docs/golem-js/reference/classes/activity_script_script.Script.md new file mode 100644 index 000000000..cf5abbeee --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/activity_script_script.Script.md @@ -0,0 +1,133 @@ +--- +title: "Class Script" +pageTitle: "Class Script - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Script within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Script + +[activity/script/script](../modules/activity_script_script).Script + +Represents a series of Commands that can be sent to exe-unit via yagna's API + +## Table of contents + +### Constructors + +- [constructor](activity_script_script.Script#constructor) + +### Methods + +- [create](activity_script_script.Script#create) +- [add](activity_script_script.Script#add) +- [before](activity_script_script.Script#before) +- [after](activity_script_script.Script#after) +- [getExeScriptRequest](activity_script_script.Script#getexescriptrequest) + +## Constructors + +### constructor + +• **new Script**(`commands?`): [`Script`](activity_script_script.Script) + +#### Parameters + +| Name | Type | Default value | +| :------ | :------ | :------ | +| `commands` | [`Command`](activity_script_command.Command)\<`unknown`\>[] | `[]` | + +#### Returns + +[`Script`](activity_script_script.Script) + +#### Defined in + +[src/activity/script/script.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/script.ts#L10) + +## Methods + +### create + +▸ **create**(`commands?`): [`Script`](activity_script_script.Script) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `commands?` | [`Command`](activity_script_command.Command)\<`unknown`\>[] | + +#### Returns + +[`Script`](activity_script_script.Script) + +#### Defined in + +[src/activity/script/script.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/script.ts#L12) + +___ + +### add + +▸ **add**(`command`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `command` | [`Command`](activity_script_command.Command)\<`unknown`\> | + +#### Returns + +`void` + +#### Defined in + +[src/activity/script/script.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/script.ts#L16) + +___ + +### before + +▸ **before**(): `Promise`\<`void`\> + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/activity/script/script.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/script.ts#L20) + +___ + +### after + +▸ **after**(`results`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>[]\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `results` | [`Result`](activity_results.Result)\<`any`\>[] | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>[]\> + +#### Defined in + +[src/activity/script/script.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/script.ts#L24) + +___ + +### getExeScriptRequest + +▸ **getExeScriptRequest**(): `ExeScriptRequest` + +#### Returns + +`ExeScriptRequest` + +#### Defined in + +[src/activity/script/script.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/script.ts#L29) diff --git a/src/pages/docs/golem-js/reference/classes/agreement_service.AgreementCandidate.md b/src/pages/docs/golem-js/reference/classes/agreement_service.AgreementCandidate.md deleted file mode 100644 index a76eacbce..000000000 --- a/src/pages/docs/golem-js/reference/classes/agreement_service.AgreementCandidate.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: "Class AgreementCandidate" -pageTitle: "Class AgreementCandidate - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class AgreementCandidate within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: AgreementCandidate - -[agreement/service](../modules/agreement_service).AgreementCandidate - -## Table of contents - -### Constructors - -- [constructor](agreement_service.AgreementCandidate#constructor) - -### Properties - -- [agreement](agreement_service.AgreementCandidate#agreement) -- [proposal](agreement_service.AgreementCandidate#proposal) - -## Constructors - -### constructor - -• **new AgreementCandidate**(`proposal`): [`AgreementCandidate`](agreement_service.AgreementCandidate) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `proposal` | [`Proposal`](market_proposal.Proposal) | - -#### Returns - -[`AgreementCandidate`](agreement_service.AgreementCandidate) - -#### Defined in - -[src/agreement/service.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L15) - -## Properties - -### agreement - -• `Optional` **agreement**: [`AgreementDTO`](../interfaces/agreement_service.AgreementDTO) - -#### Defined in - -[src/agreement/service.ts:14](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L14) - -___ - -### proposal - -• `Readonly` **proposal**: [`Proposal`](market_proposal.Proposal) - -#### Defined in - -[src/agreement/service.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L15) diff --git a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemError.md b/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemError.md deleted file mode 100644 index 1943f9a20..000000000 --- a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemError.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: "Class GolemError" -pageTitle: "Class GolemError - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class GolemError within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: GolemError - -[error/golem-error](../modules/error_golem_error).GolemError - -Base class for all errors directly thrown by Golem SDK. - -## Hierarchy - -- `Error` - - ↳ **`GolemError`** - - ↳↳ [`GolemUserError`](error_golem_error.GolemUserError) - - ↳↳ [`GolemInternalError`](error_golem_error.GolemInternalError) - - ↳↳ [`GolemPlatformError`](error_golem_error.GolemPlatformError) - - ↳↳ [`GolemTimeoutError`](error_golem_error.GolemTimeoutError) - - ↳↳ [`GolemModuleError`](error_golem_error.GolemModuleError) - -## Table of contents - -### Constructors - -- [constructor](error_golem_error.GolemError#constructor) - -### Properties - -- [previous](error_golem_error.GolemError#previous) - -## Constructors - -### constructor - -• **new GolemError**(`message`, `previous?`): [`GolemError`](error_golem_error.GolemError) - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `message` | `string` | - | -| `previous?` | `Error` | The previous error, if any, that led to this error. | - -#### Returns - -[`GolemError`](error_golem_error.GolemError) - -#### Overrides - -Error.constructor - -#### Defined in - -[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5) - -## Properties - -### previous - -• `Optional` `Readonly` **previous**: `Error` - -The previous error, if any, that led to this error. - -#### Defined in - -[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L10) diff --git a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemModuleError.md b/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemModuleError.md deleted file mode 100644 index a74e73764..000000000 --- a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemModuleError.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: "Class GolemModuleError" -pageTitle: "Class GolemModuleError - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class GolemModuleError within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: GolemModuleError - -[error/golem-error](../modules/error_golem_error).GolemModuleError - -Module specific errors - Market, Work, Payment. -Each of the major modules will have its own domain specific root error type, -additionally containing an error code specific to a given subdomain - -## Hierarchy - -- [`GolemError`](error_golem_error.GolemError) - - ↳ **`GolemModuleError`** - - ↳↳ [`GolemMarketError`](market_error.GolemMarketError) - - ↳↳ [`GolemNetworkError`](network_error.GolemNetworkError) - - ↳↳ [`GolemPaymentError`](payment_error.GolemPaymentError) - - ↳↳ [`GolemWorkError`](task_error.GolemWorkError) - -## Table of contents - -### Constructors - -- [constructor](error_golem_error.GolemModuleError#constructor) - -### Properties - -- [code](error_golem_error.GolemModuleError#code) -- [previous](error_golem_error.GolemModuleError#previous) - -## Constructors - -### constructor - -• **new GolemModuleError**(`message`, `code`, `previous?`): [`GolemModuleError`](error_golem_error.GolemModuleError) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `message` | `string` | -| `code` | `number` | -| `previous?` | `Error` | - -#### Returns - -[`GolemModuleError`](error_golem_error.GolemModuleError) - -#### Overrides - -[GolemError](error_golem_error.GolemError).[constructor](error_golem_error.GolemError#constructor) - -#### Defined in - -[src/error/golem-error.ts:64](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L64) - -## Properties - -### code - -• **code**: `number` - -#### Defined in - -[src/error/golem-error.ts:66](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L66) - -___ - -### previous - -• `Optional` `Readonly` **previous**: `Error` - -The previous error, if any, that led to this error. - -#### Inherited from - -[GolemError](error_golem_error.GolemError).[previous](error_golem_error.GolemError#previous) - -#### Defined in - -[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L10) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.ActivityCreated.md b/src/pages/docs/golem-js/reference/classes/events_events.ActivityCreated.md deleted file mode 100644 index 4f16d3b99..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.ActivityCreated.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "Class ActivityCreated" -pageTitle: "Class ActivityCreated - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ActivityCreated within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ActivityCreated - -[events/events](../modules/events_events).ActivityCreated - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `agreementId`: `string` }\> - - ↳ **`ActivityCreated`** - -## Table of contents - -### Constructors - -- [constructor](events_events.ActivityCreated#constructor) - -### Properties - -- [detail](events_events.ActivityCreated#detail) -- [name](events_events.ActivityCreated#name) -- [timestamp](events_events.ActivityCreated#timestamp) - -## Constructors - -### constructor - -• **new ActivityCreated**(`data`): [`ActivityCreated`](events_events.ActivityCreated) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.agreementId` | `string` | - -#### Returns - -[`ActivityCreated`](events_events.ActivityCreated) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `agreementId` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.ActivityDestroyed.md b/src/pages/docs/golem-js/reference/classes/events_events.ActivityDestroyed.md deleted file mode 100644 index 6b41440b3..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.ActivityDestroyed.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "Class ActivityDestroyed" -pageTitle: "Class ActivityDestroyed - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ActivityDestroyed within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ActivityDestroyed - -[events/events](../modules/events_events).ActivityDestroyed - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `agreementId`: `string` }\> - - ↳ **`ActivityDestroyed`** - -## Table of contents - -### Constructors - -- [constructor](events_events.ActivityDestroyed#constructor) - -### Properties - -- [detail](events_events.ActivityDestroyed#detail) -- [name](events_events.ActivityDestroyed#name) -- [timestamp](events_events.ActivityDestroyed#timestamp) - -## Constructors - -### constructor - -• **new ActivityDestroyed**(`data`): [`ActivityDestroyed`](events_events.ActivityDestroyed) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.agreementId` | `string` | - -#### Returns - -[`ActivityDestroyed`](events_events.ActivityDestroyed) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `agreementId` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.ActivityStateChanged.md b/src/pages/docs/golem-js/reference/classes/events_events.ActivityStateChanged.md deleted file mode 100644 index 18dcd3930..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.ActivityStateChanged.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "Class ActivityStateChanged" -pageTitle: "Class ActivityStateChanged - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ActivityStateChanged within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ActivityStateChanged - -[events/events](../modules/events_events).ActivityStateChanged - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `state`: `string` }\> - - ↳ **`ActivityStateChanged`** - -## Table of contents - -### Constructors - -- [constructor](events_events.ActivityStateChanged#constructor) - -### Properties - -- [detail](events_events.ActivityStateChanged#detail) -- [name](events_events.ActivityStateChanged#name) -- [timestamp](events_events.ActivityStateChanged#timestamp) - -## Constructors - -### constructor - -• **new ActivityStateChanged**(`data`): [`ActivityStateChanged`](events_events.ActivityStateChanged) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.state` | `string` | - -#### Returns - -[`ActivityStateChanged`](events_events.ActivityStateChanged) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `state` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.AgreementConfirmed.md b/src/pages/docs/golem-js/reference/classes/events_events.AgreementConfirmed.md deleted file mode 100644 index 0163e8199..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.AgreementConfirmed.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "Class AgreementConfirmed" -pageTitle: "Class AgreementConfirmed - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class AgreementConfirmed within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: AgreementConfirmed - -[events/events](../modules/events_events).AgreementConfirmed - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `provider`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) }\> - - ↳ **`AgreementConfirmed`** - -## Table of contents - -### Constructors - -- [constructor](events_events.AgreementConfirmed#constructor) - -### Properties - -- [detail](events_events.AgreementConfirmed#detail) -- [name](events_events.AgreementConfirmed#name) -- [timestamp](events_events.AgreementConfirmed#timestamp) - -## Constructors - -### constructor - -• **new AgreementConfirmed**(`data`): [`AgreementConfirmed`](events_events.AgreementConfirmed) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - -#### Returns - -[`AgreementConfirmed`](events_events.AgreementConfirmed) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.AgreementCreated.md b/src/pages/docs/golem-js/reference/classes/events_events.AgreementCreated.md deleted file mode 100644 index e3cedec68..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.AgreementCreated.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "Class AgreementCreated" -pageTitle: "Class AgreementCreated - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class AgreementCreated within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: AgreementCreated - -[events/events](../modules/events_events).AgreementCreated - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `provider`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) ; `proposalId`: `string` ; `validTo?`: `string` }\> - - ↳ **`AgreementCreated`** - -## Table of contents - -### Constructors - -- [constructor](events_events.AgreementCreated#constructor) - -### Properties - -- [detail](events_events.AgreementCreated#detail) -- [name](events_events.AgreementCreated#name) -- [timestamp](events_events.AgreementCreated#timestamp) - -## Constructors - -### constructor - -• **new AgreementCreated**(`data`): [`AgreementCreated`](events_events.AgreementCreated) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `data.proposalId` | `string` | -| `data.validTo?` | `string` | - -#### Returns - -[`AgreementCreated`](events_events.AgreementCreated) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `proposalId` | `string` | -| `validTo?` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.AgreementRejected.md b/src/pages/docs/golem-js/reference/classes/events_events.AgreementRejected.md deleted file mode 100644 index fe4945a01..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.AgreementRejected.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: "Class AgreementRejected" -pageTitle: "Class AgreementRejected - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class AgreementRejected within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: AgreementRejected - -[events/events](../modules/events_events).AgreementRejected - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `provider`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) ; `reason?`: `string` }\> - - ↳ **`AgreementRejected`** - -## Table of contents - -### Constructors - -- [constructor](events_events.AgreementRejected#constructor) - -### Properties - -- [detail](events_events.AgreementRejected#detail) -- [name](events_events.AgreementRejected#name) -- [timestamp](events_events.AgreementRejected#timestamp) - -## Constructors - -### constructor - -• **new AgreementRejected**(`data`): [`AgreementRejected`](events_events.AgreementRejected) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `data.reason?` | `string` | - -#### Returns - -[`AgreementRejected`](events_events.AgreementRejected) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `reason?` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.AgreementTerminated.md b/src/pages/docs/golem-js/reference/classes/events_events.AgreementTerminated.md deleted file mode 100644 index bad11f24d..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.AgreementTerminated.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: "Class AgreementTerminated" -pageTitle: "Class AgreementTerminated - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class AgreementTerminated within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: AgreementTerminated - -[events/events](../modules/events_events).AgreementTerminated - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `provider`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) ; `reason?`: `string` }\> - - ↳ **`AgreementTerminated`** - -## Table of contents - -### Constructors - -- [constructor](events_events.AgreementTerminated#constructor) - -### Properties - -- [detail](events_events.AgreementTerminated#detail) -- [name](events_events.AgreementTerminated#name) -- [timestamp](events_events.AgreementTerminated#timestamp) - -## Constructors - -### constructor - -• **new AgreementTerminated**(`data`): [`AgreementTerminated`](events_events.AgreementTerminated) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `data.reason?` | `string` | - -#### Returns - -[`AgreementTerminated`](events_events.AgreementTerminated) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `reason?` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.AllocationCreated.md b/src/pages/docs/golem-js/reference/classes/events_events.AllocationCreated.md deleted file mode 100644 index e5cfcf422..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.AllocationCreated.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: "Class AllocationCreated" -pageTitle: "Class AllocationCreated - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class AllocationCreated within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: AllocationCreated - -[events/events](../modules/events_events).AllocationCreated - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `amount`: `number` ; `platform?`: `string` }\> - - ↳ **`AllocationCreated`** - -## Table of contents - -### Constructors - -- [constructor](events_events.AllocationCreated#constructor) - -### Properties - -- [detail](events_events.AllocationCreated#detail) -- [name](events_events.AllocationCreated#name) -- [timestamp](events_events.AllocationCreated#timestamp) - -## Constructors - -### constructor - -• **new AllocationCreated**(`data`): [`AllocationCreated`](events_events.AllocationCreated) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.amount` | `number` | -| `data.platform?` | `string` | - -#### Returns - -[`AllocationCreated`](events_events.AllocationCreated) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `amount` | `number` | -| `platform?` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.BaseEvent.md b/src/pages/docs/golem-js/reference/classes/events_events.BaseEvent.md deleted file mode 100644 index 96360b46f..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.BaseEvent.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: "Class BaseEvent" -pageTitle: "Class BaseEvent - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class BaseEvent within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: BaseEvent\ - -[events/events](../modules/events_events).BaseEvent - -## Type parameters - -| Name | -| :------ | -| `DataType` | - -## Hierarchy - -- `CustomEvent`\<`DataType`\> - - ↳ **`BaseEvent`** - - ↳↳ [`ComputationStarted`](events_events.ComputationStarted) - - ↳↳ [`ComputationFinished`](events_events.ComputationFinished) - - ↳↳ [`ComputationFailed`](events_events.ComputationFailed) - - ↳↳ [`TaskStarted`](events_events.TaskStarted) - - ↳↳ [`TaskRedone`](events_events.TaskRedone) - - ↳↳ [`TaskRejected`](events_events.TaskRejected) - - ↳↳ [`TaskFinished`](events_events.TaskFinished) - - ↳↳ [`AllocationCreated`](events_events.AllocationCreated) - - ↳↳ [`DemandSubscribed`](events_events.DemandSubscribed) - - ↳↳ [`DemandFailed`](events_events.DemandFailed) - - ↳↳ [`DemandUnsubscribed`](events_events.DemandUnsubscribed) - - ↳↳ [`CollectFailed`](events_events.CollectFailed) - - ↳↳ [`ProposalReceived`](events_events.ProposalReceived) - - ↳↳ [`ProposalRejected`](events_events.ProposalRejected) - - ↳↳ [`ProposalResponded`](events_events.ProposalResponded) - - ↳↳ [`ProposalFailed`](events_events.ProposalFailed) - - ↳↳ [`ProposalConfirmed`](events_events.ProposalConfirmed) - - ↳↳ [`PackageCreated`](events_events.PackageCreated) - - ↳↳ [`AgreementCreated`](events_events.AgreementCreated) - - ↳↳ [`AgreementConfirmed`](events_events.AgreementConfirmed) - - ↳↳ [`AgreementRejected`](events_events.AgreementRejected) - - ↳↳ [`AgreementTerminated`](events_events.AgreementTerminated) - - ↳↳ [`InvoiceReceived`](events_events.InvoiceReceived) - - ↳↳ [`DebitNoteReceived`](events_events.DebitNoteReceived) - - ↳↳ [`PaymentAccepted`](events_events.PaymentAccepted) - - ↳↳ [`DebitNoteAccepted`](events_events.DebitNoteAccepted) - - ↳↳ [`PaymentFailed`](events_events.PaymentFailed) - - ↳↳ [`ActivityCreated`](events_events.ActivityCreated) - - ↳↳ [`ActivityDestroyed`](events_events.ActivityDestroyed) - - ↳↳ [`ActivityStateChanged`](events_events.ActivityStateChanged) - - ↳↳ [`ScriptSent`](events_events.ScriptSent) - - ↳↳ [`ScriptExecuted`](events_events.ScriptExecuted) - -## Table of contents - -### Constructors - -- [constructor](events_events.BaseEvent#constructor) - -### Properties - -- [detail](events_events.BaseEvent#detail) -- [name](events_events.BaseEvent#name) -- [timestamp](events_events.BaseEvent#timestamp) - -## Constructors - -### constructor - -• **new BaseEvent**\<`DataType`\>(`data`): [`BaseEvent`](events_events.BaseEvent)\<`DataType`\> - -#### Type parameters - -| Name | -| :------ | -| `DataType` | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `DataType` | - -#### Returns - -[`BaseEvent`](events_events.BaseEvent)\<`DataType`\> - -#### Overrides - -CustomEvent\<DataType\>.constructor - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `DataType` - -#### Inherited from - -CustomEvent.detail - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -CustomEvent.name - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -CustomEvent.timestamp - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.CollectFailed.md b/src/pages/docs/golem-js/reference/classes/events_events.CollectFailed.md deleted file mode 100644 index 5c7211012..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.CollectFailed.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "Class CollectFailed" -pageTitle: "Class CollectFailed - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class CollectFailed within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: CollectFailed - -[events/events](../modules/events_events).CollectFailed - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `reason?`: `string` }\> - - ↳ **`CollectFailed`** - -## Table of contents - -### Constructors - -- [constructor](events_events.CollectFailed#constructor) - -### Properties - -- [detail](events_events.CollectFailed#detail) -- [name](events_events.CollectFailed#name) -- [timestamp](events_events.CollectFailed#timestamp) - -## Constructors - -### constructor - -• **new CollectFailed**(`data`): [`CollectFailed`](events_events.CollectFailed) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.reason?` | `string` | - -#### Returns - -[`CollectFailed`](events_events.CollectFailed) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `reason?` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.ComputationFailed.md b/src/pages/docs/golem-js/reference/classes/events_events.ComputationFailed.md deleted file mode 100644 index fec35efce..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.ComputationFailed.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: "Class ComputationFailed" -pageTitle: "Class ComputationFailed - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ComputationFailed within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ComputationFailed - -[events/events](../modules/events_events).ComputationFailed - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `reason?`: `string` }\> - - ↳ **`ComputationFailed`** - -## Table of contents - -### Constructors - -- [constructor](events_events.ComputationFailed#constructor) - -### Properties - -- [detail](events_events.ComputationFailed#detail) -- [name](events_events.ComputationFailed#name) -- [timestamp](events_events.ComputationFailed#timestamp) - -## Constructors - -### constructor - -• **new ComputationFailed**(`data`): [`ComputationFailed`](events_events.ComputationFailed) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.reason?` | `string` | - -#### Returns - -[`ComputationFailed`](events_events.ComputationFailed) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `reason?` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.ComputationFinished.md b/src/pages/docs/golem-js/reference/classes/events_events.ComputationFinished.md deleted file mode 100644 index 2aea1386b..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.ComputationFinished.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "Class ComputationFinished" -pageTitle: "Class ComputationFinished - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ComputationFinished within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ComputationFinished - -[events/events](../modules/events_events).ComputationFinished - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<`undefined`\> - - ↳ **`ComputationFinished`** - -## Table of contents - -### Constructors - -- [constructor](events_events.ComputationFinished#constructor) - -### Properties - -- [detail](events_events.ComputationFinished#detail) -- [name](events_events.ComputationFinished#name) -- [timestamp](events_events.ComputationFinished#timestamp) - -## Constructors - -### constructor - -• **new ComputationFinished**(): [`ComputationFinished`](events_events.ComputationFinished) - -#### Returns - -[`ComputationFinished`](events_events.ComputationFinished) - -#### Overrides - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:40](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L40) - -## Properties - -### detail - -• `Readonly` **detail**: `undefined` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.ComputationStarted.md b/src/pages/docs/golem-js/reference/classes/events_events.ComputationStarted.md deleted file mode 100644 index cb405b42b..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.ComputationStarted.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "Class ComputationStarted" -pageTitle: "Class ComputationStarted - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ComputationStarted within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ComputationStarted - -[events/events](../modules/events_events).ComputationStarted - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<`undefined`\> - - ↳ **`ComputationStarted`** - -## Table of contents - -### Constructors - -- [constructor](events_events.ComputationStarted#constructor) - -### Properties - -- [detail](events_events.ComputationStarted#detail) -- [name](events_events.ComputationStarted#name) -- [timestamp](events_events.ComputationStarted#timestamp) - -## Constructors - -### constructor - -• **new ComputationStarted**(): [`ComputationStarted`](events_events.ComputationStarted) - -#### Returns - -[`ComputationStarted`](events_events.ComputationStarted) - -#### Overrides - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:35](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L35) - -## Properties - -### detail - -• `Readonly` **detail**: `undefined` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.DebitNoteAccepted.md b/src/pages/docs/golem-js/reference/classes/events_events.DebitNoteAccepted.md deleted file mode 100644 index 05e2fa2dd..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.DebitNoteAccepted.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "Class DebitNoteAccepted" -pageTitle: "Class DebitNoteAccepted - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class DebitNoteAccepted within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: DebitNoteAccepted - -[events/events](../modules/events_events).DebitNoteAccepted - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `agreementId`: `string` ; `amount`: `number` ; `provider`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) }\> - - ↳ **`DebitNoteAccepted`** - -## Table of contents - -### Constructors - -- [constructor](events_events.DebitNoteAccepted#constructor) - -### Properties - -- [detail](events_events.DebitNoteAccepted#detail) -- [name](events_events.DebitNoteAccepted#name) -- [timestamp](events_events.DebitNoteAccepted#timestamp) - -## Constructors - -### constructor - -• **new DebitNoteAccepted**(`data`): [`DebitNoteAccepted`](events_events.DebitNoteAccepted) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.agreementId` | `string` | -| `data.amount` | `number` | -| `data.provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - -#### Returns - -[`DebitNoteAccepted`](events_events.DebitNoteAccepted) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `agreementId` | `string` | -| `amount` | `number` | -| `provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.DebitNoteReceived.md b/src/pages/docs/golem-js/reference/classes/events_events.DebitNoteReceived.md deleted file mode 100644 index ad769479f..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.DebitNoteReceived.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: "Class DebitNoteReceived" -pageTitle: "Class DebitNoteReceived - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class DebitNoteReceived within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: DebitNoteReceived - -[events/events](../modules/events_events).DebitNoteReceived - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `agreementId`: `string` ; `activityId`: `string` ; `amount`: `number` ; `provider`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) }\> - - ↳ **`DebitNoteReceived`** - -## Table of contents - -### Constructors - -- [constructor](events_events.DebitNoteReceived#constructor) - -### Properties - -- [detail](events_events.DebitNoteReceived#detail) -- [name](events_events.DebitNoteReceived#name) -- [timestamp](events_events.DebitNoteReceived#timestamp) - -## Constructors - -### constructor - -• **new DebitNoteReceived**(`data`): [`DebitNoteReceived`](events_events.DebitNoteReceived) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.agreementId` | `string` | -| `data.activityId` | `string` | -| `data.amount` | `number` | -| `data.provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - -#### Returns - -[`DebitNoteReceived`](events_events.DebitNoteReceived) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `agreementId` | `string` | -| `activityId` | `string` | -| `amount` | `number` | -| `provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.DemandFailed.md b/src/pages/docs/golem-js/reference/classes/events_events.DemandFailed.md deleted file mode 100644 index 6b34ea3be..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.DemandFailed.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: "Class DemandFailed" -pageTitle: "Class DemandFailed - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class DemandFailed within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: DemandFailed - -[events/events](../modules/events_events).DemandFailed - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `reason?`: `string` }\> - - ↳ **`DemandFailed`** - -## Table of contents - -### Constructors - -- [constructor](events_events.DemandFailed#constructor) - -### Properties - -- [detail](events_events.DemandFailed#detail) -- [name](events_events.DemandFailed#name) -- [timestamp](events_events.DemandFailed#timestamp) - -## Constructors - -### constructor - -• **new DemandFailed**(`data`): [`DemandFailed`](events_events.DemandFailed) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.reason?` | `string` | - -#### Returns - -[`DemandFailed`](events_events.DemandFailed) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `reason?` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.DemandSubscribed.md b/src/pages/docs/golem-js/reference/classes/events_events.DemandSubscribed.md deleted file mode 100644 index 186a12d48..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.DemandSubscribed.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "Class DemandSubscribed" -pageTitle: "Class DemandSubscribed - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class DemandSubscribed within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: DemandSubscribed - -[events/events](../modules/events_events).DemandSubscribed - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `details`: [`DemandDetails`](../interfaces/market_demand.DemandDetails) }\> - - ↳ **`DemandSubscribed`** - -## Table of contents - -### Constructors - -- [constructor](events_events.DemandSubscribed#constructor) - -### Properties - -- [detail](events_events.DemandSubscribed#detail) -- [name](events_events.DemandSubscribed#name) -- [timestamp](events_events.DemandSubscribed#timestamp) - -## Constructors - -### constructor - -• **new DemandSubscribed**(`data`): [`DemandSubscribed`](events_events.DemandSubscribed) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.details` | [`DemandDetails`](../interfaces/market_demand.DemandDetails) | - -#### Returns - -[`DemandSubscribed`](events_events.DemandSubscribed) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `details` | [`DemandDetails`](../interfaces/market_demand.DemandDetails) | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.DemandUnsubscribed.md b/src/pages/docs/golem-js/reference/classes/events_events.DemandUnsubscribed.md deleted file mode 100644 index 79f5f6eda..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.DemandUnsubscribed.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: "Class DemandUnsubscribed" -pageTitle: "Class DemandUnsubscribed - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class DemandUnsubscribed within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: DemandUnsubscribed - -[events/events](../modules/events_events).DemandUnsubscribed - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` }\> - - ↳ **`DemandUnsubscribed`** - -## Table of contents - -### Constructors - -- [constructor](events_events.DemandUnsubscribed#constructor) - -### Properties - -- [detail](events_events.DemandUnsubscribed#detail) -- [name](events_events.DemandUnsubscribed#name) -- [timestamp](events_events.DemandUnsubscribed#timestamp) - -## Constructors - -### constructor - -• **new DemandUnsubscribed**(`data`): [`DemandUnsubscribed`](events_events.DemandUnsubscribed) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | - -#### Returns - -[`DemandUnsubscribed`](events_events.DemandUnsubscribed) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.InvoiceReceived.md b/src/pages/docs/golem-js/reference/classes/events_events.InvoiceReceived.md deleted file mode 100644 index 52819f74b..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.InvoiceReceived.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "Class InvoiceReceived" -pageTitle: "Class InvoiceReceived - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class InvoiceReceived within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: InvoiceReceived - -[events/events](../modules/events_events).InvoiceReceived - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `provider`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) ; `agreementId`: `string` ; `amount`: `number` }\> - - ↳ **`InvoiceReceived`** - -## Table of contents - -### Constructors - -- [constructor](events_events.InvoiceReceived#constructor) - -### Properties - -- [detail](events_events.InvoiceReceived#detail) -- [name](events_events.InvoiceReceived#name) -- [timestamp](events_events.InvoiceReceived#timestamp) - -## Constructors - -### constructor - -• **new InvoiceReceived**(`data`): [`InvoiceReceived`](events_events.InvoiceReceived) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `data.agreementId` | `string` | -| `data.amount` | `number` | - -#### Returns - -[`InvoiceReceived`](events_events.InvoiceReceived) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `agreementId` | `string` | -| `amount` | `number` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.PackageCreated.md b/src/pages/docs/golem-js/reference/classes/events_events.PackageCreated.md deleted file mode 100644 index 609a42a84..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.PackageCreated.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "Class PackageCreated" -pageTitle: "Class PackageCreated - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class PackageCreated within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: PackageCreated - -[events/events](../modules/events_events).PackageCreated - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `packageReference`: [`RequireAtLeastOne`](../modules/utils_types#requireatleastone)\<\{ `imageHash`: `string` ; `imageTag`: `string` ; `manifest`: `string` }\> ; `details`: [`PackageDetails`](../interfaces/package_package.PackageDetails) }\> - - ↳ **`PackageCreated`** - -## Table of contents - -### Constructors - -- [constructor](events_events.PackageCreated#constructor) - -### Properties - -- [detail](events_events.PackageCreated#detail) -- [name](events_events.PackageCreated#name) -- [timestamp](events_events.PackageCreated#timestamp) - -## Constructors - -### constructor - -• **new PackageCreated**(`data`): [`PackageCreated`](events_events.PackageCreated) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.packageReference` | [`RequireAtLeastOne`](../modules/utils_types#requireatleastone)\<\{ `imageHash`: `string` ; `imageTag`: `string` ; `manifest`: `string` }\> | -| `data.details` | [`PackageDetails`](../interfaces/package_package.PackageDetails) | - -#### Returns - -[`PackageCreated`](events_events.PackageCreated) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `packageReference` | [`RequireAtLeastOne`](../modules/utils_types#requireatleastone)\<\{ `imageHash`: `string` ; `imageTag`: `string` ; `manifest`: `string` }\> | -| `details` | [`PackageDetails`](../interfaces/package_package.PackageDetails) | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.PaymentAccepted.md b/src/pages/docs/golem-js/reference/classes/events_events.PaymentAccepted.md deleted file mode 100644 index 3983313ba..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.PaymentAccepted.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "Class PaymentAccepted" -pageTitle: "Class PaymentAccepted - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class PaymentAccepted within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: PaymentAccepted - -[events/events](../modules/events_events).PaymentAccepted - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `agreementId`: `string` ; `amount`: `number` ; `provider`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) }\> - - ↳ **`PaymentAccepted`** - -## Table of contents - -### Constructors - -- [constructor](events_events.PaymentAccepted#constructor) - -### Properties - -- [detail](events_events.PaymentAccepted#detail) -- [name](events_events.PaymentAccepted#name) -- [timestamp](events_events.PaymentAccepted#timestamp) - -## Constructors - -### constructor - -• **new PaymentAccepted**(`data`): [`PaymentAccepted`](events_events.PaymentAccepted) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.agreementId` | `string` | -| `data.amount` | `number` | -| `data.provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - -#### Returns - -[`PaymentAccepted`](events_events.PaymentAccepted) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `agreementId` | `string` | -| `amount` | `number` | -| `provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.PaymentFailed.md b/src/pages/docs/golem-js/reference/classes/events_events.PaymentFailed.md deleted file mode 100644 index e3c1d6155..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.PaymentFailed.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: "Class PaymentFailed" -pageTitle: "Class PaymentFailed - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class PaymentFailed within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: PaymentFailed - -[events/events](../modules/events_events).PaymentFailed - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `agreementId`: `string` ; `reason?`: `string` }\> - - ↳ **`PaymentFailed`** - -## Table of contents - -### Constructors - -- [constructor](events_events.PaymentFailed#constructor) - -### Properties - -- [detail](events_events.PaymentFailed#detail) -- [name](events_events.PaymentFailed#name) -- [timestamp](events_events.PaymentFailed#timestamp) - -## Constructors - -### constructor - -• **new PaymentFailed**(`data`): [`PaymentFailed`](events_events.PaymentFailed) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.agreementId` | `string` | -| `data.reason?` | `string` | - -#### Returns - -[`PaymentFailed`](events_events.PaymentFailed) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `agreementId` | `string` | -| `reason?` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.ProposalConfirmed.md b/src/pages/docs/golem-js/reference/classes/events_events.ProposalConfirmed.md deleted file mode 100644 index 010025115..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.ProposalConfirmed.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "Class ProposalConfirmed" -pageTitle: "Class ProposalConfirmed - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ProposalConfirmed within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ProposalConfirmed - -[events/events](../modules/events_events).ProposalConfirmed - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `provider`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) }\> - - ↳ **`ProposalConfirmed`** - -## Table of contents - -### Constructors - -- [constructor](events_events.ProposalConfirmed#constructor) - -### Properties - -- [detail](events_events.ProposalConfirmed#detail) -- [name](events_events.ProposalConfirmed#name) -- [timestamp](events_events.ProposalConfirmed#timestamp) - -## Constructors - -### constructor - -• **new ProposalConfirmed**(`data`): [`ProposalConfirmed`](events_events.ProposalConfirmed) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - -#### Returns - -[`ProposalConfirmed`](events_events.ProposalConfirmed) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.ProposalFailed.md b/src/pages/docs/golem-js/reference/classes/events_events.ProposalFailed.md deleted file mode 100644 index dff4f71b4..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.ProposalFailed.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "Class ProposalFailed" -pageTitle: "Class ProposalFailed - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ProposalFailed within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ProposalFailed - -[events/events](../modules/events_events).ProposalFailed - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `provider`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) ; `parentId`: `string` \| ``null`` ; `reason?`: `string` }\> - - ↳ **`ProposalFailed`** - -## Table of contents - -### Constructors - -- [constructor](events_events.ProposalFailed#constructor) - -### Properties - -- [detail](events_events.ProposalFailed#detail) -- [name](events_events.ProposalFailed#name) -- [timestamp](events_events.ProposalFailed#timestamp) - -## Constructors - -### constructor - -• **new ProposalFailed**(`data`): [`ProposalFailed`](events_events.ProposalFailed) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `data.parentId` | ``null`` \| `string` | -| `data.reason?` | `string` | - -#### Returns - -[`ProposalFailed`](events_events.ProposalFailed) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `parentId` | ``null`` \| `string` | -| `reason?` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.ProposalReceived.md b/src/pages/docs/golem-js/reference/classes/events_events.ProposalReceived.md deleted file mode 100644 index bec1b8766..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.ProposalReceived.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "Class ProposalReceived" -pageTitle: "Class ProposalReceived - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ProposalReceived within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ProposalReceived - -[events/events](../modules/events_events).ProposalReceived - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `provider`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) ; `parentId`: `string` \| ``null`` ; `details`: [`ProposalDetails`](../interfaces/market_proposal.ProposalDetails) }\> - - ↳ **`ProposalReceived`** - -## Table of contents - -### Constructors - -- [constructor](events_events.ProposalReceived#constructor) - -### Properties - -- [detail](events_events.ProposalReceived#detail) -- [name](events_events.ProposalReceived#name) -- [timestamp](events_events.ProposalReceived#timestamp) - -## Constructors - -### constructor - -• **new ProposalReceived**(`data`): [`ProposalReceived`](events_events.ProposalReceived) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `data.parentId` | ``null`` \| `string` | -| `data.details` | [`ProposalDetails`](../interfaces/market_proposal.ProposalDetails) | - -#### Returns - -[`ProposalReceived`](events_events.ProposalReceived) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `parentId` | ``null`` \| `string` | -| `details` | [`ProposalDetails`](../interfaces/market_proposal.ProposalDetails) | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.ProposalRejected.md b/src/pages/docs/golem-js/reference/classes/events_events.ProposalRejected.md deleted file mode 100644 index 323e9bcd1..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.ProposalRejected.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "Class ProposalRejected" -pageTitle: "Class ProposalRejected - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ProposalRejected within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ProposalRejected - -[events/events](../modules/events_events).ProposalRejected - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `reason?`: `string` ; `provider?`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) ; `parentId`: `string` \| ``null`` }\> - - ↳ **`ProposalRejected`** - -## Table of contents - -### Constructors - -- [constructor](events_events.ProposalRejected#constructor) - -### Properties - -- [detail](events_events.ProposalRejected#detail) -- [name](events_events.ProposalRejected#name) -- [timestamp](events_events.ProposalRejected#timestamp) - -## Constructors - -### constructor - -• **new ProposalRejected**(`data`): [`ProposalRejected`](events_events.ProposalRejected) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.reason?` | `string` | -| `data.provider?` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `data.parentId` | ``null`` \| `string` | - -#### Returns - -[`ProposalRejected`](events_events.ProposalRejected) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `reason?` | `string` | -| `provider?` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `parentId` | ``null`` \| `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.ProposalResponded.md b/src/pages/docs/golem-js/reference/classes/events_events.ProposalResponded.md deleted file mode 100644 index c3dcda22b..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.ProposalResponded.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: "Class ProposalResponded" -pageTitle: "Class ProposalResponded - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ProposalResponded within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ProposalResponded - -[events/events](../modules/events_events).ProposalResponded - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `provider`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) ; `counteringProposalId`: `string` }\> - - ↳ **`ProposalResponded`** - -## Table of contents - -### Constructors - -- [constructor](events_events.ProposalResponded#constructor) - -### Properties - -- [detail](events_events.ProposalResponded#detail) -- [name](events_events.ProposalResponded#name) -- [timestamp](events_events.ProposalResponded#timestamp) - -## Constructors - -### constructor - -• **new ProposalResponded**(`data`): [`ProposalResponded`](events_events.ProposalResponded) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `data.counteringProposalId` | `string` | - -#### Returns - -[`ProposalResponded`](events_events.ProposalResponded) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `counteringProposalId` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.ScriptExecuted.md b/src/pages/docs/golem-js/reference/classes/events_events.ScriptExecuted.md deleted file mode 100644 index 7756170c5..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.ScriptExecuted.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: "Class ScriptExecuted" -pageTitle: "Class ScriptExecuted - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ScriptExecuted within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ScriptExecuted - -[events/events](../modules/events_events).ScriptExecuted - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `activityId`: `string` ; `agreementId`: `string` ; `success`: `boolean` }\> - - ↳ **`ScriptExecuted`** - -## Table of contents - -### Constructors - -- [constructor](events_events.ScriptExecuted#constructor) - -### Properties - -- [detail](events_events.ScriptExecuted#detail) -- [name](events_events.ScriptExecuted#name) -- [timestamp](events_events.ScriptExecuted#timestamp) - -## Constructors - -### constructor - -• **new ScriptExecuted**(`data`): [`ScriptExecuted`](events_events.ScriptExecuted) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.activityId` | `string` | -| `data.agreementId` | `string` | -| `data.success` | `boolean` | - -#### Returns - -[`ScriptExecuted`](events_events.ScriptExecuted) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `activityId` | `string` | -| `agreementId` | `string` | -| `success` | `boolean` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.ScriptSent.md b/src/pages/docs/golem-js/reference/classes/events_events.ScriptSent.md deleted file mode 100644 index bcc6711c3..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.ScriptSent.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "Class ScriptSent" -pageTitle: "Class ScriptSent - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ScriptSent within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ScriptSent - -[events/events](../modules/events_events).ScriptSent - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `activityId`: `string` ; `agreementId`: `string` }\> - - ↳ **`ScriptSent`** - -## Table of contents - -### Constructors - -- [constructor](events_events.ScriptSent#constructor) - -### Properties - -- [detail](events_events.ScriptSent#detail) -- [name](events_events.ScriptSent#name) -- [timestamp](events_events.ScriptSent#timestamp) - -## Constructors - -### constructor - -• **new ScriptSent**(`data`): [`ScriptSent`](events_events.ScriptSent) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.activityId` | `string` | -| `data.agreementId` | `string` | - -#### Returns - -[`ScriptSent`](events_events.ScriptSent) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `activityId` | `string` | -| `agreementId` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.TaskFinished.md b/src/pages/docs/golem-js/reference/classes/events_events.TaskFinished.md deleted file mode 100644 index b72c533db..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.TaskFinished.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: "Class TaskFinished" -pageTitle: "Class TaskFinished - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class TaskFinished within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: TaskFinished - -[events/events](../modules/events_events).TaskFinished - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` }\> - - ↳ **`TaskFinished`** - -## Table of contents - -### Constructors - -- [constructor](events_events.TaskFinished#constructor) - -### Properties - -- [detail](events_events.TaskFinished#detail) -- [name](events_events.TaskFinished#name) -- [timestamp](events_events.TaskFinished#timestamp) - -## Constructors - -### constructor - -• **new TaskFinished**(`data`): [`TaskFinished`](events_events.TaskFinished) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | - -#### Returns - -[`TaskFinished`](events_events.TaskFinished) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.TaskRedone.md b/src/pages/docs/golem-js/reference/classes/events_events.TaskRedone.md deleted file mode 100644 index dc183c1c1..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.TaskRedone.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: "Class TaskRedone" -pageTitle: "Class TaskRedone - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class TaskRedone within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: TaskRedone - -[events/events](../modules/events_events).TaskRedone - -Represents the situation in which running the task failed for some reason, but it will be retried - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `agreementId?`: `string` ; `provider?`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) ; `retriesCount`: `number` ; `activityId?`: `string` ; `reason?`: `string` }\> - - ↳ **`TaskRedone`** - -## Table of contents - -### Constructors - -- [constructor](events_events.TaskRedone#constructor) - -### Properties - -- [detail](events_events.TaskRedone#detail) -- [name](events_events.TaskRedone#name) -- [timestamp](events_events.TaskRedone#timestamp) - -## Constructors - -### constructor - -• **new TaskRedone**(`data`): [`TaskRedone`](events_events.TaskRedone) - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `data` | `Object` | - | -| `data.id` | `string` | - | -| `data.agreementId?` | `string` | - | -| `data.provider?` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - | -| `data.retriesCount` | `number` | - | -| `data.activityId?` | `string` | The activity that was involved This might be not set when there was an issue with starting the activity on the provider | -| `data.reason?` | `string` | - | - -#### Returns - -[`TaskRedone`](events_events.TaskRedone) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | - | -| `agreementId?` | `string` | - | -| `provider?` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - | -| `retriesCount` | `number` | - | -| `activityId?` | `string` | The activity that was involved This might be not set when there was an issue with starting the activity on the provider | -| `reason?` | `string` | - | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.TaskRejected.md b/src/pages/docs/golem-js/reference/classes/events_events.TaskRejected.md deleted file mode 100644 index 77972e113..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.TaskRejected.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: "Class TaskRejected" -pageTitle: "Class TaskRejected - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class TaskRejected within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: TaskRejected - -[events/events](../modules/events_events).TaskRejected - -Represents the situation where all attempts to execute the task have been unsuccessful and no further processing -will be conducted. - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `agreementId?`: `string` ; `provider?`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) ; `activityId?`: `string` ; `reason?`: `string` }\> - - ↳ **`TaskRejected`** - -## Table of contents - -### Constructors - -- [constructor](events_events.TaskRejected#constructor) - -### Properties - -- [detail](events_events.TaskRejected#detail) -- [name](events_events.TaskRejected#name) -- [timestamp](events_events.TaskRejected#timestamp) - -## Constructors - -### constructor - -• **new TaskRejected**(`data`): [`TaskRejected`](events_events.TaskRejected) - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `data` | `Object` | - | -| `data.id` | `string` | - | -| `data.agreementId?` | `string` | - | -| `data.provider?` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - | -| `data.activityId?` | `string` | The activity that was involved when the rejection took place This might be not set when there was an issue with starting the activity on the provider | -| `data.reason?` | `string` | - | - -#### Returns - -[`TaskRejected`](events_events.TaskRejected) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | - | -| `agreementId?` | `string` | - | -| `provider?` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - | -| `activityId?` | `string` | The activity that was involved when the rejection took place This might be not set when there was an issue with starting the activity on the provider | -| `reason?` | `string` | - | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/events_events.TaskStarted.md b/src/pages/docs/golem-js/reference/classes/events_events.TaskStarted.md deleted file mode 100644 index c671c6edb..000000000 --- a/src/pages/docs/golem-js/reference/classes/events_events.TaskStarted.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "Class TaskStarted" -pageTitle: "Class TaskStarted - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class TaskStarted within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: TaskStarted - -[events/events](../modules/events_events).TaskStarted - -## Hierarchy - -- [`BaseEvent`](events_events.BaseEvent)\<\{ `id`: `string` ; `agreementId`: `string` ; `activityId`: `string` ; `provider`: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) }\> - - ↳ **`TaskStarted`** - -## Table of contents - -### Constructors - -- [constructor](events_events.TaskStarted#constructor) - -### Properties - -- [detail](events_events.TaskStarted#detail) -- [name](events_events.TaskStarted#name) -- [timestamp](events_events.TaskStarted#timestamp) - -## Constructors - -### constructor - -• **new TaskStarted**(`data`): [`TaskStarted`](events_events.TaskStarted) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Object` | -| `data.id` | `string` | -| `data.agreementId` | `string` | -| `data.activityId` | `string` | -| `data.provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - -#### Returns - -[`TaskStarted`](events_events.TaskStarted) - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[constructor](events_events.BaseEvent#constructor) - -#### Defined in - -[src/events/events.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L29) - -## Properties - -### detail - -• `Readonly` **detail**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `agreementId` | `string` | -| `activityId` | `string` | -| `provider` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[detail](events_events.BaseEvent#detail) - -#### Defined in - -[src/events/events.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L17) - -___ - -### name - -• `Readonly` **name**: `string` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[name](events_events.BaseEvent#name) - -#### Defined in - -[src/events/events.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L18) - -___ - -### timestamp - -• `Readonly` **timestamp**: `number` - -#### Inherited from - -[BaseEvent](events_events.BaseEvent).[timestamp](events_events.BaseEvent#timestamp) - -#### Defined in - -[src/events/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/classes/executor_executor.TaskExecutor.md b/src/pages/docs/golem-js/reference/classes/executor_executor.TaskExecutor.md deleted file mode 100644 index ddc34744a..000000000 --- a/src/pages/docs/golem-js/reference/classes/executor_executor.TaskExecutor.md +++ /dev/null @@ -1,277 +0,0 @@ ---- -title: "Class TaskExecutor" -pageTitle: "Class TaskExecutor - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class TaskExecutor within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: TaskExecutor - -[executor/executor](../modules/executor_executor).TaskExecutor - -A high-level module for defining and executing tasks in the golem network - -## Table of contents - -### Constructors - -- [constructor](executor_executor.TaskExecutor#constructor) - -### Properties - -- [events](executor_executor.TaskExecutor#events) - -### Methods - -- [create](executor_executor.TaskExecutor#create) -- [init](executor_executor.TaskExecutor#init) -- [shutdown](executor_executor.TaskExecutor#shutdown) -- [getStats](executor_executor.TaskExecutor#getstats) -- [onActivityReady](executor_executor.TaskExecutor#onactivityready) -- [run](executor_executor.TaskExecutor#run) -- [cancel](executor_executor.TaskExecutor#cancel) - -## Constructors - -### constructor - -• **new TaskExecutor**(`options`): [`TaskExecutor`](executor_executor.TaskExecutor) - -Create a new TaskExecutor object. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `options` | [`ExecutorOptionsMixin`](../modules/executor_executor#executoroptionsmixin) | contains information needed to start executor, if string the imageHash is required, otherwise it should be a type of [ExecutorOptions](../modules/executor_executor#executoroptions) | - -#### Returns - -[`TaskExecutor`](executor_executor.TaskExecutor) - -#### Defined in - -[src/executor/executor.ts:169](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/executor.ts#L169) - -## Properties - -### events - -• `Readonly` **events**: `EventEmitter`\<[`TaskExecutorEventsDict`](../interfaces/executor_events.TaskExecutorEventsDict), `any`\> - -EventEmitter (EventEmitter3) instance emitting TaskExecutor events. - -**`See`** - -TaskExecutorEventsDict for available events. - -#### Defined in - -[src/executor/executor.ts:94](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/executor.ts#L94) - -## Methods - -### create - -▸ **create**(`options`): `Promise`\<[`TaskExecutor`](executor_executor.TaskExecutor)\> - -Create a new Task Executor - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `options` | [`ExecutorOptionsMixin`](../modules/executor_executor#executoroptionsmixin) | Task executor options | - -#### Returns - -`Promise`\<[`TaskExecutor`](executor_executor.TaskExecutor)\> - -TaskExecutor - -**`Description`** - -Factory Method that create and initialize an instance of the TaskExecutor - -**`Example`** - -The executor can be created by passing appropriate initial parameters such as package, budget, subnet tag, payment driver, payment network etc. -One required parameter is a package. This can be done in two ways. First by passing only package image hash or image tag, e.g. -```js -const executor = await TaskExecutor.create("9a3b5d67b0b27746283cb5f287c13eab1beaa12d92a9f536b747c7ae"); -``` -or -```js -const executor = await TaskExecutor.create("golem/alpine:3.18.2"); -``` - -**`Example`** - -Or by passing some optional parameters, e.g. -```js -const executor = await TaskExecutor.create({ - subnetTag: "public", - payment: { driver: "erc-20", network: "goerli" }, - package: "golem/alpine:3.18.2", -}); -``` - -#### Defined in - -[src/executor/executor.ts:158](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/executor.ts#L158) - -___ - -### init - -▸ **init**(): `Promise`\<`void`\> - -Initialize executor - -#### Returns - -`Promise`\<`void`\> - -**`Description`** - -Method responsible initialize all executor services. - -#### Defined in - -[src/executor/executor.ts:222](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/executor.ts#L222) - -___ - -### shutdown - -▸ **shutdown**(): `Promise`\<`void`\> - -Stop all executor services and shut down executor instance. - -You can call this method multiple times, it will resolve only once the executor is shutdown. - -When shutdown() is initially called, a beforeEnd event is emitted. - -Once the executor is fully stopped, an end event is emitted. - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[src/executor/executor.ts:286](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/executor.ts#L286) - -___ - -### getStats - -▸ **getStats**(): `Object` - -Statistics of execution process - -#### Returns - -`Object` - -array - -#### Defined in - -[src/executor/executor.ts:323](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/executor.ts#L323) - -___ - -### onActivityReady - -▸ **onActivityReady**(`worker`): `void` - -Registers a worker function that will be run when an activity is ready. -This is the perfect place to run setup functions that need to be run only once per -activity, for example uploading files that will be used by all tasks in the activity. -This function can be called multiple times, each worker will be run in the order -they were registered. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `worker` | [`Worker`](../modules/task_work#worker)\<`unknown`\> | worker function that will be run when an activity is ready | - -#### Returns - -`void` - -**`Example`** - -```ts -const uploadFile1 = async (ctx) => ctx.uploadFile("./file1.txt", "/file1.txt"); -const uploadFile2 = async (ctx) => ctx.uploadFile("./file2.txt", "/file2.txt"); - -executor.onActivityReady(uploadFile1); -executor.onActivityReady(uploadFile2); - -await executor.run(async (ctx) => { - await ctx.run("cat /file1.txt /file2.txt"); -}); -``` - -#### Defined in - -[src/executor/executor.ts:348](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/executor.ts#L348) - -___ - -### run - -▸ **run**\<`OutputType`\>(`worker`, `options?`): `Promise`\<`OutputType`\> - -Run task - allows to execute a single worker function on the Golem network with a single provider. - -#### Type parameters - -| Name | -| :------ | -| `OutputType` | - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `worker` | [`Worker`](../modules/task_work#worker)\<`OutputType`\> | function that run task | -| `options?` | [`TaskOptions`](../modules/task_task#taskoptions) | task options | - -#### Returns - -`Promise`\<`OutputType`\> - -result of task computation - -**`Example`** - -```typescript -await executor.run(async (ctx) => console.log((await ctx.run("echo 'Hello World'")).stdout)); -``` - -#### Defined in - -[src/executor/executor.ts:363](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/executor.ts#L363) - -___ - -### cancel - -▸ **cancel**(`reason`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `reason` | `string` | - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[src/executor/executor.ts:414](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/executor.ts#L414) diff --git a/src/pages/docs/golem-js/reference/classes/experimental_deployment_builder.GolemDeploymentBuilder.md b/src/pages/docs/golem-js/reference/classes/experimental_deployment_builder.GolemDeploymentBuilder.md new file mode 100644 index 000000000..f6b22d6c9 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/experimental_deployment_builder.GolemDeploymentBuilder.md @@ -0,0 +1,112 @@ +--- +title: "Class GolemDeploymentBuilder" +pageTitle: "Class GolemDeploymentBuilder - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class GolemDeploymentBuilder within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: GolemDeploymentBuilder + +[experimental/deployment/builder](../modules/experimental_deployment_builder).GolemDeploymentBuilder + +## Table of contents + +### Constructors + +- [constructor](experimental_deployment_builder.GolemDeploymentBuilder#constructor) + +### Methods + +- [reset](experimental_deployment_builder.GolemDeploymentBuilder#reset) +- [createResourceRentalPool](experimental_deployment_builder.GolemDeploymentBuilder#createresourcerentalpool) +- [createNetwork](experimental_deployment_builder.GolemDeploymentBuilder#createnetwork) +- [getDeployment](experimental_deployment_builder.GolemDeploymentBuilder#getdeployment) + +## Constructors + +### constructor + +• **new GolemDeploymentBuilder**(`glm`): [`GolemDeploymentBuilder`](experimental_deployment_builder.GolemDeploymentBuilder) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `glm` | [`GolemNetwork`](golem_network_golem_network.GolemNetwork) | + +#### Returns + +[`GolemDeploymentBuilder`](experimental_deployment_builder.GolemDeploymentBuilder) + +#### Defined in + +[src/experimental/deployment/builder.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/builder.ts#L29) + +## Methods + +### reset + +▸ **reset**(): `void` + +#### Returns + +`void` + +#### Defined in + +[src/experimental/deployment/builder.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/builder.ts#L22) + +___ + +### createResourceRentalPool + +▸ **createResourceRentalPool**(`name`, `options`): `this` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `name` | `string` | +| `options` | [`CreateResourceRentalPoolOptions`](../interfaces/experimental_deployment_builder.CreateResourceRentalPoolOptions) | + +#### Returns + +`this` + +#### Defined in + +[src/experimental/deployment/builder.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/builder.ts#L31) + +___ + +### createNetwork + +▸ **createNetwork**(`name`, `options?`): `this` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `name` | `string` | +| `options` | [`NetworkOptions`](../interfaces/network_network_module.NetworkOptions) | + +#### Returns + +`this` + +#### Defined in + +[src/experimental/deployment/builder.ts:41](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/builder.ts#L41) + +___ + +### getDeployment + +▸ **getDeployment**(): [`Deployment`](experimental_deployment_deployment.Deployment) + +#### Returns + +[`Deployment`](experimental_deployment_deployment.Deployment) + +#### Defined in + +[src/experimental/deployment/builder.ts:51](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/builder.ts#L51) diff --git a/src/pages/docs/golem-js/reference/classes/experimental_deployment_deployment.Deployment.md b/src/pages/docs/golem-js/reference/classes/experimental_deployment_deployment.Deployment.md new file mode 100644 index 000000000..e1a63d6bc --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/experimental_deployment_deployment.Deployment.md @@ -0,0 +1,149 @@ +--- +title: "Class Deployment" +pageTitle: "Class Deployment - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Deployment within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Deployment + +[experimental/deployment/deployment](../modules/experimental_deployment_deployment).Deployment + +This feature is experimental!!! + +## Table of contents + +### Constructors + +- [constructor](experimental_deployment_deployment.Deployment#constructor) + +### Properties + +- [events](experimental_deployment_deployment.Deployment#events) + +### Methods + +- [getState](experimental_deployment_deployment.Deployment#getstate) +- [start](experimental_deployment_deployment.Deployment#start) +- [stop](experimental_deployment_deployment.Deployment#stop) +- [getResourceRentalPool](experimental_deployment_deployment.Deployment#getresourcerentalpool) +- [getNetwork](experimental_deployment_deployment.Deployment#getnetwork) + +## Constructors + +### constructor + +• **new Deployment**(`components`, `deps`): [`Deployment`](experimental_deployment_deployment.Deployment) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `components` | [`DeploymentComponents`](../modules/experimental_deployment_deployment#deploymentcomponents) | +| `deps` | `Object` | +| `deps.logger` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | +| `deps.yagna` | [`YagnaApi`](shared_yagna_yagnaApi.YagnaApi) | +| `deps.market` | [`MarketModule`](../interfaces/market_market_module.MarketModule) | +| `deps.activity` | [`ActivityModule`](../interfaces/activity_activity_module.ActivityModule) | +| `deps.payment` | [`PaymentModule`](../interfaces/payment_payment_module.PaymentModule) | +| `deps.network` | [`NetworkModule`](../interfaces/network_network_module.NetworkModule) | +| `deps.rental` | [`RentalModule`](../interfaces/resource_rental_rental_module.RentalModule) | + +#### Returns + +[`Deployment`](experimental_deployment_deployment.Deployment) + +#### Defined in + +[src/experimental/deployment/deployment.ts:82](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L82) + +## Properties + +### events + +• `Readonly` **events**: `EventEmitter`\<[`DeploymentEvents`](../interfaces/experimental_deployment_deployment.DeploymentEvents), `any`\> + +#### Defined in + +[src/experimental/deployment/deployment.ts:54](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L54) + +## Methods + +### getState + +▸ **getState**(): [`DeploymentState`](../enums/experimental_deployment_deployment.DeploymentState) + +#### Returns + +[`DeploymentState`](../enums/experimental_deployment_deployment.DeploymentState) + +#### Defined in + +[src/experimental/deployment/deployment.ts:111](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L111) + +___ + +### start + +▸ **start**(): `Promise`\<`void`\> + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/experimental/deployment/deployment.ts:115](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L115) + +___ + +### stop + +▸ **stop**(): `Promise`\<`void`\> + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/experimental/deployment/deployment.ts:191](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L191) + +___ + +### getResourceRentalPool + +▸ **getResourceRentalPool**(`name`): [`ResourceRentalPool`](resource_rental_resource_rental_pool.ResourceRentalPool) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `name` | `string` | + +#### Returns + +[`ResourceRentalPool`](resource_rental_resource_rental_pool.ResourceRentalPool) + +#### Defined in + +[src/experimental/deployment/deployment.ts:222](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L222) + +___ + +### getNetwork + +▸ **getNetwork**(`name`): [`Network`](network_network.Network) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `name` | `string` | + +#### Returns + +[`Network`](network_network.Network) + +#### Defined in + +[src/experimental/deployment/deployment.ts:230](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L230) diff --git a/src/pages/docs/golem-js/reference/classes/experimental_job_job.Job.md b/src/pages/docs/golem-js/reference/classes/experimental_job_job.Job.md new file mode 100644 index 000000000..3b4311ec3 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/experimental_job_job.Job.md @@ -0,0 +1,195 @@ +--- +title: "Class Job" +pageTitle: "Class Job - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Job within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Job\ + +[experimental/job/job](../modules/experimental_job_job).Job + +This API is experimental and subject to change. Use at your own risk. + +The Job class represents a single self-contained unit of work that can be run on the Golem Network. +It is responsible for managing the lifecycle of the work and providing information about its state. +It also provides an event emitter that can be used to listen for state changes. + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `Output` | `unknown` | + +## Table of contents + +### Constructors + +- [constructor](experimental_job_job.Job#constructor) + +### Properties + +- [events](experimental_job_job.Job#events) +- [results](experimental_job_job.Job#results) +- [error](experimental_job_job.Job#error) +- [state](experimental_job_job.Job#state) +- [id](experimental_job_job.Job#id) + +### Methods + +- [isRunning](experimental_job_job.Job#isrunning) +- [startWork](experimental_job_job.Job#startwork) +- [cancel](experimental_job_job.Job#cancel) +- [waitForResult](experimental_job_job.Job#waitforresult) + +## Constructors + +### constructor + +• **new Job**\<`Output`\>(`id`, `glm`, `order`, `logger`): [`Job`](experimental_job_job.Job)\<`Output`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `Output` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | +| `glm` | [`GolemNetwork`](golem_network_golem_network.GolemNetwork) | +| `order` | [`MarketOrderSpec`](../interfaces/golem_network_golem_network.MarketOrderSpec) | +| `logger` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | + +#### Returns + +[`Job`](experimental_job_job.Job)\<`Output`\> + +#### Defined in + +[src/experimental/job/job.ts:76](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L76) + +## Properties + +### events + +• `Readonly` **events**: `EventEmitter`\<[`JobEventsDict`](../interfaces/experimental_job_job.JobEventsDict), `any`\> + +#### Defined in + +[src/experimental/job/job.ts:63](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L63) + +___ + +### results + +• **results**: `undefined` \| `Output` + +#### Defined in + +[src/experimental/job/job.ts:66](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L66) + +___ + +### error + +• **error**: `undefined` \| `Error` + +#### Defined in + +[src/experimental/job/job.ts:67](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L67) + +___ + +### state + +• **state**: [`JobState`](../enums/experimental_job_job.JobState) = `JobState.New` + +#### Defined in + +[src/experimental/job/job.ts:68](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L68) + +___ + +### id + +• `Readonly` **id**: `string` + +#### Defined in + +[src/experimental/job/job.ts:77](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L77) + +## Methods + +### isRunning + +▸ **isRunning**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[src/experimental/job/job.ts:83](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L83) + +___ + +### startWork + +▸ **startWork**(`workOnGolem`): `void` + +Run your worker function on the Golem Network. This method will synchronously initialize all internal services and validate the job options. The work itself will be run asynchronously in the background. +You can use the [experimental/job/job.Job.events](experimental_job_job.Job#events) event emitter to listen for state changes. +You can also use [experimental/job/job.Job.waitForResult](experimental_job_job.Job#waitforresult) to wait for the job to finish and get the results. +If you want to cancel the job, use [experimental/job/job.Job.cancel](experimental_job_job.Job#cancel). +If you want to run multiple jobs in parallel, you can use [experimental/job/job_manager.JobManager.createJob](experimental_job_job_manager.JobManager#createjob) to create multiple jobs and run them in parallel. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `workOnGolem` | [`WorkFunction`](../modules/experimental_job_job#workfunction)\<`Output`\> | Your worker function that will be run on the Golem Network. | + +#### Returns + +`void` + +#### Defined in + +[src/experimental/job/job.ts:98](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L98) + +___ + +### cancel + +▸ **cancel**(): `Promise`\<`void`\> + +Cancel the job. This method will stop the activity and wait for it to finish. +Throws an error if the job is not running. + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/experimental/job/job.ts:161](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L161) + +___ + +### waitForResult + +▸ **waitForResult**(): `Promise`\<`unknown`\> + +Wait for the job to finish and return the results. +Throws an error if the job was not started. + +#### Returns + +`Promise`\<`unknown`\> + +#### Defined in + +[src/experimental/job/job.ts:175](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L175) diff --git a/src/pages/docs/golem-js/reference/classes/experimental_job_job_manager.JobManager.md b/src/pages/docs/golem-js/reference/classes/experimental_job_job_manager.JobManager.md new file mode 100644 index 000000000..8035f9a4d --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/experimental_job_job_manager.JobManager.md @@ -0,0 +1,141 @@ +--- +title: "Class JobManager" +pageTitle: "Class JobManager - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class JobManager within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: JobManager + +[experimental/job/job\_manager](../modules/experimental_job_job_manager).JobManager + +This API is experimental and subject to change. Use at your own risk. + +The Golem Network class provides a high-level API for running jobs on the Golem Network. + +## Table of contents + +### Constructors + +- [constructor](experimental_job_job_manager.JobManager#constructor) + +### Methods + +- [isInitialized](experimental_job_job_manager.JobManager#isinitialized) +- [init](experimental_job_job_manager.JobManager#init) +- [createJob](experimental_job_job_manager.JobManager#createjob) +- [getJobById](experimental_job_job_manager.JobManager#getjobbyid) +- [close](experimental_job_job_manager.JobManager#close) + +## Constructors + +### constructor + +• **new JobManager**(`config?`, `logger?`): [`JobManager`](experimental_job_job_manager.JobManager) + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `config?` | [`JobManagerConfig`](../modules/experimental_job_job_manager#jobmanagerconfig) | Configuration options that will be passed to all jobs created by this instance. | +| `logger` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | | + +#### Returns + +[`JobManager`](experimental_job_job_manager.JobManager) + +#### Defined in + +[src/experimental/job/job_manager.ts:30](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job_manager.ts#L30) + +## Methods + +### isInitialized + +▸ **isInitialized**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[src/experimental/job/job_manager.ts:47](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job_manager.ts#L47) + +___ + +### init + +▸ **init**(): `Promise`\<`void`\> + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/experimental/job/job_manager.ts:51](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job_manager.ts#L51) + +___ + +### createJob + +▸ **createJob**\<`Output`\>(`order`): [`Job`](experimental_job_job.Job)\<`Output`\> + +Create a new job and add it to the list of jobs managed by this instance. +This method does not start any work on the network, use [experimental/job/job.Job.startWork](experimental_job_job.Job#startwork) for that. + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `Output` | `unknown` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `order` | [`MarketOrderSpec`](../interfaces/golem_network_golem_network.MarketOrderSpec) | + +#### Returns + +[`Job`](experimental_job_job.Job)\<`Output`\> + +#### Defined in + +[src/experimental/job/job_manager.ts:61](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job_manager.ts#L61) + +___ + +### getJobById + +▸ **getJobById**(`id`): `undefined` \| [`Job`](experimental_job_job.Job)\<`unknown`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`undefined` \| [`Job`](experimental_job_job.Job)\<`unknown`\> + +#### Defined in + +[src/experimental/job/job_manager.ts:71](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job_manager.ts#L71) + +___ + +### close + +▸ **close**(): `Promise`\<`void`\> + +Close the connection to the Yagna service and cancel all running jobs. + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/experimental/job/job_manager.ts:80](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job_manager.ts#L80) diff --git a/src/pages/docs/golem-js/reference/classes/experimental_reputation_error.GolemReputationError.md b/src/pages/docs/golem-js/reference/classes/experimental_reputation_error.GolemReputationError.md new file mode 100644 index 000000000..5799c201d --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/experimental_reputation_error.GolemReputationError.md @@ -0,0 +1,85 @@ +--- +title: "Class GolemReputationError" +pageTitle: "Class GolemReputationError - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class GolemReputationError within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: GolemReputationError + +[experimental/reputation/error](../modules/experimental_reputation_error).GolemReputationError + +Module specific errors - Market, Work, Payment. +Each of the major modules will have its own domain specific root error type, +additionally containing an error code specific to a given subdomain + +## Hierarchy + +- [`GolemModuleError`](shared_error_golem_error.GolemModuleError) + + ↳ **`GolemReputationError`** + +## Table of contents + +### Constructors + +- [constructor](experimental_reputation_error.GolemReputationError#constructor) + +### Properties + +- [code](experimental_reputation_error.GolemReputationError#code) +- [previous](experimental_reputation_error.GolemReputationError#previous) + +## Constructors + +### constructor + +• **new GolemReputationError**(`message`, `cause?`): [`GolemReputationError`](experimental_reputation_error.GolemReputationError) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `message` | `string` | +| `cause?` | `Error` | + +#### Returns + +[`GolemReputationError`](experimental_reputation_error.GolemReputationError) + +#### Overrides + +[GolemModuleError](shared_error_golem_error.GolemModuleError).[constructor](shared_error_golem_error.GolemModuleError#constructor) + +#### Defined in + +[src/experimental/reputation/error.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/error.ts#L4) + +## Properties + +### code + +• **code**: `string` \| `number` + +#### Inherited from + +[GolemModuleError](shared_error_golem_error.GolemModuleError).[code](shared_error_golem_error.GolemModuleError#code) + +#### Defined in + +[src/shared/error/golem-error.ts:66](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L66) + +___ + +### previous + +• `Optional` `Readonly` **previous**: `Error` + +The previous error, if any, that led to this error. + +#### Inherited from + +[GolemModuleError](shared_error_golem_error.GolemModuleError).[previous](shared_error_golem_error.GolemModuleError#previous) + +#### Defined in + +[src/shared/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L10) diff --git a/src/pages/docs/golem-js/reference/classes/experimental_reputation_system.ReputationSystem.md b/src/pages/docs/golem-js/reference/classes/experimental_reputation_system.ReputationSystem.md new file mode 100644 index 000000000..c6174c2ed --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/experimental_reputation_system.ReputationSystem.md @@ -0,0 +1,401 @@ +--- +title: "Class ReputationSystem" +pageTitle: "Class ReputationSystem - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class ReputationSystem within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: ReputationSystem + +[experimental/reputation/system](../modules/experimental_reputation_system).ReputationSystem + +Reputation system client. + +This class is responsible for fetching and applying reputation data to Golem SDK's market management class. + +Currently, it includes a proposal filter you can use to filter out providers with low reputation scores. + +Reputation data is gathered by the following project: https://github.com/golemfactory/reputation-auditor + +You can adjust the weights used to calculate the score for proposals by using the `setProposalWeights` method. + +NOTE: This class is currently experimental and subject to change. + +NOTE: Only providers from polygon network are being tested, so using this class on testnet will not work. + +## Table of contents + +### Constructors + +- [constructor](experimental_reputation_system.ReputationSystem#constructor) + +### Properties + +- [paymentNetwork](experimental_reputation_system.ReputationSystem#paymentnetwork) + +### Methods + +- [create](experimental_reputation_system.ReputationSystem#create) +- [usePreset](experimental_reputation_system.ReputationSystem#usepreset) +- [setData](experimental_reputation_system.ReputationSystem#setdata) +- [getData](experimental_reputation_system.ReputationSystem#getdata) +- [fetchData](experimental_reputation_system.ReputationSystem#fetchdata) +- [setProposalWeights](experimental_reputation_system.ReputationSystem#setproposalweights) +- [getProposalWeights](experimental_reputation_system.ReputationSystem#getproposalweights) +- [setAgreementWeights](experimental_reputation_system.ReputationSystem#setagreementweights) +- [getAgreementWeights](experimental_reputation_system.ReputationSystem#getagreementweights) +- [getProviderScores](experimental_reputation_system.ReputationSystem#getproviderscores) +- [proposalFilter](experimental_reputation_system.ReputationSystem#proposalfilter) +- [agreementSelector](experimental_reputation_system.ReputationSystem#agreementselector) +- [calculateScore](experimental_reputation_system.ReputationSystem#calculatescore) +- [calculateProviderPool](experimental_reputation_system.ReputationSystem#calculateproviderpool) +- [sortCandidatesByScore](experimental_reputation_system.ReputationSystem#sortcandidatesbyscore) + +## Constructors + +### constructor + +• **new ReputationSystem**(`config?`): [`ReputationSystem`](experimental_reputation_system.ReputationSystem) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `config?` | [`ReputationConfig`](../interfaces/experimental_reputation_types.ReputationConfig) | + +#### Returns + +[`ReputationSystem`](experimental_reputation_system.ReputationSystem) + +#### Defined in + +[src/experimental/reputation/system.ts:187](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L187) + +## Properties + +### paymentNetwork + +• `Readonly` **paymentNetwork**: `string` + +The payment network currently used. + +#### Defined in + +[src/experimental/reputation/system.ts:136](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L136) + +## Methods + +### create + +▸ **create**(`config?`): `Promise`\<[`ReputationSystem`](experimental_reputation_system.ReputationSystem)\> + +Create a new reputation system client and fetch the reputation data. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `config?` | [`ReputationConfig`](../interfaces/experimental_reputation_types.ReputationConfig) | + +#### Returns + +`Promise`\<[`ReputationSystem`](experimental_reputation_system.ReputationSystem)\> + +#### Defined in + +[src/experimental/reputation/system.ts:181](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L181) + +___ + +### usePreset + +▸ **usePreset**(`presetName`): `void` + +Apply preset to current reputation system configuration. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `presetName` | keyof [`ReputationPresets`](../interfaces/experimental_reputation_types.ReputationPresets) | Preset name to use. | + +#### Returns + +`void` + +#### Defined in + +[src/experimental/reputation/system.ts:209](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L209) + +___ + +### setData + +▸ **setData**(`data`): `void` + +Set reputation data. + +This is useful if you want to cache the date locally, or you have an alternative source of data. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | [`ReputationData`](../interfaces/experimental_reputation_types.ReputationData) | + +#### Returns + +`void` + +#### Defined in + +[src/experimental/reputation/system.ts:241](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L241) + +___ + +### getData + +▸ **getData**(): [`ReputationData`](../interfaces/experimental_reputation_types.ReputationData) + +Returns current reputation data. + +#### Returns + +[`ReputationData`](../interfaces/experimental_reputation_types.ReputationData) + +#### Defined in + +[src/experimental/reputation/system.ts:263](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L263) + +___ + +### fetchData + +▸ **fetchData**(): `Promise`\<`void`\> + +Fetch data from the reputation service. + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/experimental/reputation/system.ts:270](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L270) + +___ + +### setProposalWeights + +▸ **setProposalWeights**(`weights`): `void` + +Set weights used to calculate the score for proposals. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `weights` | `Partial`\<[`ReputationProviderScores`](../interfaces/experimental_reputation_types.ReputationProviderScores)\> | + +#### Returns + +`void` + +#### Defined in + +[src/experimental/reputation/system.ts:297](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L297) + +___ + +### getProposalWeights + +▸ **getProposalWeights**(): `Partial`\<[`ReputationProviderScores`](../interfaces/experimental_reputation_types.ReputationProviderScores)\> + +Returns current proposal weights. + +#### Returns + +`Partial`\<[`ReputationProviderScores`](../interfaces/experimental_reputation_types.ReputationProviderScores)\> + +#### Defined in + +[src/experimental/reputation/system.ts:304](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L304) + +___ + +### setAgreementWeights + +▸ **setAgreementWeights**(`weights`): `void` + +Set weights used to calculate the score for agreements. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `weights` | `Partial`\<[`ReputationProviderScores`](../interfaces/experimental_reputation_types.ReputationProviderScores)\> | + +#### Returns + +`void` + +#### Defined in + +[src/experimental/reputation/system.ts:311](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L311) + +___ + +### getAgreementWeights + +▸ **getAgreementWeights**(): `Partial`\<[`ReputationProviderScores`](../interfaces/experimental_reputation_types.ReputationProviderScores)\> + +Returns current agreement weights. + +#### Returns + +`Partial`\<[`ReputationProviderScores`](../interfaces/experimental_reputation_types.ReputationProviderScores)\> + +#### Defined in + +[src/experimental/reputation/system.ts:318](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L318) + +___ + +### getProviderScores + +▸ **getProviderScores**(`providerId`): `undefined` \| [`ReputationProviderScores`](../interfaces/experimental_reputation_types.ReputationProviderScores) + +Returns scores for a provider or undefined if the provider is unlisted. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `providerId` | `string` | + +#### Returns + +`undefined` \| [`ReputationProviderScores`](../interfaces/experimental_reputation_types.ReputationProviderScores) + +#### Defined in + +[src/experimental/reputation/system.ts:326](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L326) + +___ + +### proposalFilter + +▸ **proposalFilter**(`opts?`): [`ProposalFilter`](../modules/market_proposal_offer_proposal#proposalfilter) + +Returns a proposal filter that can be used to filter out providers with low reputation scores. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `opts?` | [`ProposalFilterOptions`](../interfaces/experimental_reputation_types.ProposalFilterOptions) | + +#### Returns + +[`ProposalFilter`](../modules/market_proposal_offer_proposal#proposalfilter) + +#### Defined in + +[src/experimental/reputation/system.ts:334](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L334) + +___ + +### agreementSelector + +▸ **agreementSelector**(`opts?`): [`ProposalSelector`](../modules/market_draft_offer_proposal_pool#proposalselector) + +Returns an agreement selector that can be used to select providers based on their reputation scores. + +The outcome of this function is determined by current provider scores and the agreement weights set. + +For best results, make sure you test the performance or stability of your workload using different weights. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `opts?` | [`ProposalSelectorOptions`](../interfaces/experimental_reputation_types.ProposalSelectorOptions) | + +#### Returns + +[`ProposalSelector`](../modules/market_draft_offer_proposal_pool#proposalselector) + +**`See`** + +setAgreementWeights + +#### Defined in + +[src/experimental/reputation/system.ts:398](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L398) + +___ + +### calculateScore + +▸ **calculateScore**(`scores`, `weights`): `number` + +Calculate a normalized score based on the given scores and weights. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `scores` | `Partial`\<[`ReputationProviderScores`](../interfaces/experimental_reputation_types.ReputationProviderScores)\> | +| `weights` | `Partial`\<[`ReputationProviderScores`](../interfaces/experimental_reputation_types.ReputationProviderScores)\> | + +#### Returns + +`number` + +#### Defined in + +[src/experimental/reputation/system.ts:428](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L428) + +___ + +### calculateProviderPool + +▸ **calculateProviderPool**(`opts?`): [`ReputationProviderEntry`](../interfaces/experimental_reputation_types.ReputationProviderEntry)[] + +Based on the current reputation data, calculate a list of providers that meet the minimum score requirement. + +This method is useful to validate you filter and weights vs the available provider market. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `opts?` | [`ProposalFilterOptions`](../interfaces/experimental_reputation_types.ProposalFilterOptions) | + +#### Returns + +[`ReputationProviderEntry`](../interfaces/experimental_reputation_types.ReputationProviderEntry)[] + +#### Defined in + +[src/experimental/reputation/system.ts:451](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L451) + +___ + +### sortCandidatesByScore + +▸ **sortCandidatesByScore**(`proposals`, `scoresMap`): [`OfferProposal`](market_proposal_offer_proposal.OfferProposal)[] + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposals` | [`OfferProposal`](market_proposal_offer_proposal.OfferProposal)[] | +| `scoresMap` | `Map`\<`string`, `number`\> | + +#### Returns + +[`OfferProposal`](market_proposal_offer_proposal.OfferProposal)[] + +#### Defined in + +[src/experimental/reputation/system.ts:459](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L459) diff --git a/src/pages/docs/golem-js/reference/classes/golem_network_golem_network.GolemNetwork.md b/src/pages/docs/golem-js/reference/classes/golem_network_golem_network.GolemNetwork.md index fab657563..75f924673 100644 --- a/src/pages/docs/golem-js/reference/classes/golem_network_golem_network.GolemNetwork.md +++ b/src/pages/docs/golem-js/reference/classes/golem_network_golem_network.GolemNetwork.md @@ -6,11 +6,12 @@ type: "JS API Reference" --- # Class: GolemNetwork -[golem\_network/golem\_network](../modules/golem_network_golem_network).GolemNetwork +[golem-network/golem-network](../modules/golem_network_golem_network).GolemNetwork -This API is experimental and subject to change. Use at your own risk. +General purpose and high-level API for the Golem Network -The Golem Network class provides a high-level API for running jobs on the Golem Network. +This class is the main entry-point for developers that would like to build on Golem Network +using `@golem-sdk/golem-js`. It is supposed to provide an easy access API for use 80% of use cases. ## Table of contents @@ -18,25 +19,38 @@ The Golem Network class provides a high-level API for running jobs on the Golem - [constructor](golem_network_golem_network.GolemNetwork#constructor) +### Properties + +- [events](golem_network_golem_network.GolemNetwork#events) +- [options](golem_network_golem_network.GolemNetwork#options) +- [market](golem_network_golem_network.GolemNetwork#market) +- [payment](golem_network_golem_network.GolemNetwork#payment) +- [activity](golem_network_golem_network.GolemNetwork#activity) +- [network](golem_network_golem_network.GolemNetwork#network) +- [rental](golem_network_golem_network.GolemNetwork#rental) +- [services](golem_network_golem_network.GolemNetwork#services) + ### Methods -- [isInitialized](golem_network_golem_network.GolemNetwork#isinitialized) -- [init](golem_network_golem_network.GolemNetwork#init) -- [createJob](golem_network_golem_network.GolemNetwork#createjob) -- [getJobById](golem_network_golem_network.GolemNetwork#getjobbyid) -- [close](golem_network_golem_network.GolemNetwork#close) +- [connect](golem_network_golem_network.GolemNetwork#connect) +- [disconnect](golem_network_golem_network.GolemNetwork#disconnect) +- [oneOf](golem_network_golem_network.GolemNetwork#oneof) +- [manyOf](golem_network_golem_network.GolemNetwork#manyof) +- [isConnected](golem_network_golem_network.GolemNetwork#isconnected) +- [createNetwork](golem_network_golem_network.GolemNetwork#createnetwork) +- [destroyNetwork](golem_network_golem_network.GolemNetwork#destroynetwork) ## Constructors ### constructor -• **new GolemNetwork**(`config`): [`GolemNetwork`](golem_network_golem_network.GolemNetwork) +• **new GolemNetwork**(`options?`): [`GolemNetwork`](golem_network_golem_network.GolemNetwork) #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `config` | [`GolemNetworkConfig`](../modules/golem_network_golem_network#golemnetworkconfig) | Configuration options that will be passed to all jobs created by this instance. | +| Name | Type | +| :------ | :------ | +| `options` | `Partial`\<[`GolemNetworkOptions`](../interfaces/golem_network_golem_network.GolemNetworkOptions)\> | #### Returns @@ -44,92 +58,267 @@ The Golem Network class provides a high-level API for running jobs on the Golem #### Defined in -[src/golem_network/golem_network.ts:24](https://github.com/golemfactory/golem-js/blob/7cee55b/src/golem_network/golem_network.ts#L24) +[src/golem-network/golem-network.ts:211](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L211) + +## Properties + +### events + +• `Readonly` **events**: `EventEmitter`\<[`GolemNetworkEvents`](../interfaces/golem_network_golem_network.GolemNetworkEvents), `any`\> + +#### Defined in + +[src/golem-network/golem-network.ts:182](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L182) + +___ + +### options + +• `Readonly` **options**: [`GolemNetworkOptions`](../interfaces/golem_network_golem_network.GolemNetworkOptions) + +#### Defined in + +[src/golem-network/golem-network.ts:184](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L184) + +___ + +### market + +• `Readonly` **market**: [`MarketModule`](../interfaces/market_market_module.MarketModule) + +#### Defined in + +[src/golem-network/golem-network.ts:190](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L190) + +___ + +### payment + +• `Readonly` **payment**: [`PaymentModule`](../interfaces/payment_payment_module.PaymentModule) + +#### Defined in + +[src/golem-network/golem-network.ts:191](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L191) + +___ + +### activity + +• `Readonly` **activity**: [`ActivityModule`](../interfaces/activity_activity_module.ActivityModule) + +#### Defined in + +[src/golem-network/golem-network.ts:192](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L192) + +___ + +### network + +• `Readonly` **network**: [`NetworkModule`](../interfaces/network_network_module.NetworkModule) + +#### Defined in + +[src/golem-network/golem-network.ts:193](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L193) + +___ + +### rental + +• `Readonly` **rental**: [`RentalModule`](../interfaces/resource_rental_rental_module.RentalModule) + +#### Defined in + +[src/golem-network/golem-network.ts:194](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L194) + +___ + +### services + +• `Readonly` **services**: [`GolemServices`](../modules/golem_network_golem_network#golemservices) + +Dependency Container + +#### Defined in + +[src/golem-network/golem-network.ts:199](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L199) ## Methods -### isInitialized +### connect -▸ **isInitialized**(): `boolean` +▸ **connect**(): `Promise`\<`void`\> + +"Connects" to the network by initializing the underlying components required to perform operations on Golem Network #### Returns -`boolean` +`Promise`\<`void`\> + +Resolves when all initialization steps are completed #### Defined in -[src/golem_network/golem_network.ts:28](https://github.com/golemfactory/golem-js/blob/7cee55b/src/golem_network/golem_network.ts#L28) +[src/golem-network/golem-network.ts:304](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L304) ___ -### init +### disconnect + +▸ **disconnect**(): `Promise`\<`void`\> -▸ **init**(): `Promise`\<`void`\> +"Disconnects" from the Golem Network #### Returns `Promise`\<`void`\> +Resolves when all shutdown steps are completed + #### Defined in -[src/golem_network/golem_network.ts:32](https://github.com/golemfactory/golem-js/blob/7cee55b/src/golem_network/golem_network.ts#L32) +[src/golem-network/golem-network.ts:322](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L322) ___ -### createJob +### oneOf -▸ **createJob**\<`Output`\>(`options?`): [`Job`](job_job.Job)\<`Output`\> +▸ **oneOf**(`options`): `Promise`\<[`ResourceRental`](resource_rental_resource_rental.ResourceRental)\> -Create a new job and add it to the list of jobs managed by this instance. -This method does not start any work on the network, use [Job.startWork](job_job.Job#startwork) for that. +Define your computational resource demand and access a single instance -#### Type parameters +Use Case: Get a single instance of a resource from the market to execute operations on + +#### Parameters | Name | Type | | :------ | :------ | -| `Output` | `unknown` | +| `options` | [`OneOfOptions`](../interfaces/golem_network_golem_network.OneOfOptions) | + +#### Returns + +`Promise`\<[`ResourceRental`](resource_rental_resource_rental.ResourceRental)\> + +**`Example`** + +```ts +const rental = await glm.oneOf(demand); +await rental + .getExeUnit() + .then((exe) => exe.run("echo Hello, Golem! 👋")) + .then((res) => console.log(res.stdout)); +await rental.stopAndFinalize(); +``` + +#### Defined in + +[src/golem-network/golem-network.ts:375](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L375) + +___ + +### manyOf + +▸ **manyOf**(`«destructured»`): `Promise`\<[`ResourceRentalPool`](resource_rental_resource_rental_pool.ResourceRentalPool)\> + +Define your computational resource demand and access a pool of instances. +The pool will grow up to the specified concurrency level. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `options` | [`RunJobOptions`](../modules/job_job#runjoboptions) | Configuration options for the job. These options will be merged with the options passed to the constructor. | +| Name | Type | +| :------ | :------ | +| `«destructured»` | [`ManyOfOptions`](../interfaces/golem_network_golem_network.ManyOfOptions) | #### Returns -[`Job`](job_job.Job)\<`Output`\> +`Promise`\<[`ResourceRentalPool`](resource_rental_resource_rental_pool.ResourceRentalPool)\> + +**`Example`** + +```ts +// create a pool that can grow up to 3 rentals at the same time +const pool = await glm.manyOf({ + concurrency: 3, + demand +}); +await Promise.allSettled([ + pool.withRental(async (rental) => + rental + .getExeUnit() + .then((exe) => exe.run("echo Hello, Golem from the first machine! 👋")) + .then((res) => console.log(res.stdout)), + ), + pool.withRental(async (rental) => + rental + .getExeUnit() + .then((exe) => exe.run("echo Hello, Golem from the second machine! 👋")) + .then((res) => console.log(res.stdout)), + ), + pool.withRental(async (rental) => + rental + .getExeUnit() + .then((exe) => exe.run("echo Hello, Golem from the third machine! 👋")) + .then((res) => console.log(res.stdout)), + ), +]); +``` #### Defined in -[src/golem_network/golem_network.ts:43](https://github.com/golemfactory/golem-js/blob/7cee55b/src/golem_network/golem_network.ts#L43) +[src/golem-network/golem-network.ts:475](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L475) ___ -### getJobById +### isConnected + +▸ **isConnected**(): `boolean` + +#### Returns -▸ **getJobById**(`id`): `undefined` \| [`Job`](job_job.Job)\<`unknown`\> +`boolean` + +#### Defined in + +[src/golem-network/golem-network.ts:525](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L525) + +___ + +### createNetwork + +▸ **createNetwork**(`options?`): `Promise`\<[`Network`](network_network.Network)\> + +Creates a new logical network within the Golem VPN infrastructure. +Allows communication between network nodes using standard network mechanisms, +but requires specific implementation in the ExeUnit/runtime, +which must be capable of providing a standard Unix-socket interface to their payloads +and marshaling the logical network traffic through the Golem Net transport layer #### Parameters | Name | Type | | :------ | :------ | -| `id` | `string` | +| `options?` | [`NetworkOptions`](../interfaces/network_network_module.NetworkOptions) | #### Returns -`undefined` \| [`Job`](job_job.Job)\<`unknown`\> +`Promise`\<[`Network`](network_network.Network)\> #### Defined in -[src/golem_network/golem_network.ts:53](https://github.com/golemfactory/golem-js/blob/7cee55b/src/golem_network/golem_network.ts#L53) +[src/golem-network/golem-network.ts:537](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L537) ___ -### close +### destroyNetwork + +▸ **destroyNetwork**(`network`): `Promise`\<`void`\> + +Removes an existing network from the Golem VPN infrastructure. -▸ **close**(): `Promise`\<`void`\> +#### Parameters -Close the connection to the Yagna service and cancel all running jobs. +| Name | Type | +| :------ | :------ | +| `network` | [`Network`](network_network.Network) | #### Returns @@ -137,4 +326,4 @@ Close the connection to the Yagna service and cancel all running jobs. #### Defined in -[src/golem_network/golem_network.ts:62](https://github.com/golemfactory/golem-js/blob/7cee55b/src/golem_network/golem_network.ts#L62) +[src/golem-network/golem-network.ts:545](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L545) diff --git a/src/pages/docs/golem-js/reference/classes/job_job.Job.md b/src/pages/docs/golem-js/reference/classes/job_job.Job.md deleted file mode 100644 index 6e17bba11..000000000 --- a/src/pages/docs/golem-js/reference/classes/job_job.Job.md +++ /dev/null @@ -1,197 +0,0 @@ ---- -title: "Class Job" -pageTitle: "Class Job - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class Job within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: Job\ - -[job/job](../modules/job_job).Job - -This API is experimental and subject to change. Use at your own risk. - -The Job class represents a single self-contained unit of work that can be run on the Golem Network. -It is responsible for managing the lifecycle of the work and providing information about its state. -It also provides an event emitter that can be used to listen for state changes. - -## Type parameters - -| Name | Type | -| :------ | :------ | -| `Output` | `unknown` | - -## Table of contents - -### Constructors - -- [constructor](job_job.Job#constructor) - -### Properties - -- [events](job_job.Job#events) -- [results](job_job.Job#results) -- [error](job_job.Job#error) -- [state](job_job.Job#state) -- [id](job_job.Job#id) - -### Methods - -- [isRunning](job_job.Job#isrunning) -- [startWork](job_job.Job#startwork) -- [cancel](job_job.Job#cancel) -- [waitForResult](job_job.Job#waitforresult) - -## Constructors - -### constructor - -• **new Job**\<`Output`\>(`id`, `yagnaApi`, `defaultOptions?`): [`Job`](job_job.Job)\<`Output`\> - -Create a new Job instance. It is recommended to use GolemNetwork to create jobs instead of using this constructor directly. - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `Output` | `unknown` | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `yagnaApi` | [`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi) | -| `defaultOptions` | `Partial`\<[`RunJobOptions`](../modules/job_job#runjoboptions)\> | - -#### Returns - -[`Job`](job_job.Job)\<`Output`\> - -#### Defined in - -[src/job/job.ts:76](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L76) - -## Properties - -### events - -• `Readonly` **events**: `EventEmitter`\<[`JobEventsDict`](../interfaces/job_job.JobEventsDict), `any`\> - -#### Defined in - -[src/job/job.ts:62](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L62) - -___ - -### results - -• **results**: `undefined` \| `Output` - -#### Defined in - -[src/job/job.ts:65](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L65) - -___ - -### error - -• **error**: `undefined` \| `Error` - -#### Defined in - -[src/job/job.ts:66](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L66) - -___ - -### state - -• **state**: [`TaskState`](../enums/task_task.TaskState) = `JobState.New` - -#### Defined in - -[src/job/job.ts:67](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L67) - -___ - -### id - -• `Readonly` **id**: `string` - -#### Defined in - -[src/job/job.ts:77](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L77) - -## Methods - -### isRunning - -▸ **isRunning**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/job/job.ts:82](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L82) - -___ - -### startWork - -▸ **startWork**(`workOnGolem`, `options?`): `void` - -Run your worker function on the Golem Network. This method will synchronously initialize all internal services and validate the job options. The work itself will be run asynchronously in the background. -You can use the [Job.events](job_job.Job#events) event emitter to listen for state changes. -You can also use [Job.waitForResult](job_job.Job#waitforresult) to wait for the job to finish and get the results. -If you want to cancel the job, use [Job.cancel](job_job.Job#cancel). -If you want to run multiple jobs in parallel, you can use GolemNetwork.createJob to create multiple jobs and run them in parallel. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `workOnGolem` | [`Worker`](../modules/task_work#worker)\<`Output`\> | Your worker function that will be run on the Golem Network. | -| `options` | [`RunJobOptions`](../modules/job_job#runjoboptions) | Configuration options for the job. These options will be merged with the options passed to the constructor. | - -#### Returns - -`void` - -#### Defined in - -[src/job/job.ts:98](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L98) - -___ - -### cancel - -▸ **cancel**(): `Promise`\<`void`\> - -Cancel the job. This method will stop the activity and wait for it to finish. -Throws an error if the job is not running. - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[src/job/job.ts:235](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L235) - -___ - -### waitForResult - -▸ **waitForResult**(): `Promise`\<`unknown`\> - -Wait for the job to finish and return the results. -Throws an error if the job was not started. - -#### Returns - -`Promise`\<`unknown`\> - -#### Defined in - -[src/job/job.ts:249](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L249) diff --git a/src/pages/docs/golem-js/reference/classes/market_agreement_agreement.Agreement.md b/src/pages/docs/golem-js/reference/classes/market_agreement_agreement.Agreement.md new file mode 100644 index 000000000..de90a4701 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_agreement_agreement.Agreement.md @@ -0,0 +1,127 @@ +--- +title: "Class Agreement" +pageTitle: "Class Agreement - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Agreement within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Agreement + +[market/agreement/agreement](../modules/market_agreement_agreement).Agreement + +Agreement module - an object representing the contract between the requestor and the provider. + +## Table of contents + +### Constructors + +- [constructor](market_agreement_agreement.Agreement#constructor) + +### Properties + +- [id](market_agreement_agreement.Agreement#id) +- [demand](market_agreement_agreement.Agreement#demand) + +### Accessors + +- [provider](market_agreement_agreement.Agreement#provider) + +### Methods + +- [getState](market_agreement_agreement.Agreement#getstate) +- [isFinalState](market_agreement_agreement.Agreement#isfinalstate) + +## Constructors + +### constructor + +• **new Agreement**(`id`, `model`, `demand`): [`Agreement`](market_agreement_agreement.Agreement) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | +| `model` | `Agreement` | +| `demand` | [`Demand`](market_demand_demand.Demand) | + +#### Returns + +[`Agreement`](market_agreement_agreement.Agreement) + +#### Defined in + +[src/market/agreement/agreement.ts:40](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement.ts#L40) + +## Properties + +### id + +• `Readonly` **id**: `string` + +#### Defined in + +[src/market/agreement/agreement.ts:41](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement.ts#L41) + +___ + +### demand + +• `Readonly` **demand**: [`Demand`](market_demand_demand.Demand) + +#### Defined in + +[src/market/agreement/agreement.ts:43](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement.ts#L43) + +## Accessors + +### provider + +• `get` **provider**(): [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) + +#### Returns + +[`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) + +#### Defined in + +[src/market/agreement/agreement.ts:54](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement.ts#L54) + +## Methods + +### getState + +▸ **getState**(): ``"Proposal"`` \| ``"Pending"`` \| ``"Cancelled"`` \| ``"Rejected"`` \| ``"Approved"`` \| ``"Expired"`` \| ``"Terminated"`` + +Return agreement state + +#### Returns + +``"Proposal"`` \| ``"Pending"`` \| ``"Cancelled"`` \| ``"Rejected"`` \| ``"Approved"`` \| ``"Expired"`` \| ``"Terminated"`` + +state + +#### Defined in + +[src/market/agreement/agreement.ts:50](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement.ts#L50) + +___ + +### isFinalState + +▸ **isFinalState**(): `boolean` + +Returns flag if the agreement is in the final state + +#### Returns + +`boolean` + +boolean + +**`Description`** + +if the final state is true, agreement will not change state further anymore + +#### Defined in + +[src/market/agreement/agreement.ts:67](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement.ts#L67) diff --git a/src/pages/docs/golem-js/reference/classes/market_demand_demand.Demand.md b/src/pages/docs/golem-js/reference/classes/market_demand_demand.Demand.md new file mode 100644 index 000000000..6939a89a0 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_demand_demand.Demand.md @@ -0,0 +1,79 @@ +--- +title: "Class Demand" +pageTitle: "Class Demand - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Demand within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Demand + +[market/demand/demand](../modules/market_demand_demand).Demand + +## Table of contents + +### Constructors + +- [constructor](market_demand_demand.Demand#constructor) + +### Properties + +- [id](market_demand_demand.Demand#id) +- [details](market_demand_demand.Demand#details) + +### Accessors + +- [paymentPlatform](market_demand_demand.Demand#paymentplatform) + +## Constructors + +### constructor + +• **new Demand**(`id`, `details`): [`Demand`](market_demand_demand.Demand) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | +| `details` | [`DemandSpecification`](market_demand_demand.DemandSpecification) | + +#### Returns + +[`Demand`](market_demand_demand.Demand) + +#### Defined in + +[src/market/demand/demand.ts:112](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L112) + +## Properties + +### id + +• `Readonly` **id**: `string` + +#### Defined in + +[src/market/demand/demand.ts:113](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L113) + +___ + +### details + +• `Readonly` **details**: [`DemandSpecification`](market_demand_demand.DemandSpecification) + +#### Defined in + +[src/market/demand/demand.ts:114](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L114) + +## Accessors + +### paymentPlatform + +• `get` **paymentPlatform**(): `string` + +#### Returns + +`string` + +#### Defined in + +[src/market/demand/demand.ts:117](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L117) diff --git a/src/pages/docs/golem-js/reference/classes/market_demand_demand.DemandSpecification.md b/src/pages/docs/golem-js/reference/classes/market_demand_demand.DemandSpecification.md new file mode 100644 index 000000000..1c7d82cc0 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_demand_demand.DemandSpecification.md @@ -0,0 +1,75 @@ +--- +title: "Class DemandSpecification" +pageTitle: "Class DemandSpecification - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class DemandSpecification within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: DemandSpecification + +[market/demand/demand](../modules/market_demand_demand).DemandSpecification + +## Table of contents + +### Constructors + +- [constructor](market_demand_demand.DemandSpecification#constructor) + +### Properties + +- [prototype](market_demand_demand.DemandSpecification#prototype) +- [paymentPlatform](market_demand_demand.DemandSpecification#paymentplatform) +- [expirationSec](market_demand_demand.DemandSpecification#expirationsec) + +## Constructors + +### constructor + +• **new DemandSpecification**(`prototype`, `paymentPlatform`, `expirationSec`): [`DemandSpecification`](market_demand_demand.DemandSpecification) + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `prototype` | [`DemandBodyPrototype`](../modules/market_demand_demand_body_builder#demandbodyprototype) | Represents the low level demand request body that will be used to subscribe for offers matching our "computational resource needs" | +| `paymentPlatform` | `string` | - | +| `expirationSec` | `number` | - | + +#### Returns + +[`DemandSpecification`](market_demand_demand.DemandSpecification) + +#### Defined in + +[src/market/demand/demand.ts:103](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L103) + +## Properties + +### prototype + +• `Readonly` **prototype**: [`DemandBodyPrototype`](../modules/market_demand_demand_body_builder#demandbodyprototype) + +Represents the low level demand request body that will be used to subscribe for offers matching our "computational resource needs" + +#### Defined in + +[src/market/demand/demand.ts:105](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L105) + +___ + +### paymentPlatform + +• `Readonly` **paymentPlatform**: `string` + +#### Defined in + +[src/market/demand/demand.ts:106](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L106) + +___ + +### expirationSec + +• `Readonly` **expirationSec**: `number` + +#### Defined in + +[src/market/demand/demand.ts:107](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L107) diff --git a/src/pages/docs/golem-js/reference/classes/market_demand_demand_body_builder.DemandBodyBuilder.md b/src/pages/docs/golem-js/reference/classes/market_demand_demand_body_builder.DemandBodyBuilder.md new file mode 100644 index 000000000..ae2104b07 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_demand_demand_body_builder.DemandBodyBuilder.md @@ -0,0 +1,119 @@ +--- +title: "Class DemandBodyBuilder" +pageTitle: "Class DemandBodyBuilder - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class DemandBodyBuilder within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: DemandBodyBuilder + +[market/demand/demand-body-builder](../modules/market_demand_demand_body_builder).DemandBodyBuilder + +A helper class assisting in building the Golem Demand object + +Various directors should use the builder to add properties and constraints before the final product is received +from the builder and sent to yagna to subscribe for matched offers (proposals). + +The main purpose of the builder is to accept different requirements (properties and constraints) from different +directors who know what kind of properties and constraints are needed. Then it helps to merge these requirements. + +Demand -> DemandSpecification -> DemandPrototype -> DemandDTO + +## Table of contents + +### Constructors + +- [constructor](market_demand_demand_body_builder.DemandBodyBuilder#constructor) + +### Methods + +- [addProperty](market_demand_demand_body_builder.DemandBodyBuilder#addproperty) +- [addConstraint](market_demand_demand_body_builder.DemandBodyBuilder#addconstraint) +- [getProduct](market_demand_demand_body_builder.DemandBodyBuilder#getproduct) +- [mergePrototype](market_demand_demand_body_builder.DemandBodyBuilder#mergeprototype) + +## Constructors + +### constructor + +• **new DemandBodyBuilder**(): [`DemandBodyBuilder`](market_demand_demand_body_builder.DemandBodyBuilder) + +#### Returns + +[`DemandBodyBuilder`](market_demand_demand_body_builder.DemandBodyBuilder) + +## Methods + +### addProperty + +▸ **addProperty**(`key`, `value`): [`DemandBodyBuilder`](market_demand_demand_body_builder.DemandBodyBuilder) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `key` | `string` | +| `value` | [`DemandPropertyValue`](../modules/market_demand_demand_body_builder#demandpropertyvalue) | + +#### Returns + +[`DemandBodyBuilder`](market_demand_demand_body_builder.DemandBodyBuilder) + +#### Defined in + +[src/market/demand/demand-body-builder.ts:60](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand-body-builder.ts#L60) + +___ + +### addConstraint + +▸ **addConstraint**(`key`, `value`, `comparisonOperator?`): [`DemandBodyBuilder`](market_demand_demand_body_builder.DemandBodyBuilder) + +#### Parameters + +| Name | Type | Default value | +| :------ | :------ | :------ | +| `key` | `string` | `undefined` | +| `value` | `string` \| `number` | `undefined` | +| `comparisonOperator` | [`ComparisonOperator`](../enums/market_demand_demand_body_builder.ComparisonOperator) | `ComparisonOperator.Eq` | + +#### Returns + +[`DemandBodyBuilder`](market_demand_demand_body_builder.DemandBodyBuilder) + +#### Defined in + +[src/market/demand/demand-body-builder.ts:70](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand-body-builder.ts#L70) + +___ + +### getProduct + +▸ **getProduct**(): [`DemandBodyPrototype`](../modules/market_demand_demand_body_builder#demandbodyprototype) + +#### Returns + +[`DemandBodyPrototype`](../modules/market_demand_demand_body_builder#demandbodyprototype) + +#### Defined in + +[src/market/demand/demand-body-builder.ts:75](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand-body-builder.ts#L75) + +___ + +### mergePrototype + +▸ **mergePrototype**(`prototype`): [`DemandBodyBuilder`](market_demand_demand_body_builder.DemandBodyBuilder) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `prototype` | [`DemandBodyPrototype`](../modules/market_demand_demand_body_builder#demandbodyprototype) | + +#### Returns + +[`DemandBodyBuilder`](market_demand_demand_body_builder.DemandBodyBuilder) + +#### Defined in + +[src/market/demand/demand-body-builder.ts:82](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand-body-builder.ts#L82) diff --git a/src/pages/docs/golem-js/reference/classes/market_demand_directors_base_config.BaseConfig.md b/src/pages/docs/golem-js/reference/classes/market_demand_directors_base_config.BaseConfig.md new file mode 100644 index 000000000..325407444 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_demand_directors_base_config.BaseConfig.md @@ -0,0 +1,61 @@ +--- +title: "Class BaseConfig" +pageTitle: "Class BaseConfig - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class BaseConfig within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: BaseConfig + +[market/demand/directors/base-config](../modules/market_demand_directors_base_config).BaseConfig + +Basic config utility class + +Helps in building more specific config classes + +## Hierarchy + +- **`BaseConfig`** + + ↳ [`BasicDemandDirectorConfig`](market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig) + + ↳ [`PaymentDemandDirectorConfig`](market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig) + +## Table of contents + +### Constructors + +- [constructor](market_demand_directors_base_config.BaseConfig#constructor) + +### Methods + +- [isPositiveInt](market_demand_directors_base_config.BaseConfig#ispositiveint) + +## Constructors + +### constructor + +• **new BaseConfig**(): [`BaseConfig`](market_demand_directors_base_config.BaseConfig) + +#### Returns + +[`BaseConfig`](market_demand_directors_base_config.BaseConfig) + +## Methods + +### isPositiveInt + +▸ **isPositiveInt**(`value`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `number` | + +#### Returns + +`boolean` + +#### Defined in + +[src/market/demand/directors/base-config.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/base-config.ts#L7) diff --git a/src/pages/docs/golem-js/reference/classes/market_demand_directors_basic_demand_director.BasicDemandDirector.md b/src/pages/docs/golem-js/reference/classes/market_demand_directors_basic_demand_director.BasicDemandDirector.md new file mode 100644 index 000000000..f6c291a5b --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_demand_directors_basic_demand_director.BasicDemandDirector.md @@ -0,0 +1,76 @@ +--- +title: "Class BasicDemandDirector" +pageTitle: "Class BasicDemandDirector - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class BasicDemandDirector within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: BasicDemandDirector + +[market/demand/directors/basic-demand-director](../modules/market_demand_directors_basic_demand_director).BasicDemandDirector + +Represents a director that can instruct DemandDetailsBuilder + +Demand is a complex concept in Golem. Requestors can place arbitrary properties and constraints on such +market entity. While the demand request on the Golem Protocol level is a flat list of properties (key, value) and constraints, +from the Requestor side they form logical groups that make sense together. + +The idea behind Directors is that you can encapsulate this grouping knowledge along with validation logic etc to prepare +all the final demand request body properties in a more controlled and organized manner. + +## Implements + +- [`IDemandDirector`](../interfaces/market_market_module.IDemandDirector) + +## Table of contents + +### Constructors + +- [constructor](market_demand_directors_basic_demand_director.BasicDemandDirector#constructor) + +### Methods + +- [apply](market_demand_directors_basic_demand_director.BasicDemandDirector#apply) + +## Constructors + +### constructor + +• **new BasicDemandDirector**(`config?`): [`BasicDemandDirector`](market_demand_directors_basic_demand_director.BasicDemandDirector) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `config` | [`BasicDemandDirectorConfig`](market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig) | + +#### Returns + +[`BasicDemandDirector`](market_demand_directors_basic_demand_director.BasicDemandDirector) + +#### Defined in + +[src/market/demand/directors/basic-demand-director.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/basic-demand-director.ts#L6) + +## Methods + +### apply + +▸ **apply**(`builder`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `builder` | [`DemandBodyBuilder`](market_demand_demand_body_builder.DemandBodyBuilder) | + +#### Returns + +`void` + +#### Implementation of + +[IDemandDirector](../interfaces/market_market_module.IDemandDirector).[apply](../interfaces/market_market_module.IDemandDirector#apply) + +#### Defined in + +[src/market/demand/directors/basic-demand-director.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/basic-demand-director.ts#L8) diff --git a/src/pages/docs/golem-js/reference/classes/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig.md b/src/pages/docs/golem-js/reference/classes/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig.md new file mode 100644 index 000000000..d3e8ab480 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig.md @@ -0,0 +1,114 @@ +--- +title: "Class BasicDemandDirectorConfig" +pageTitle: "Class BasicDemandDirectorConfig - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class BasicDemandDirectorConfig within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: BasicDemandDirectorConfig + +[market/demand/directors/basic-demand-director-config](../modules/market_demand_directors_basic_demand_director_config).BasicDemandDirectorConfig + +Basic config utility class + +Helps in building more specific config classes + +## Hierarchy + +- [`BaseConfig`](market_demand_directors_base_config.BaseConfig) + + ↳ **`BasicDemandDirectorConfig`** + +## Implements + +- [`BasicDemandDirectorConfigOptions`](../interfaces/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions) + +## Table of contents + +### Constructors + +- [constructor](market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig#constructor) + +### Properties + +- [expirationSec](market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig#expirationsec) +- [subnetTag](market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig#subnettag) + +### Methods + +- [isPositiveInt](market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig#ispositiveint) + +## Constructors + +### constructor + +• **new BasicDemandDirectorConfig**(`options?`): [`BasicDemandDirectorConfig`](market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | `Partial`\<[`BasicDemandDirectorConfigOptions`](../interfaces/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions)\> | + +#### Returns + +[`BasicDemandDirectorConfig`](market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig) + +#### Overrides + +[BaseConfig](market_demand_directors_base_config.BaseConfig).[constructor](market_demand_directors_base_config.BaseConfig#constructor) + +#### Defined in + +[src/market/demand/directors/basic-demand-director-config.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/basic-demand-director-config.ts#L14) + +## Properties + +### expirationSec + +• `Readonly` **expirationSec**: `number` + +#### Implementation of + +[BasicDemandDirectorConfigOptions](../interfaces/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions).[expirationSec](../interfaces/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions#expirationsec) + +#### Defined in + +[src/market/demand/directors/basic-demand-director-config.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/basic-demand-director-config.ts#L11) + +___ + +### subnetTag + +• `Readonly` **subnetTag**: `string` + +#### Implementation of + +[BasicDemandDirectorConfigOptions](../interfaces/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions).[subnetTag](../interfaces/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions#subnettag) + +#### Defined in + +[src/market/demand/directors/basic-demand-director-config.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/basic-demand-director-config.ts#L12) + +## Methods + +### isPositiveInt + +▸ **isPositiveInt**(`value`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `number` | + +#### Returns + +`boolean` + +#### Inherited from + +[BaseConfig](market_demand_directors_base_config.BaseConfig).[isPositiveInt](market_demand_directors_base_config.BaseConfig#ispositiveint) + +#### Defined in + +[src/market/demand/directors/base-config.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/base-config.ts#L7) diff --git a/src/pages/docs/golem-js/reference/classes/market_demand_directors_payment_demand_director.PaymentDemandDirector.md b/src/pages/docs/golem-js/reference/classes/market_demand_directors_payment_demand_director.PaymentDemandDirector.md new file mode 100644 index 000000000..9e8015348 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_demand_directors_payment_demand_director.PaymentDemandDirector.md @@ -0,0 +1,78 @@ +--- +title: "Class PaymentDemandDirector" +pageTitle: "Class PaymentDemandDirector - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class PaymentDemandDirector within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: PaymentDemandDirector + +[market/demand/directors/payment-demand-director](../modules/market_demand_directors_payment_demand_director).PaymentDemandDirector + +Represents a director that can instruct DemandDetailsBuilder + +Demand is a complex concept in Golem. Requestors can place arbitrary properties and constraints on such +market entity. While the demand request on the Golem Protocol level is a flat list of properties (key, value) and constraints, +from the Requestor side they form logical groups that make sense together. + +The idea behind Directors is that you can encapsulate this grouping knowledge along with validation logic etc to prepare +all the final demand request body properties in a more controlled and organized manner. + +## Implements + +- [`IDemandDirector`](../interfaces/market_market_module.IDemandDirector) + +## Table of contents + +### Constructors + +- [constructor](market_demand_directors_payment_demand_director.PaymentDemandDirector#constructor) + +### Methods + +- [apply](market_demand_directors_payment_demand_director.PaymentDemandDirector#apply) + +## Constructors + +### constructor + +• **new PaymentDemandDirector**(`allocation`, `marketApiAdapter`, `config?`): [`PaymentDemandDirector`](market_demand_directors_payment_demand_director.PaymentDemandDirector) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `allocation` | [`Allocation`](payment_allocation.Allocation) | +| `marketApiAdapter` | [`IMarketApi`](../interfaces/market_api.IMarketApi) | +| `config` | [`PaymentDemandDirectorConfig`](market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig) | + +#### Returns + +[`PaymentDemandDirector`](market_demand_directors_payment_demand_director.PaymentDemandDirector) + +#### Defined in + +[src/market/demand/directors/payment-demand-director.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/payment-demand-director.ts#L8) + +## Methods + +### apply + +▸ **apply**(`builder`): `Promise`\<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `builder` | [`DemandBodyBuilder`](market_demand_demand_body_builder.DemandBodyBuilder) | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[IDemandDirector](../interfaces/market_market_module.IDemandDirector).[apply](../interfaces/market_market_module.IDemandDirector#apply) + +#### Defined in + +[src/market/demand/directors/payment-demand-director.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/payment-demand-director.ts#L14) diff --git a/src/pages/docs/golem-js/reference/classes/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig.md b/src/pages/docs/golem-js/reference/classes/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig.md new file mode 100644 index 000000000..300a37f41 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig.md @@ -0,0 +1,129 @@ +--- +title: "Class PaymentDemandDirectorConfig" +pageTitle: "Class PaymentDemandDirectorConfig - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class PaymentDemandDirectorConfig within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: PaymentDemandDirectorConfig + +[market/demand/directors/payment-demand-director-config](../modules/market_demand_directors_payment_demand_director_config).PaymentDemandDirectorConfig + +Basic config utility class + +Helps in building more specific config classes + +## Hierarchy + +- [`BaseConfig`](market_demand_directors_base_config.BaseConfig) + + ↳ **`PaymentDemandDirectorConfig`** + +## Implements + +- [`PaymentDemandDirectorConfigOptions`](../interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions) + +## Table of contents + +### Constructors + +- [constructor](market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig#constructor) + +### Properties + +- [debitNotesAcceptanceTimeoutSec](market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig#debitnotesacceptancetimeoutsec) +- [midAgreementDebitNoteIntervalSec](market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig#midagreementdebitnoteintervalsec) +- [midAgreementPaymentTimeoutSec](market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig#midagreementpaymenttimeoutsec) + +### Methods + +- [isPositiveInt](market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig#ispositiveint) + +## Constructors + +### constructor + +• **new PaymentDemandDirectorConfig**(`options?`): [`PaymentDemandDirectorConfig`](market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | `Partial`\<[`PaymentDemandDirectorConfigOptions`](../interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions)\> | + +#### Returns + +[`PaymentDemandDirectorConfig`](market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig) + +#### Overrides + +[BaseConfig](market_demand_directors_base_config.BaseConfig).[constructor](market_demand_directors_base_config.BaseConfig#constructor) + +#### Defined in + +[src/market/demand/directors/payment-demand-director-config.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/payment-demand-director-config.ts#L15) + +## Properties + +### debitNotesAcceptanceTimeoutSec + +• `Readonly` **debitNotesAcceptanceTimeoutSec**: `number` + +#### Implementation of + +[PaymentDemandDirectorConfigOptions](../interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions).[debitNotesAcceptanceTimeoutSec](../interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions#debitnotesacceptancetimeoutsec) + +#### Defined in + +[src/market/demand/directors/payment-demand-director-config.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/payment-demand-director-config.ts#L11) + +___ + +### midAgreementDebitNoteIntervalSec + +• `Readonly` **midAgreementDebitNoteIntervalSec**: `number` + +#### Implementation of + +[PaymentDemandDirectorConfigOptions](../interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions).[midAgreementDebitNoteIntervalSec](../interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions#midagreementdebitnoteintervalsec) + +#### Defined in + +[src/market/demand/directors/payment-demand-director-config.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/payment-demand-director-config.ts#L12) + +___ + +### midAgreementPaymentTimeoutSec + +• `Readonly` **midAgreementPaymentTimeoutSec**: `number` + +#### Implementation of + +[PaymentDemandDirectorConfigOptions](../interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions).[midAgreementPaymentTimeoutSec](../interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions#midagreementpaymenttimeoutsec) + +#### Defined in + +[src/market/demand/directors/payment-demand-director-config.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/payment-demand-director-config.ts#L13) + +## Methods + +### isPositiveInt + +▸ **isPositiveInt**(`value`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `number` | + +#### Returns + +`boolean` + +#### Inherited from + +[BaseConfig](market_demand_directors_base_config.BaseConfig).[isPositiveInt](market_demand_directors_base_config.BaseConfig#ispositiveint) + +#### Defined in + +[src/market/demand/directors/base-config.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/base-config.ts#L7) diff --git a/src/pages/docs/golem-js/reference/classes/market_demand_directors_workload_demand_director.WorkloadDemandDirector.md b/src/pages/docs/golem-js/reference/classes/market_demand_directors_workload_demand_director.WorkloadDemandDirector.md new file mode 100644 index 000000000..e51094b33 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_demand_directors_workload_demand_director.WorkloadDemandDirector.md @@ -0,0 +1,76 @@ +--- +title: "Class WorkloadDemandDirector" +pageTitle: "Class WorkloadDemandDirector - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class WorkloadDemandDirector within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: WorkloadDemandDirector + +[market/demand/directors/workload-demand-director](../modules/market_demand_directors_workload_demand_director).WorkloadDemandDirector + +Represents a director that can instruct DemandDetailsBuilder + +Demand is a complex concept in Golem. Requestors can place arbitrary properties and constraints on such +market entity. While the demand request on the Golem Protocol level is a flat list of properties (key, value) and constraints, +from the Requestor side they form logical groups that make sense together. + +The idea behind Directors is that you can encapsulate this grouping knowledge along with validation logic etc to prepare +all the final demand request body properties in a more controlled and organized manner. + +## Implements + +- [`IDemandDirector`](../interfaces/market_market_module.IDemandDirector) + +## Table of contents + +### Constructors + +- [constructor](market_demand_directors_workload_demand_director.WorkloadDemandDirector#constructor) + +### Methods + +- [apply](market_demand_directors_workload_demand_director.WorkloadDemandDirector#apply) + +## Constructors + +### constructor + +• **new WorkloadDemandDirector**(`config`): [`WorkloadDemandDirector`](market_demand_directors_workload_demand_director.WorkloadDemandDirector) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `config` | [`WorkloadDemandDirectorConfig`](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig) | + +#### Returns + +[`WorkloadDemandDirector`](market_demand_directors_workload_demand_director.WorkloadDemandDirector) + +#### Defined in + +[src/market/demand/directors/workload-demand-director.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director.ts#L8) + +## Methods + +### apply + +▸ **apply**(`builder`): `Promise`\<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `builder` | [`DemandBodyBuilder`](market_demand_demand_body_builder.DemandBodyBuilder) | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[IDemandDirector](../interfaces/market_market_module.IDemandDirector).[apply](../interfaces/market_market_module.IDemandDirector#apply) + +#### Defined in + +[src/market/demand/directors/workload-demand-director.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director.ts#L10) diff --git a/src/pages/docs/golem-js/reference/classes/market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig.md b/src/pages/docs/golem-js/reference/classes/market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig.md new file mode 100644 index 000000000..b5175b2b7 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig.md @@ -0,0 +1,203 @@ +--- +title: "Class WorkloadDemandDirectorConfig" +pageTitle: "Class WorkloadDemandDirectorConfig - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class WorkloadDemandDirectorConfig within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: WorkloadDemandDirectorConfig + +[market/demand/directors/workload-demand-director-config](../modules/market_demand_directors_workload_demand_director_config).WorkloadDemandDirectorConfig + +## Table of contents + +### Constructors + +- [constructor](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#constructor) + +### Properties + +- [packageFormat](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#packageformat) +- [engine](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#engine) +- [minMemGib](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#minmemgib) +- [minStorageGib](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#minstoragegib) +- [minCpuThreads](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#mincputhreads) +- [minCpuCores](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#mincpucores) +- [capabilities](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#capabilities) +- [manifest](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#manifest) +- [manifestSig](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#manifestsig) +- [manifestSigAlgorithm](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#manifestsigalgorithm) +- [manifestCert](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#manifestcert) +- [useHttps](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#usehttps) +- [imageHash](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#imagehash) +- [imageTag](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#imagetag) +- [imageUrl](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig#imageurl) + +## Constructors + +### constructor + +• **new WorkloadDemandDirectorConfig**(`options?`): [`WorkloadDemandDirectorConfig`](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | `Partial`\<[`WorkloadDemandDirectorConfigOptions`](../modules/market_demand_options#workloaddemanddirectorconfigoptions)\> | + +#### Returns + +[`WorkloadDemandDirectorConfig`](market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig) + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:25](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L25) + +## Properties + +### packageFormat + +• `Readonly` **packageFormat**: `string` = `PackageFormat.GVMKitSquash` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L9) + +___ + +### engine + +• `Readonly` **engine**: `string` = `"vm"` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L10) + +___ + +### minMemGib + +• `Readonly` **minMemGib**: `number` = `0.5` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L11) + +___ + +### minStorageGib + +• `Readonly` **minStorageGib**: `number` = `2` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L12) + +___ + +### minCpuThreads + +• `Readonly` **minCpuThreads**: `number` = `1` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L13) + +___ + +### minCpuCores + +• `Readonly` **minCpuCores**: `number` = `1` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L14) + +___ + +### capabilities + +• `Readonly` **capabilities**: `string`[] = `[]` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L15) + +___ + +### manifest + +• `Optional` `Readonly` **manifest**: `string` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L16) + +___ + +### manifestSig + +• `Optional` `Readonly` **manifestSig**: `string` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L17) + +___ + +### manifestSigAlgorithm + +• `Optional` `Readonly` **manifestSigAlgorithm**: `string` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L18) + +___ + +### manifestCert + +• `Optional` `Readonly` **manifestCert**: `string` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L19) + +___ + +### useHttps + +• `Optional` `Readonly` **useHttps**: `boolean` = `false` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L20) + +___ + +### imageHash + +• `Optional` `Readonly` **imageHash**: `string` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:21](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L21) + +___ + +### imageTag + +• `Optional` `Readonly` **imageTag**: `string` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L22) + +___ + +### imageUrl + +• `Optional` `Readonly` **imageUrl**: `string` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L23) diff --git a/src/pages/docs/golem-js/reference/classes/market_draft_offer_proposal_pool.DraftOfferProposalPool.md b/src/pages/docs/golem-js/reference/classes/market_draft_offer_proposal_pool.DraftOfferProposalPool.md new file mode 100644 index 000000000..4e2f2a568 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_draft_offer_proposal_pool.DraftOfferProposalPool.md @@ -0,0 +1,281 @@ +--- +title: "Class DraftOfferProposalPool" +pageTitle: "Class DraftOfferProposalPool - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class DraftOfferProposalPool within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: DraftOfferProposalPool + +[market/draft-offer-proposal-pool](../modules/market_draft_offer_proposal_pool).DraftOfferProposalPool + +Pool of draft offer proposals that are ready to be promoted to agreements with Providers + +Reaching this pool means that the related initial proposal which was delivered by Yagna in response +to the subscription with the Demand has been fully negotiated between the Provider and Requestor. + +This pool should contain only offer proposals that can be used to pursue the final Agreement between the +parties. + +Technically, the "market" part of you application should populate this pool with such offer proposals. + +## Table of contents + +### Constructors + +- [constructor](market_draft_offer_proposal_pool.DraftOfferProposalPool#constructor) + +### Properties + +- [events](market_draft_offer_proposal_pool.DraftOfferProposalPool#events) + +### Methods + +- [add](market_draft_offer_proposal_pool.DraftOfferProposalPool#add) +- [acquire](market_draft_offer_proposal_pool.DraftOfferProposalPool#acquire) +- [release](market_draft_offer_proposal_pool.DraftOfferProposalPool#release) +- [remove](market_draft_offer_proposal_pool.DraftOfferProposalPool#remove) +- [count](market_draft_offer_proposal_pool.DraftOfferProposalPool#count) +- [availableCount](market_draft_offer_proposal_pool.DraftOfferProposalPool#availablecount) +- [leasedCount](market_draft_offer_proposal_pool.DraftOfferProposalPool#leasedcount) +- [isReady](market_draft_offer_proposal_pool.DraftOfferProposalPool#isready) +- [clear](market_draft_offer_proposal_pool.DraftOfferProposalPool#clear) +- [removeFromAvailable](market_draft_offer_proposal_pool.DraftOfferProposalPool#removefromavailable) +- [readFrom](market_draft_offer_proposal_pool.DraftOfferProposalPool#readfrom) + +## Constructors + +### constructor + +• **new DraftOfferProposalPool**(`options?`): [`DraftOfferProposalPool`](market_draft_offer_proposal_pool.DraftOfferProposalPool) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | [`ProposalPoolOptions`](../interfaces/market_draft_offer_proposal_pool.ProposalPoolOptions) | + +#### Returns + +[`DraftOfferProposalPool`](market_draft_offer_proposal_pool.DraftOfferProposalPool) + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:78](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L78) + +## Properties + +### events + +• `Readonly` **events**: `EventEmitter`\<[`ProposalPoolEvents`](../interfaces/market_draft_offer_proposal_pool.ProposalPoolEvents), `any`\> + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:54](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L54) + +## Methods + +### add + +▸ **add**(`proposal`): `void` + +Pushes the provided proposal to the list of proposals available for lease + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](market_proposal_offer_proposal.OfferProposal) | + +#### Returns + +`void` + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:96](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L96) + +___ + +### acquire + +▸ **acquire**(`signalOrTimeout?`): `Promise`\<[`OfferProposal`](market_proposal_offer_proposal.OfferProposal)\> + +Attempts to obtain a single proposal from the pool + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `signalOrTimeout?` | `number` \| `AbortSignal` | the timeout in milliseconds or an AbortSignal that will be used to cancel the acquiring | + +#### Returns + +`Promise`\<[`OfferProposal`](market_proposal_offer_proposal.OfferProposal)\> + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:111](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L111) + +___ + +### release + +▸ **release**(`proposal`): `Promise`\<`void`\> + +Releases the proposal back to the pool + +Validates if the proposal is still usable before putting it back to the list of available ones + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](market_proposal_offer_proposal.OfferProposal) | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:155](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L155) + +___ + +### remove + +▸ **remove**(`proposal`): `Promise`\<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](market_proposal_offer_proposal.OfferProposal) | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:168](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L168) + +___ + +### count + +▸ **count**(): `number` + +Returns the number of all items in the pool (available + leased out) + +#### Returns + +`number` + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:185](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L185) + +___ + +### availableCount + +▸ **availableCount**(): `number` + +Returns the number of items that are possible to lease from the pool + +#### Returns + +`number` + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:192](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L192) + +___ + +### leasedCount + +▸ **leasedCount**(): `number` + +Returns the number of items that were leased out of the pool + +#### Returns + +`number` + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:199](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L199) + +___ + +### isReady + +▸ **isReady**(): `boolean` + +Tells if the pool is ready to take items from + +#### Returns + +`boolean` + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:206](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L206) + +___ + +### clear + +▸ **clear**(): `Promise`\<`void`\> + +Clears the pool entirely + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:213](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L213) + +___ + +### removeFromAvailable + +▸ **removeFromAvailable**(`proposal`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](market_proposal_offer_proposal.OfferProposal) | + +#### Returns + +`void` + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:231](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L231) + +___ + +### readFrom + +▸ **readFrom**(`source`): `Subscription` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `source` | `Observable`\<[`OfferProposal`](market_proposal_offer_proposal.OfferProposal)\> | + +#### Returns + +`Subscription` + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:236](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L236) diff --git a/src/pages/docs/golem-js/reference/classes/market_error.GolemMarketError.md b/src/pages/docs/golem-js/reference/classes/market_error.GolemMarketError.md index ae626acb4..bf2c50108 100644 --- a/src/pages/docs/golem-js/reference/classes/market_error.GolemMarketError.md +++ b/src/pages/docs/golem-js/reference/classes/market_error.GolemMarketError.md @@ -14,7 +14,7 @@ additionally containing an error code specific to a given subdomain ## Hierarchy -- [`GolemModuleError`](error_golem_error.GolemModuleError) +- [`GolemModuleError`](shared_error_golem_error.GolemModuleError) ↳ **`GolemMarketError`** @@ -27,14 +27,13 @@ additionally containing an error code specific to a given subdomain ### Properties - [code](market_error.GolemMarketError#code) -- [demand](market_error.GolemMarketError#demand) - [previous](market_error.GolemMarketError#previous) ## Constructors ### constructor -• **new GolemMarketError**(`message`, `code`, `demand?`, `previous?`): [`GolemMarketError`](market_error.GolemMarketError) +• **new GolemMarketError**(`message`, `code`, `previous?`): [`GolemMarketError`](market_error.GolemMarketError) #### Parameters @@ -42,7 +41,6 @@ additionally containing an error code specific to a given subdomain | :------ | :------ | | `message` | `string` | | `code` | [`MarketErrorCode`](../enums/market_error.MarketErrorCode) | -| `demand?` | `Demand` | | `previous?` | `Error` | #### Returns @@ -51,11 +49,11 @@ additionally containing an error code specific to a given subdomain #### Overrides -[GolemModuleError](error_golem_error.GolemModuleError).[constructor](error_golem_error.GolemModuleError#constructor) +[GolemModuleError](shared_error_golem_error.GolemModuleError).[constructor](shared_error_golem_error.GolemModuleError#constructor) #### Defined in -[src/market/error.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L18) +[src/market/error.ts:21](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L21) ## Properties @@ -65,21 +63,11 @@ additionally containing an error code specific to a given subdomain #### Inherited from -[GolemModuleError](error_golem_error.GolemModuleError).[code](error_golem_error.GolemModuleError#code) +[GolemModuleError](shared_error_golem_error.GolemModuleError).[code](shared_error_golem_error.GolemModuleError#code) #### Defined in -[src/market/error.ts:20](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L20) - -___ - -### demand - -• `Optional` **demand**: `Demand` - -#### Defined in - -[src/market/error.ts:21](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L21) +[src/market/error.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L23) ___ @@ -91,8 +79,8 @@ The previous error, if any, that led to this error. #### Inherited from -[GolemModuleError](error_golem_error.GolemModuleError).[previous](error_golem_error.GolemModuleError#previous) +[GolemModuleError](shared_error_golem_error.GolemModuleError).[previous](shared_error_golem_error.GolemModuleError#previous) #### Defined in -[src/market/error.ts:22](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L22) +[src/market/error.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L24) diff --git a/src/pages/docs/golem-js/reference/classes/market_market_module.MarketModuleImpl.md b/src/pages/docs/golem-js/reference/classes/market_market_module.MarketModuleImpl.md new file mode 100644 index 000000000..7bd10b816 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_market_module.MarketModuleImpl.md @@ -0,0 +1,423 @@ +--- +title: "Class MarketModuleImpl" +pageTitle: "Class MarketModuleImpl - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class MarketModuleImpl within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: MarketModuleImpl + +[market/market.module](../modules/market_market_module).MarketModuleImpl + +## Implements + +- [`MarketModule`](../interfaces/market_market_module.MarketModule) + +## Table of contents + +### Constructors + +- [constructor](market_market_module.MarketModuleImpl#constructor) + +### Properties + +- [events](market_market_module.MarketModuleImpl#events) + +### Methods + +- [buildDemandDetails](market_market_module.MarketModuleImpl#builddemanddetails) +- [publishAndRefreshDemand](market_market_module.MarketModuleImpl#publishandrefreshdemand) +- [collectMarketProposalEvents](market_market_module.MarketModuleImpl#collectmarketproposalevents) +- [collectAllOfferProposals](market_market_module.MarketModuleImpl#collectallofferproposals) +- [negotiateProposal](market_market_module.MarketModuleImpl#negotiateproposal) +- [proposeAgreement](market_market_module.MarketModuleImpl#proposeagreement) +- [terminateAgreement](market_market_module.MarketModuleImpl#terminateagreement) +- [collectDraftOfferProposals](market_market_module.MarketModuleImpl#collectdraftofferproposals) +- [signAgreementFromPool](market_market_module.MarketModuleImpl#signagreementfrompool) +- [estimateBudget](market_market_module.MarketModuleImpl#estimatebudget) +- [fetchAgreement](market_market_module.MarketModuleImpl#fetchagreement) + +## Constructors + +### constructor + +• **new MarketModuleImpl**(`deps`): [`MarketModuleImpl`](market_market_module.MarketModuleImpl) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `deps` | `Object` | +| `deps.logger` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | +| `deps.yagna` | [`YagnaApi`](shared_yagna_yagnaApi.YagnaApi) | +| `deps.paymentApi` | [`IPaymentApi`](../interfaces/payment_api.IPaymentApi) | +| `deps.activityApi` | [`IActivityApi`](../interfaces/activity_api.IActivityApi) | +| `deps.marketApi` | [`IMarketApi`](../interfaces/market_api.IMarketApi) | +| `deps.networkApi` | [`INetworkApi`](../interfaces/network_api.INetworkApi) | +| `deps.networkModule` | [`NetworkModule`](../interfaces/network_network_module.NetworkModule) | +| `deps.fileServer` | [`IFileServer`](../interfaces/activity_activity_module.IFileServer) | +| `deps.storageProvider` | [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) | + +#### Returns + +[`MarketModuleImpl`](market_market_module.MarketModuleImpl) + +#### Defined in + +[src/market/market.module.ts:215](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L215) + +## Properties + +### events + +• **events**: `EventEmitter`\<[`MarketEvents`](../modules/market_api#marketevents), `any`\> + +#### Implementation of + +[MarketModule](../interfaces/market_market_module.MarketModule).[events](../interfaces/market_market_module.MarketModule#events) + +#### Defined in + +[src/market/market.module.ts:209](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L209) + +## Methods + +### buildDemandDetails + +▸ **buildDemandDetails**(`options`, `allocation`): `Promise`\<[`DemandSpecification`](market_demand_demand.DemandSpecification)\> + +Build a DemandSpecification based on the given options and allocation. +You can obtain an allocation using the payment module. +The method returns a DemandSpecification that can be used to publish the demand to the market, +for example using the `publishDemand` method. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options` | [`BuildDemandOptions`](../modules/market_demand_demand#builddemandoptions) | +| `allocation` | [`Allocation`](payment_allocation.Allocation) | + +#### Returns + +`Promise`\<[`DemandSpecification`](market_demand_demand.DemandSpecification)\> + +#### Implementation of + +[MarketModule](../interfaces/market_market_module.MarketModule).[buildDemandDetails](../interfaces/market_market_module.MarketModule#builddemanddetails) + +#### Defined in + +[src/market/market.module.ts:235](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L235) + +___ + +### publishAndRefreshDemand + +▸ **publishAndRefreshDemand**(`demandSpecification`): `Observable`\<[`Demand`](market_demand_demand.Demand)\> + +Publishes the specified demand and re-publishes it based on demandSpecification.expirationSec interval + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demandSpecification` | [`DemandSpecification`](market_demand_demand.DemandSpecification) | + +#### Returns + +`Observable`\<[`Demand`](market_demand_demand.Demand)\> + +#### Implementation of + +[MarketModule](../interfaces/market_market_module.MarketModule).[publishAndRefreshDemand](../interfaces/market_market_module.MarketModule#publishandrefreshdemand) + +#### Defined in + +[src/market/market.module.ts:292](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L292) + +___ + +### collectMarketProposalEvents + +▸ **collectMarketProposalEvents**(`demand`): `Observable`\<[`MarketProposalEvent`](../modules/market_proposal_market_proposal_event#marketproposalevent)\> + +Return an observable that will emit values representing various events related to this demand + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demand` | [`Demand`](market_demand_demand.Demand) | + +#### Returns + +`Observable`\<[`MarketProposalEvent`](../modules/market_proposal_market_proposal_event#marketproposalevent)\> + +#### Implementation of + +[MarketModule](../interfaces/market_market_module.MarketModule).[collectMarketProposalEvents](../interfaces/market_market_module.MarketModule#collectmarketproposalevents) + +#### Defined in + +[src/market/market.module.ts:355](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L355) + +___ + +### collectAllOfferProposals + +▸ **collectAllOfferProposals**(`demand`): `Observable`\<[`OfferProposal`](market_proposal_offer_proposal.OfferProposal)\> + +Subscribes to the proposals for the given demand. +If an error occurs, the observable will emit an error and complete. +Keep in mind that since this method returns an observable, nothing will happen until you subscribe to it. + +This method will just yield all the proposals that will be found for that demand without any additional logic. + +The [collectDraftOfferProposals](../interfaces/market_market_module.MarketModule#collectdraftofferproposals) is a more specialized variant of offer collection, which includes negotiations + and demand re-subscription logic + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demand` | [`Demand`](market_demand_demand.Demand) | + +#### Returns + +`Observable`\<[`OfferProposal`](market_proposal_offer_proposal.OfferProposal)\> + +#### Implementation of + +[MarketModule](../interfaces/market_market_module.MarketModule).[collectAllOfferProposals](../interfaces/market_market_module.MarketModule#collectallofferproposals) + +#### Defined in + +[src/market/market.module.ts:362](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L362) + +___ + +### negotiateProposal + +▸ **negotiateProposal**(`offerProposal`, `counterDemand`): `Promise`\<[`OfferCounterProposal`](market_proposal_offer_counter_proposal.OfferCounterProposal)\> + +Sends a counter-offer to the provider. Note that to get the provider's response to your +counter you should listen to events returned by `collectDemandOfferEvents`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `offerProposal` | [`OfferProposal`](market_proposal_offer_proposal.OfferProposal) | +| `counterDemand` | [`DemandSpecification`](market_demand_demand.DemandSpecification) | + +#### Returns + +`Promise`\<[`OfferCounterProposal`](market_proposal_offer_counter_proposal.OfferCounterProposal)\> + +The counter-proposal that the requestor made to the Provider + +#### Implementation of + +[MarketModule](../interfaces/market_market_module.MarketModule).[negotiateProposal](../interfaces/market_market_module.MarketModule#negotiateproposal) + +#### Defined in + +[src/market/market.module.ts:369](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L369) + +___ + +### proposeAgreement + +▸ **proposeAgreement**(`proposal`, `options?`): `Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +Internally + +- ya-ts-client createAgreement +- ya-ts-client approveAgreement +- ya-ts-client "wait for approval" + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](market_proposal_offer_proposal.OfferProposal) | +| `options?` | [`AgreementOptions`](../interfaces/market_agreement_agreement.AgreementOptions) | + +#### Returns + +`Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +Returns when the provider accepts the agreement, rejects otherwise. The resulting agreement is ready to create activities from. + +#### Implementation of + +[MarketModule](../interfaces/market_market_module.MarketModule).[proposeAgreement](../interfaces/market_market_module.MarketModule#proposeagreement) + +#### Defined in + +[src/market/market.module.ts:384](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L384) + +___ + +### terminateAgreement + +▸ **terminateAgreement**(`agreement`, `reason?`): `Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](market_agreement_agreement.Agreement) | +| `reason?` | `string` | + +#### Returns + +`Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +The Agreement that has been terminated via Yagna + +#### Implementation of + +[MarketModule](../interfaces/market_market_module.MarketModule).[terminateAgreement](../interfaces/market_market_module.MarketModule#terminateagreement) + +#### Defined in + +[src/market/market.module.ts:395](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L395) + +___ + +### collectDraftOfferProposals + +▸ **collectDraftOfferProposals**(`options`): `Observable`\<[`OfferProposal`](market_proposal_offer_proposal.OfferProposal)\> + +Creates a demand for the given package and allocation and starts collecting, filtering and negotiating proposals. +The method returns an observable that emits a batch of draft proposals every time the buffer is full. +The method will automatically negotiate the proposals until they are moved to the `Draft` state. +Keep in mind that since this method returns an observable, nothing will happen until you subscribe to it. +Unsubscribing from the observable will stop the process and remove the demand from the market. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options` | `Object` | +| `options.demandSpecification` | [`DemandSpecification`](market_demand_demand.DemandSpecification) | +| `options.pricing` | [`PricingOptions`](../modules/market_market_module#pricingoptions) | +| `options.filter?` | [`ProposalFilter`](../modules/market_proposal_offer_proposal#proposalfilter) | +| `options.minProposalsBatchSize?` | `number` | +| `options.proposalsBatchReleaseTimeoutMs?` | `number` | + +#### Returns + +`Observable`\<[`OfferProposal`](market_proposal_offer_proposal.OfferProposal)\> + +#### Implementation of + +[MarketModule](../interfaces/market_market_module.MarketModule).[collectDraftOfferProposals](../interfaces/market_market_module.MarketModule#collectdraftofferproposals) + +#### Defined in + +[src/market/market.module.ts:407](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L407) + +___ + +### signAgreementFromPool + +▸ **signAgreementFromPool**(`draftProposalPool`, `agreementOptions?`, `signalOrTimeout?`): `Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +Acquire a proposal from the pool and sign an agreement with the provider. If signing the agreement fails, +destroy the proposal and try again with another one. The method returns an agreement that's ready to be used. +Optionally, you can provide a timeout in milliseconds or an AbortSignal that can be used to cancel the operation +early. If the operation is cancelled, the method will throw an error. +Note that this method will respect the acquire timeout set in the pool and will throw an error if no proposal +is available within the specified time. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `draftProposalPool` | [`DraftOfferProposalPool`](market_draft_offer_proposal_pool.DraftOfferProposalPool) | The pool of draft proposals to acquire from | +| `agreementOptions?` | [`AgreementOptions`](../interfaces/market_agreement_agreement.AgreementOptions) | options used to sign the agreement such as expiration or waitingForApprovalTimeout | +| `signalOrTimeout?` | `number` \| `AbortSignal` | The timeout in milliseconds or an AbortSignal that will be used to cancel the operation | + +#### Returns + +`Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +**`Example`** + +```ts +const agreement = await marketModule.signAgreementFromPool(draftProposalPool, 10_000); // throws TimeoutError if the operation takes longer than 10 seconds +``` + +**`Example`** + +```ts +const signal = AbortSignal.timeout(10_000); +const agreement = await marketModule.signAgreementFromPool(draftProposalPool, signal); // throws TimeoutError if the operation takes longer than 10 seconds +``` + +#### Implementation of + +[MarketModule](../interfaces/market_market_module.MarketModule).[signAgreementFromPool](../interfaces/market_market_module.MarketModule#signagreementfrompool) + +#### Defined in + +[src/market/market.module.ts:463](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L463) + +___ + +### estimateBudget + +▸ **estimateBudget**(`«destructured»`): `number` + +Estimate the budget for the given order and concurrency level. +Keep in mind that this is just an estimate and the actual cost may vary. +To get a more accurate estimate, make sure to specify an exact or maximum concurrency level. +The method returns the estimated budget in GLM. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | `Object` | +| › `concurrency` | [`Concurrency`](../modules/resource_rental_resource_rental_pool#concurrency) | +| › `order` | [`MarketOrderSpec`](../interfaces/golem_network_golem_network.MarketOrderSpec) | + +#### Returns + +`number` + +#### Implementation of + +[MarketModule](../interfaces/market_market_module.MarketModule).[estimateBudget](../interfaces/market_market_module.MarketModule#estimatebudget) + +#### Defined in + +[src/market/market.module.ts:562](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L562) + +___ + +### fetchAgreement + +▸ **fetchAgreement**(`agreementId`): `Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +Fetch the most up-to-date agreement details from the yagna + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreementId` | `string` | + +#### Returns + +`Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +#### Implementation of + +[MarketModule](../interfaces/market_market_module.MarketModule).[fetchAgreement](../interfaces/market_market_module.MarketModule#fetchagreement) + +#### Defined in + +[src/market/market.module.ts:599](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L599) diff --git a/src/pages/docs/golem-js/reference/classes/market_proposal.Proposal.md b/src/pages/docs/golem-js/reference/classes/market_proposal.Proposal.md deleted file mode 100644 index ab2dbb21e..000000000 --- a/src/pages/docs/golem-js/reference/classes/market_proposal.Proposal.md +++ /dev/null @@ -1,330 +0,0 @@ ---- -title: "Class Proposal" -pageTitle: "Class Proposal - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class Proposal within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: Proposal - -[market/proposal](../modules/market_proposal).Proposal - -Proposal module - an object representing an offer in the state of a proposal from the provider. - -## Table of contents - -### Constructors - -- [constructor](market_proposal.Proposal#constructor) - -### Properties - -- [id](market_proposal.Proposal#id) -- [issuerId](market_proposal.Proposal#issuerid) -- [provider](market_proposal.Proposal#provider) -- [properties](market_proposal.Proposal#properties) -- [constraints](market_proposal.Proposal#constraints) -- [timestamp](market_proposal.Proposal#timestamp) -- [counteringProposalId](market_proposal.Proposal#counteringproposalid) -- [demand](market_proposal.Proposal#demand) - -### Accessors - -- [details](market_proposal.Proposal#details) -- [pricing](market_proposal.Proposal#pricing) - -### Methods - -- [validate](market_proposal.Proposal#validate) -- [isInitial](market_proposal.Proposal#isinitial) -- [isDraft](market_proposal.Proposal#isdraft) -- [isExpired](market_proposal.Proposal#isexpired) -- [isRejected](market_proposal.Proposal#isrejected) -- [reject](market_proposal.Proposal#reject) -- [respond](market_proposal.Proposal#respond) -- [hasPaymentPlatform](market_proposal.Proposal#haspaymentplatform) -- [getEstimatedCost](market_proposal.Proposal#getestimatedcost) - -## Constructors - -### constructor - -• **new Proposal**(`demand`, `parentId`, `setCounteringProposalReference`, `api`, `model`, `eventTarget?`): [`Proposal`](market_proposal.Proposal) - -Create proposal for given subscription ID - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `demand` | `Demand` | -| `parentId` | ``null`` \| `string` | -| `setCounteringProposalReference` | (`id`: `string`, `parentId`: `string`) => ``null`` \| `void` | -| `api` | `RequestorApi` | -| `model` | `Proposal` | -| `eventTarget?` | `EventTarget` | - -#### Returns - -[`Proposal`](market_proposal.Proposal) - -#### Defined in - -[src/market/proposal.ts:84](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L84) - -## Properties - -### id - -• **id**: `string` - -#### Defined in - -[src/market/proposal.ts:64](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L64) - -___ - -### issuerId - -• `Readonly` **issuerId**: `string` - -#### Defined in - -[src/market/proposal.ts:65](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L65) - -___ - -### provider - -• `Readonly` **provider**: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) - -#### Defined in - -[src/market/proposal.ts:66](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L66) - -___ - -### properties - -• `Readonly` **properties**: [`ProposalProperties`](../modules/market_proposal#proposalproperties) - -#### Defined in - -[src/market/proposal.ts:67](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L67) - -___ - -### constraints - -• `Readonly` **constraints**: `string` - -#### Defined in - -[src/market/proposal.ts:68](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L68) - -___ - -### timestamp - -• `Readonly` **timestamp**: `string` - -#### Defined in - -[src/market/proposal.ts:69](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L69) - -___ - -### counteringProposalId - -• **counteringProposalId**: ``null`` \| `string` - -#### Defined in - -[src/market/proposal.ts:70](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L70) - -___ - -### demand - -• `Readonly` **demand**: `Demand` - -#### Defined in - -[src/market/proposal.ts:85](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L85) - -## Accessors - -### details - -• `get` **details**(): [`ProposalDetails`](../interfaces/market_proposal.ProposalDetails) - -#### Returns - -[`ProposalDetails`](../interfaces/market_proposal.ProposalDetails) - -#### Defined in - -[src/market/proposal.ts:106](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L106) - -___ - -### pricing - -• `get` **pricing**(): [`PricingInfo`](../modules/market_proposal#pricinginfo) - -#### Returns - -[`PricingInfo`](../modules/market_proposal#pricinginfo) - -#### Defined in - -[src/market/proposal.ts:122](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L122) - -## Methods - -### validate - -▸ **validate**(): `void` - -Validates if the proposal satisfies basic business rules, is complete and thus safe to interact with - -Use this method before executing any important logic, to ensure that you're working with correct, complete data - -#### Returns - -`void` - -#### Defined in - -[src/market/proposal.ts:145](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L145) - -___ - -### isInitial - -▸ **isInitial**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/market/proposal.ts:182](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L182) - -___ - -### isDraft - -▸ **isDraft**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/market/proposal.ts:186](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L186) - -___ - -### isExpired - -▸ **isExpired**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/market/proposal.ts:190](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L190) - -___ - -### isRejected - -▸ **isRejected**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/market/proposal.ts:194](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L194) - -___ - -### reject - -▸ **reject**(`reason?`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `reason` | `string` | `"no reason"` | - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[src/market/proposal.ts:198](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L198) - -___ - -### respond - -▸ **respond**(`chosenPlatform`): `Promise`\<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `chosenPlatform` | `string` | - -#### Returns - -`Promise`\<`string`\> - -#### Defined in - -[src/market/proposal.ts:220](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L220) - -___ - -### hasPaymentPlatform - -▸ **hasPaymentPlatform**(`paymentPlatform`): `boolean` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `paymentPlatform` | `string` | - -#### Returns - -`boolean` - -#### Defined in - -[src/market/proposal.ts:260](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L260) - -___ - -### getEstimatedCost - -▸ **getEstimatedCost**(): `number` - -Proposal cost estimation based on CPU, Env and startup costs - -#### Returns - -`number` - -#### Defined in - -[src/market/proposal.ts:267](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L267) diff --git a/src/pages/docs/golem-js/reference/classes/market_proposal_market_proposal.MarketProposal.md b/src/pages/docs/golem-js/reference/classes/market_proposal_market_proposal.MarketProposal.md new file mode 100644 index 000000000..f798deb11 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_proposal_market_proposal.MarketProposal.md @@ -0,0 +1,234 @@ +--- +title: "Class MarketProposal" +pageTitle: "Class MarketProposal - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class MarketProposal within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: MarketProposal + +[market/proposal/market-proposal](../modules/market_proposal_market_proposal).MarketProposal + +Base representation of a market proposal that can be issued either by the Provider (offer proposal) + or Requestor (counter-proposal) + +## Hierarchy + +- **`MarketProposal`** + + ↳ [`OfferCounterProposal`](market_proposal_offer_counter_proposal.OfferCounterProposal) + + ↳ [`OfferProposal`](market_proposal_offer_proposal.OfferProposal) + +## Table of contents + +### Constructors + +- [constructor](market_proposal_market_proposal.MarketProposal#constructor) + +### Properties + +- [id](market_proposal_market_proposal.MarketProposal#id) +- [previousProposalId](market_proposal_market_proposal.MarketProposal#previousproposalid) +- [issuer](market_proposal_market_proposal.MarketProposal#issuer) +- [properties](market_proposal_market_proposal.MarketProposal#properties) +- [model](market_proposal_market_proposal.MarketProposal#model) + +### Accessors + +- [state](market_proposal_market_proposal.MarketProposal#state) +- [timestamp](market_proposal_market_proposal.MarketProposal#timestamp) + +### Methods + +- [isInitial](market_proposal_market_proposal.MarketProposal#isinitial) +- [isDraft](market_proposal_market_proposal.MarketProposal#isdraft) +- [isExpired](market_proposal_market_proposal.MarketProposal#isexpired) +- [isRejected](market_proposal_market_proposal.MarketProposal#isrejected) +- [isValid](market_proposal_market_proposal.MarketProposal#isvalid) +- [validate](market_proposal_market_proposal.MarketProposal#validate) + +## Constructors + +### constructor + +• **new MarketProposal**(`model`): [`MarketProposal`](market_proposal_market_proposal.MarketProposal) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `model` | `Proposal` | + +#### Returns + +[`MarketProposal`](market_proposal_market_proposal.MarketProposal) + +#### Defined in + +[src/market/proposal/market-proposal.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L31) + +## Properties + +### id + +• `Readonly` **id**: `string` + +#### Defined in + +[src/market/proposal/market-proposal.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L19) + +___ + +### previousProposalId + +• `Readonly` **previousProposalId**: ``null`` \| `string` = `null` + +Reference to the previous proposal in the "negotiation chain" + +If null, this means that was the initial offer that the negotiations started from + +#### Defined in + +[src/market/proposal/market-proposal.ts:25](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L25) + +___ + +### issuer + +• `Readonly` `Abstract` **issuer**: ``"Provider"`` \| ``"Requestor"`` + +#### Defined in + +[src/market/proposal/market-proposal.ts:27](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L27) + +___ + +### properties + +• `Readonly` **properties**: [`ProposalProperties`](../modules/market_proposal_proposal_properties#proposalproperties) + +#### Defined in + +[src/market/proposal/market-proposal.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L29) + +___ + +### model + +• `Protected` `Readonly` **model**: `Proposal` + +#### Defined in + +[src/market/proposal/market-proposal.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L31) + +## Accessors + +### state + +• `get` **state**(): [`ProposalState`](../modules/market_proposal_offer_proposal#proposalstate) + +#### Returns + +[`ProposalState`](../modules/market_proposal_offer_proposal#proposalstate) + +#### Defined in + +[src/market/proposal/market-proposal.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L37) + +___ + +### timestamp + +• `get` **timestamp**(): `Date` + +#### Returns + +`Date` + +#### Defined in + +[src/market/proposal/market-proposal.ts:41](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L41) + +## Methods + +### isInitial + +▸ **isInitial**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[src/market/proposal/market-proposal.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L45) + +___ + +### isDraft + +▸ **isDraft**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[src/market/proposal/market-proposal.ts:49](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L49) + +___ + +### isExpired + +▸ **isExpired**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[src/market/proposal/market-proposal.ts:53](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L53) + +___ + +### isRejected + +▸ **isRejected**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[src/market/proposal/market-proposal.ts:57](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L57) + +___ + +### isValid + +▸ **isValid**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[src/market/proposal/market-proposal.ts:61](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L61) + +___ + +### validate + +▸ **validate**(): `void` + +#### Returns + +`void` + +#### Defined in + +[src/market/proposal/market-proposal.ts:70](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L70) diff --git a/src/pages/docs/golem-js/reference/classes/market_proposal_offer_counter_proposal.OfferCounterProposal.md b/src/pages/docs/golem-js/reference/classes/market_proposal_offer_counter_proposal.OfferCounterProposal.md new file mode 100644 index 000000000..fd61c2f02 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_proposal_offer_counter_proposal.OfferCounterProposal.md @@ -0,0 +1,288 @@ +--- +title: "Class OfferCounterProposal" +pageTitle: "Class OfferCounterProposal - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class OfferCounterProposal within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: OfferCounterProposal + +[market/proposal/offer-counter-proposal](../modules/market_proposal_offer_counter_proposal).OfferCounterProposal + +Base representation of a market proposal that can be issued either by the Provider (offer proposal) + or Requestor (counter-proposal) + +## Hierarchy + +- [`MarketProposal`](market_proposal_market_proposal.MarketProposal) + + ↳ **`OfferCounterProposal`** + +## Table of contents + +### Constructors + +- [constructor](market_proposal_offer_counter_proposal.OfferCounterProposal#constructor) + +### Properties + +- [issuer](market_proposal_offer_counter_proposal.OfferCounterProposal#issuer) +- [id](market_proposal_offer_counter_proposal.OfferCounterProposal#id) +- [previousProposalId](market_proposal_offer_counter_proposal.OfferCounterProposal#previousproposalid) +- [properties](market_proposal_offer_counter_proposal.OfferCounterProposal#properties) +- [model](market_proposal_offer_counter_proposal.OfferCounterProposal#model) + +### Accessors + +- [state](market_proposal_offer_counter_proposal.OfferCounterProposal#state) +- [timestamp](market_proposal_offer_counter_proposal.OfferCounterProposal#timestamp) + +### Methods + +- [validate](market_proposal_offer_counter_proposal.OfferCounterProposal#validate) +- [isInitial](market_proposal_offer_counter_proposal.OfferCounterProposal#isinitial) +- [isDraft](market_proposal_offer_counter_proposal.OfferCounterProposal#isdraft) +- [isExpired](market_proposal_offer_counter_proposal.OfferCounterProposal#isexpired) +- [isRejected](market_proposal_offer_counter_proposal.OfferCounterProposal#isrejected) +- [isValid](market_proposal_offer_counter_proposal.OfferCounterProposal#isvalid) + +## Constructors + +### constructor + +• **new OfferCounterProposal**(`model`): [`OfferCounterProposal`](market_proposal_offer_counter_proposal.OfferCounterProposal) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `model` | `Proposal` | + +#### Returns + +[`OfferCounterProposal`](market_proposal_offer_counter_proposal.OfferCounterProposal) + +#### Overrides + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[constructor](market_proposal_market_proposal.MarketProposal#constructor) + +#### Defined in + +[src/market/proposal/offer-counter-proposal.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-counter-proposal.ts#L7) + +## Properties + +### issuer + +• `Readonly` **issuer**: ``"Requestor"`` + +#### Overrides + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[issuer](market_proposal_market_proposal.MarketProposal#issuer) + +#### Defined in + +[src/market/proposal/offer-counter-proposal.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-counter-proposal.ts#L5) + +___ + +### id + +• `Readonly` **id**: `string` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[id](market_proposal_market_proposal.MarketProposal#id) + +#### Defined in + +[src/market/proposal/market-proposal.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L19) + +___ + +### previousProposalId + +• `Readonly` **previousProposalId**: ``null`` \| `string` = `null` + +Reference to the previous proposal in the "negotiation chain" + +If null, this means that was the initial offer that the negotiations started from + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[previousProposalId](market_proposal_market_proposal.MarketProposal#previousproposalid) + +#### Defined in + +[src/market/proposal/market-proposal.ts:25](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L25) + +___ + +### properties + +• `Readonly` **properties**: [`ProposalProperties`](../modules/market_proposal_proposal_properties#proposalproperties) + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[properties](market_proposal_market_proposal.MarketProposal#properties) + +#### Defined in + +[src/market/proposal/market-proposal.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L29) + +___ + +### model + +• `Protected` `Readonly` **model**: `Proposal` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[model](market_proposal_market_proposal.MarketProposal#model) + +#### Defined in + +[src/market/proposal/market-proposal.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L31) + +## Accessors + +### state + +• `get` **state**(): [`ProposalState`](../modules/market_proposal_offer_proposal#proposalstate) + +#### Returns + +[`ProposalState`](../modules/market_proposal_offer_proposal#proposalstate) + +#### Inherited from + +MarketProposal.state + +#### Defined in + +[src/market/proposal/market-proposal.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L37) + +___ + +### timestamp + +• `get` **timestamp**(): `Date` + +#### Returns + +`Date` + +#### Inherited from + +MarketProposal.timestamp + +#### Defined in + +[src/market/proposal/market-proposal.ts:41](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L41) + +## Methods + +### validate + +▸ **validate**(): `void` + +#### Returns + +`void` + +#### Overrides + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[validate](market_proposal_market_proposal.MarketProposal#validate) + +#### Defined in + +[src/market/proposal/offer-counter-proposal.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-counter-proposal.ts#L11) + +___ + +### isInitial + +▸ **isInitial**(): `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[isInitial](market_proposal_market_proposal.MarketProposal#isinitial) + +#### Defined in + +[src/market/proposal/market-proposal.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L45) + +___ + +### isDraft + +▸ **isDraft**(): `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[isDraft](market_proposal_market_proposal.MarketProposal#isdraft) + +#### Defined in + +[src/market/proposal/market-proposal.ts:49](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L49) + +___ + +### isExpired + +▸ **isExpired**(): `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[isExpired](market_proposal_market_proposal.MarketProposal#isexpired) + +#### Defined in + +[src/market/proposal/market-proposal.ts:53](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L53) + +___ + +### isRejected + +▸ **isRejected**(): `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[isRejected](market_proposal_market_proposal.MarketProposal#isrejected) + +#### Defined in + +[src/market/proposal/market-proposal.ts:57](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L57) + +___ + +### isValid + +▸ **isValid**(): `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[isValid](market_proposal_market_proposal.MarketProposal#isvalid) + +#### Defined in + +[src/market/proposal/market-proposal.ts:61](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L61) diff --git a/src/pages/docs/golem-js/reference/classes/market_proposal_offer_proposal.OfferProposal.md b/src/pages/docs/golem-js/reference/classes/market_proposal_offer_proposal.OfferProposal.md new file mode 100644 index 000000000..06f2cf7f6 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_proposal_offer_proposal.OfferProposal.md @@ -0,0 +1,371 @@ +--- +title: "Class OfferProposal" +pageTitle: "Class OfferProposal - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class OfferProposal within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: OfferProposal + +[market/proposal/offer-proposal](../modules/market_proposal_offer_proposal).OfferProposal + +Entity representing the offer presented by the Provider to the Requestor + +Issue: The final proposal that gets promoted to an agreement comes from the provider +Right now the last time I can access it directly is when I receive the counter from the provider, +later it's impossible for me to get it via the API `{"message":"Path deserialize error: Id [2cb0b2820c6142fab5af7a8e90da09f0] has invalid owner type."}` + +FIXME #yagna should allow obtaining proposals via the API even if I'm not the owner! + +## Hierarchy + +- [`MarketProposal`](market_proposal_market_proposal.MarketProposal) + + ↳ **`OfferProposal`** + +## Table of contents + +### Constructors + +- [constructor](market_proposal_offer_proposal.OfferProposal#constructor) + +### Properties + +- [issuer](market_proposal_offer_proposal.OfferProposal#issuer) +- [demand](market_proposal_offer_proposal.OfferProposal#demand) +- [id](market_proposal_offer_proposal.OfferProposal#id) +- [previousProposalId](market_proposal_offer_proposal.OfferProposal#previousproposalid) +- [properties](market_proposal_offer_proposal.OfferProposal#properties) +- [model](market_proposal_offer_proposal.OfferProposal#model) + +### Accessors + +- [pricing](market_proposal_offer_proposal.OfferProposal#pricing) +- [provider](market_proposal_offer_proposal.OfferProposal#provider) +- [state](market_proposal_offer_proposal.OfferProposal#state) +- [timestamp](market_proposal_offer_proposal.OfferProposal#timestamp) + +### Methods + +- [getDto](market_proposal_offer_proposal.OfferProposal#getdto) +- [getEstimatedCost](market_proposal_offer_proposal.OfferProposal#getestimatedcost) +- [validate](market_proposal_offer_proposal.OfferProposal#validate) +- [isInitial](market_proposal_offer_proposal.OfferProposal#isinitial) +- [isDraft](market_proposal_offer_proposal.OfferProposal#isdraft) +- [isExpired](market_proposal_offer_proposal.OfferProposal#isexpired) +- [isRejected](market_proposal_offer_proposal.OfferProposal#isrejected) +- [isValid](market_proposal_offer_proposal.OfferProposal#isvalid) + +## Constructors + +### constructor + +• **new OfferProposal**(`model`, `demand`): [`OfferProposal`](market_proposal_offer_proposal.OfferProposal) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `model` | `Proposal` | +| `demand` | [`Demand`](market_demand_demand.Demand) | + +#### Returns + +[`OfferProposal`](market_proposal_offer_proposal.OfferProposal) + +#### Overrides + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[constructor](market_proposal_market_proposal.MarketProposal#constructor) + +#### Defined in + +[src/market/proposal/offer-proposal.ts:44](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-proposal.ts#L44) + +## Properties + +### issuer + +• `Readonly` **issuer**: ``"Provider"`` + +#### Overrides + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[issuer](market_proposal_market_proposal.MarketProposal#issuer) + +#### Defined in + +[src/market/proposal/offer-proposal.ts:42](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-proposal.ts#L42) + +___ + +### demand + +• `Readonly` **demand**: [`Demand`](market_demand_demand.Demand) + +#### Defined in + +[src/market/proposal/offer-proposal.ts:46](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-proposal.ts#L46) + +___ + +### id + +• `Readonly` **id**: `string` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[id](market_proposal_market_proposal.MarketProposal#id) + +#### Defined in + +[src/market/proposal/market-proposal.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L19) + +___ + +### previousProposalId + +• `Readonly` **previousProposalId**: ``null`` \| `string` = `null` + +Reference to the previous proposal in the "negotiation chain" + +If null, this means that was the initial offer that the negotiations started from + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[previousProposalId](market_proposal_market_proposal.MarketProposal#previousproposalid) + +#### Defined in + +[src/market/proposal/market-proposal.ts:25](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L25) + +___ + +### properties + +• `Readonly` **properties**: [`ProposalProperties`](../modules/market_proposal_proposal_properties#proposalproperties) + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[properties](market_proposal_market_proposal.MarketProposal#properties) + +#### Defined in + +[src/market/proposal/market-proposal.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L29) + +___ + +### model + +• `Protected` `Readonly` **model**: `Proposal` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[model](market_proposal_market_proposal.MarketProposal#model) + +#### Defined in + +[src/market/proposal/market-proposal.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L31) + +## Accessors + +### pricing + +• `get` **pricing**(): [`PricingInfo`](../modules/market_proposal_offer_proposal#pricinginfo) + +#### Returns + +[`PricingInfo`](../modules/market_proposal_offer_proposal#pricinginfo) + +#### Defined in + +[src/market/proposal/offer-proposal.ts:53](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-proposal.ts#L53) + +___ + +### provider + +• `get` **provider**(): [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) + +#### Returns + +[`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) + +#### Defined in + +[src/market/proposal/offer-proposal.ts:107](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-proposal.ts#L107) + +___ + +### state + +• `get` **state**(): [`ProposalState`](../modules/market_proposal_offer_proposal#proposalstate) + +#### Returns + +[`ProposalState`](../modules/market_proposal_offer_proposal#proposalstate) + +#### Inherited from + +MarketProposal.state + +#### Defined in + +[src/market/proposal/market-proposal.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L37) + +___ + +### timestamp + +• `get` **timestamp**(): `Date` + +#### Returns + +`Date` + +#### Inherited from + +MarketProposal.timestamp + +#### Defined in + +[src/market/proposal/market-proposal.ts:41](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L41) + +## Methods + +### getDto + +▸ **getDto**(): `Partial`\<\{ `transferProtocol`: `string`[] ; `cpuBrand`: `string` ; `cpuCapabilities`: `string`[] ; `cpuCores`: `number` ; `cpuThreads`: `number` ; `memory`: `number` ; `storage`: `number` ; `publicNet`: `boolean` ; `runtimeCapabilities`: `string`[] ; `runtimeName`: `string` ; `state`: [`ProposalState`](../modules/market_proposal_offer_proposal#proposalstate) }\> + +#### Returns + +`Partial`\<\{ `transferProtocol`: `string`[] ; `cpuBrand`: `string` ; `cpuCapabilities`: `string`[] ; `cpuCores`: `number` ; `cpuThreads`: `number` ; `memory`: `number` ; `storage`: `number` ; `publicNet`: `boolean` ; `runtimeCapabilities`: `string`[] ; `runtimeName`: `string` ; `state`: [`ProposalState`](../modules/market_proposal_offer_proposal#proposalstate) }\> + +#### Defined in + +[src/market/proposal/offer-proposal.ts:83](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-proposal.ts#L83) + +___ + +### getEstimatedCost + +▸ **getEstimatedCost**(): `number` + +Proposal cost estimation based on CPU, Env and startup costs + +#### Returns + +`number` + +#### Defined in + +[src/market/proposal/offer-proposal.ts:102](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-proposal.ts#L102) + +___ + +### validate + +▸ **validate**(): `void` + +Validates if the proposal satisfies basic business rules, is complete and thus safe to interact with + +Use this method before executing any important logic, to ensure that you're working with correct, complete data + +#### Returns + +`void` + +#### Overrides + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[validate](market_proposal_market_proposal.MarketProposal#validate) + +#### Defined in + +[src/market/proposal/offer-proposal.ts:120](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-proposal.ts#L120) + +___ + +### isInitial + +▸ **isInitial**(): `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[isInitial](market_proposal_market_proposal.MarketProposal#isinitial) + +#### Defined in + +[src/market/proposal/market-proposal.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L45) + +___ + +### isDraft + +▸ **isDraft**(): `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[isDraft](market_proposal_market_proposal.MarketProposal#isdraft) + +#### Defined in + +[src/market/proposal/market-proposal.ts:49](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L49) + +___ + +### isExpired + +▸ **isExpired**(): `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[isExpired](market_proposal_market_proposal.MarketProposal#isexpired) + +#### Defined in + +[src/market/proposal/market-proposal.ts:53](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L53) + +___ + +### isRejected + +▸ **isRejected**(): `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[isRejected](market_proposal_market_proposal.MarketProposal#isrejected) + +#### Defined in + +[src/market/proposal/market-proposal.ts:57](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L57) + +___ + +### isValid + +▸ **isValid**(): `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[MarketProposal](market_proposal_market_proposal.MarketProposal).[isValid](market_proposal_market_proposal.MarketProposal#isvalid) + +#### Defined in + +[src/market/proposal/market-proposal.ts:61](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L61) diff --git a/src/pages/docs/golem-js/reference/classes/market_proposal_proposals_batch.ProposalsBatch.md b/src/pages/docs/golem-js/reference/classes/market_proposal_proposals_batch.ProposalsBatch.md new file mode 100644 index 000000000..d965c2d0c --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/market_proposal_proposals_batch.ProposalsBatch.md @@ -0,0 +1,102 @@ +--- +title: "Class ProposalsBatch" +pageTitle: "Class ProposalsBatch - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class ProposalsBatch within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: ProposalsBatch + +[market/proposal/proposals\_batch](../modules/market_proposal_proposals_batch).ProposalsBatch + +Proposals Batch aggregates initial proposals and returns a set grouped by the provider's key +to avoid duplicate offers issued by the provider. + +## Table of contents + +### Constructors + +- [constructor](market_proposal_proposals_batch.ProposalsBatch#constructor) + +### Methods + +- [addProposal](market_proposal_proposals_batch.ProposalsBatch#addproposal) +- [getProposals](market_proposal_proposals_batch.ProposalsBatch#getproposals) +- [waitForProposals](market_proposal_proposals_batch.ProposalsBatch#waitforproposals) + +## Constructors + +### constructor + +• **new ProposalsBatch**(`options?`): [`ProposalsBatch`](market_proposal_proposals_batch.ProposalsBatch) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | [`ProposalsBatchOptions`](../modules/market_proposal_proposals_batch#proposalsbatchoptions) | + +#### Returns + +[`ProposalsBatch`](market_proposal_proposals_batch.ProposalsBatch) + +#### Defined in + +[src/market/proposal/proposals_batch.ts:27](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/proposals_batch.ts#L27) + +## Methods + +### addProposal + +▸ **addProposal**(`proposal`): `Promise`\<`void`\> + +Add proposal to the batch grouped by provider key +which consist of providerId, cores, threads, mem and storage + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](market_proposal_offer_proposal.OfferProposal) | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/market/proposal/proposals_batch.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/proposals_batch.ts#L38) + +___ + +### getProposals + +▸ **getProposals**(): `Promise`\<[`OfferProposal`](market_proposal_offer_proposal.OfferProposal)[]\> + +Returns the batched proposals from the internal buffer and empties it + +#### Returns + +`Promise`\<[`OfferProposal`](market_proposal_offer_proposal.OfferProposal)[]\> + +#### Defined in + +[src/market/proposal/proposals_batch.ts:53](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/proposals_batch.ts#L53) + +___ + +### waitForProposals + +▸ **waitForProposals**(): `Promise`\<`void`\> + +Waits for the max amount time for batching or max batch size to be reached before it makes sense to process events + +Used to flow-control the consumption of the proposal events from the batch. +The returned promise resolves when it is time to process the buffered proposal events. + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/market/proposal/proposals_batch.ts:70](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/proposals_batch.ts#L70) diff --git a/src/pages/docs/golem-js/reference/classes/market_proposals_batch.ProposalsBatch.md b/src/pages/docs/golem-js/reference/classes/market_proposals_batch.ProposalsBatch.md deleted file mode 100644 index f8e47a4a2..000000000 --- a/src/pages/docs/golem-js/reference/classes/market_proposals_batch.ProposalsBatch.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "Class ProposalsBatch" -pageTitle: "Class ProposalsBatch - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class ProposalsBatch within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: ProposalsBatch - -[market/proposals\_batch](../modules/market_proposals_batch).ProposalsBatch - -Proposals Batch aggregates initial proposals and returns a set grouped by the provider's key -to avoid duplicate offers issued by the provider. - -## Table of contents - -### Constructors - -- [constructor](market_proposals_batch.ProposalsBatch#constructor) - -### Methods - -- [addProposal](market_proposals_batch.ProposalsBatch#addproposal) -- [readProposals](market_proposals_batch.ProposalsBatch#readproposals) - -## Constructors - -### constructor - -• **new ProposalsBatch**(`options?`): [`ProposalsBatch`](market_proposals_batch.ProposalsBatch) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | [`ProposalsBatchOptions`](../modules/market_proposals_batch#proposalsbatchoptions) | - -#### Returns - -[`ProposalsBatch`](market_proposals_batch.ProposalsBatch) - -#### Defined in - -[src/market/proposals_batch.ts:27](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposals_batch.ts#L27) - -## Methods - -### addProposal - -▸ **addProposal**(`proposal`): `Promise`\<`void`\> - -Add proposal to the batch grouped by provider key -which consist of providerId, cores, threads, mem and storage - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `proposal` | [`Proposal`](market_proposal.Proposal) | - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[src/market/proposals_batch.ts:38](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposals_batch.ts#L38) - -___ - -### readProposals - -▸ **readProposals**(): `AsyncGenerator`\<[`Proposal`](market_proposal.Proposal)[], `any`, `unknown`\> - -Generates a set of proposals that were collected within the specified `releaseTimeoutMs` -or their size reached the `minBatchSize` value - -#### Returns - -`AsyncGenerator`\<[`Proposal`](market_proposal.Proposal)[], `any`, `unknown`\> - -#### Defined in - -[src/market/proposals_batch.ts:54](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposals_batch.ts#L54) diff --git a/src/pages/docs/golem-js/reference/classes/network_error.GolemNetworkError.md b/src/pages/docs/golem-js/reference/classes/network_error.GolemNetworkError.md index 28d4e0fc9..a07f1466b 100644 --- a/src/pages/docs/golem-js/reference/classes/network_error.GolemNetworkError.md +++ b/src/pages/docs/golem-js/reference/classes/network_error.GolemNetworkError.md @@ -14,7 +14,7 @@ additionally containing an error code specific to a given subdomain ## Hierarchy -- [`GolemModuleError`](error_golem_error.GolemModuleError) +- [`GolemModuleError`](shared_error_golem_error.GolemModuleError) ↳ **`GolemNetworkError`** @@ -27,9 +27,12 @@ additionally containing an error code specific to a given subdomain ### Properties - [code](network_error.GolemNetworkError#code) -- [network](network_error.GolemNetworkError#network) - [previous](network_error.GolemNetworkError#previous) +### Methods + +- [getNetwork](network_error.GolemNetworkError#getnetwork) + ## Constructors ### constructor @@ -51,11 +54,11 @@ additionally containing an error code specific to a given subdomain #### Overrides -[GolemModuleError](error_golem_error.GolemModuleError).[constructor](error_golem_error.GolemModuleError#constructor) +[GolemModuleError](shared_error_golem_error.GolemModuleError).[constructor](shared_error_golem_error.GolemModuleError#constructor) #### Defined in -[src/network/error.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/error.ts#L17) +[src/network/error.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L20) ## Properties @@ -65,34 +68,38 @@ additionally containing an error code specific to a given subdomain #### Inherited from -[GolemModuleError](error_golem_error.GolemModuleError).[code](error_golem_error.GolemModuleError#code) +[GolemModuleError](shared_error_golem_error.GolemModuleError).[code](shared_error_golem_error.GolemModuleError#code) #### Defined in -[src/network/error.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/error.ts#L19) +[src/network/error.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L22) ___ -### network +### previous -• `Optional` **network**: [`NetworkInfo`](../interfaces/network_network.NetworkInfo) +• `Optional` **previous**: `Error` -#### Defined in +The previous error, if any, that led to this error. -[src/network/error.ts:20](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/error.ts#L20) +#### Inherited from -___ +[GolemModuleError](shared_error_golem_error.GolemModuleError).[previous](shared_error_golem_error.GolemModuleError#previous) -### previous +#### Defined in -• `Optional` **previous**: `Error` +[src/network/error.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L24) -The previous error, if any, that led to this error. +## Methods -#### Inherited from +### getNetwork + +▸ **getNetwork**(): `undefined` \| [`NetworkInfo`](../interfaces/network_network.NetworkInfo) + +#### Returns -[GolemModuleError](error_golem_error.GolemModuleError).[previous](error_golem_error.GolemModuleError#previous) +`undefined` \| [`NetworkInfo`](../interfaces/network_network.NetworkInfo) #### Defined in -[src/network/error.ts:21](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/error.ts#L21) +[src/network/error.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L29) diff --git a/src/pages/docs/golem-js/reference/classes/network_network.Network.md b/src/pages/docs/golem-js/reference/classes/network_network.Network.md new file mode 100644 index 000000000..811a18058 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/network_network.Network.md @@ -0,0 +1,257 @@ +--- +title: "Class Network" +pageTitle: "Class Network - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Network within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Network + +[network/network](../modules/network_network).Network + +## Table of contents + +### Constructors + +- [constructor](network_network.Network#constructor) + +### Properties + +- [id](network_network.Network#id) + +### Methods + +- [getNetworkInfo](network_network.Network#getnetworkinfo) +- [addNode](network_network.Network#addnode) +- [hasNode](network_network.Network#hasnode) +- [removeNode](network_network.Network#removenode) +- [markAsRemoved](network_network.Network#markasremoved) +- [getFirstAvailableIpAddress](network_network.Network#getfirstavailableipaddress) +- [isIpInNetwork](network_network.Network#isipinnetwork) +- [isNodeIdUnique](network_network.Network#isnodeidunique) +- [isNodeIpUnique](network_network.Network#isnodeipunique) +- [isRemoved](network_network.Network#isremoved) + +## Constructors + +### constructor + +• **new Network**(`id`, `ip`, `mask?`, `gateway?`): [`Network`](network_network.Network) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | +| `ip` | `string` | +| `mask?` | `string` | +| `gateway?` | `string` | + +#### Returns + +[`Network`](network_network.Network) + +#### Defined in + +[src/network/network.ts:27](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L27) + +## Properties + +### id + +• `Readonly` **id**: `string` + +#### Defined in + +[src/network/network.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L28) + +## Methods + +### getNetworkInfo + +▸ **getNetworkInfo**(): [`NetworkInfo`](../interfaces/network_network.NetworkInfo) + +Returns information about the network. + +#### Returns + +[`NetworkInfo`](../interfaces/network_network.NetworkInfo) + +#### Defined in + +[src/network/network.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L45) + +___ + +### addNode + +▸ **addNode**(`node`): `void` + +Adds a node to the network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `node` | [`NetworkNode`](network_node.NetworkNode) | The network node to be added. | + +#### Returns + +`void` + +#### Defined in + +[src/network/network.ts:59](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L59) + +___ + +### hasNode + +▸ **hasNode**(`node`): `boolean` + +Checks whether the node belongs to the network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `node` | [`NetworkNode`](network_node.NetworkNode) | The network node to check. | + +#### Returns + +`boolean` + +#### Defined in + +[src/network/network.ts:80](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L80) + +___ + +### removeNode + +▸ **removeNode**(`node`): `void` + +Removes a node from the network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `node` | [`NetworkNode`](network_node.NetworkNode) | The network node to be removed. | + +#### Returns + +`void` + +#### Defined in + +[src/network/network.ts:88](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L88) + +___ + +### markAsRemoved + +▸ **markAsRemoved**(): `void` + +#### Returns + +`void` + +#### Defined in + +[src/network/network.ts:102](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L102) + +___ + +### getFirstAvailableIpAddress + +▸ **getFirstAvailableIpAddress**(): `IPv4` + +Returns the first available IP address in the network. + +#### Returns + +`IPv4` + +#### Defined in + +[src/network/network.ts:112](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L112) + +___ + +### isIpInNetwork + +▸ **isIpInNetwork**(`ip`): `boolean` + +Checks if a given IP address is within the network range. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `ip` | `IPv4` | The IPv4 address to check. | + +#### Returns + +`boolean` + +#### Defined in + +[src/network/network.ts:127](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L127) + +___ + +### isNodeIdUnique + +▸ **isNodeIdUnique**(`id`): `boolean` + +Checks if a given node ID is unique within the network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `id` | `string` | The node ID to check. | + +#### Returns + +`boolean` + +#### Defined in + +[src/network/network.ts:135](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L135) + +___ + +### isNodeIpUnique + +▸ **isNodeIpUnique**(`ip`): `boolean` + +Checks if a given IP address is unique within the network. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `ip` | `IPv4` | + +#### Returns + +`boolean` + +#### Defined in + +[src/network/network.ts:142](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L142) + +___ + +### isRemoved + +▸ **isRemoved**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[src/network/network.ts:149](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L149) diff --git a/src/pages/docs/golem-js/reference/classes/network_network_module.NetworkModuleImpl.md b/src/pages/docs/golem-js/reference/classes/network_network_module.NetworkModuleImpl.md new file mode 100644 index 000000000..45d39786a --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/network_network_module.NetworkModuleImpl.md @@ -0,0 +1,173 @@ +--- +title: "Class NetworkModuleImpl" +pageTitle: "Class NetworkModuleImpl - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class NetworkModuleImpl within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: NetworkModuleImpl + +[network/network.module](../modules/network_network_module).NetworkModuleImpl + +## Implements + +- [`NetworkModule`](../interfaces/network_network_module.NetworkModule) + +## Table of contents + +### Constructors + +- [constructor](network_network_module.NetworkModuleImpl#constructor) + +### Properties + +- [events](network_network_module.NetworkModuleImpl#events) + +### Methods + +- [createNetwork](network_network_module.NetworkModuleImpl#createnetwork) +- [removeNetwork](network_network_module.NetworkModuleImpl#removenetwork) +- [createNetworkNode](network_network_module.NetworkModuleImpl#createnetworknode) +- [removeNetworkNode](network_network_module.NetworkModuleImpl#removenetworknode) + +## Constructors + +### constructor + +• **new NetworkModuleImpl**(`deps`): [`NetworkModuleImpl`](network_network_module.NetworkModuleImpl) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `deps` | `Object` | +| `deps.logger?` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | +| `deps.networkApi` | [`INetworkApi`](../interfaces/network_api.INetworkApi) | + +#### Returns + +[`NetworkModuleImpl`](network_network_module.NetworkModuleImpl) + +#### Defined in + +[src/network/network.module.ts:78](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L78) + +## Properties + +### events + +• **events**: `EventEmitter`\<[`NetworkEvents`](../interfaces/network_api.NetworkEvents), `any`\> + +#### Implementation of + +[NetworkModule](../interfaces/network_network_module.NetworkModule).[events](../interfaces/network_network_module.NetworkModule#events) + +#### Defined in + +[src/network/network.module.ts:70](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L70) + +## Methods + +### createNetwork + +▸ **createNetwork**(`options?`): `Promise`\<[`Network`](network_network.Network)\> + +Creates a new network with the specified options. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `options?` | [`NetworkOptions`](../interfaces/network_network_module.NetworkOptions) | NetworkOptions | + +#### Returns + +`Promise`\<[`Network`](network_network.Network)\> + +#### Implementation of + +[NetworkModule](../interfaces/network_network_module.NetworkModule).[createNetwork](../interfaces/network_network_module.NetworkModule#createnetwork) + +#### Defined in + +[src/network/network.module.ts:85](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L85) + +___ + +### removeNetwork + +▸ **removeNetwork**(`network`): `Promise`\<`void`\> + +Removes an existing network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `network` | [`Network`](network_network.Network) | The network to be removed. | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[NetworkModule](../interfaces/network_network_module.NetworkModule).[removeNetwork](../interfaces/network_network_module.NetworkModule#removenetwork) + +#### Defined in + +[src/network/network.module.ts:121](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L121) + +___ + +### createNetworkNode + +▸ **createNetworkNode**(`network`, `nodeId`, `nodeIp?`): `Promise`\<[`NetworkNode`](network_node.NetworkNode)\> + +Creates a new node within a specified network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `network` | [`Network`](network_network.Network) | The network to which the node will be added. | +| `nodeId` | `string` | The ID of the node to be created. | +| `nodeIp?` | `string` | Optional IP address for the node. If not provided, the first available IP address will be assigned. | + +#### Returns + +`Promise`\<[`NetworkNode`](network_node.NetworkNode)\> + +#### Implementation of + +[NetworkModule](../interfaces/network_network_module.NetworkModule).[createNetworkNode](../interfaces/network_network_module.NetworkModule#createnetworknode) + +#### Defined in + +[src/network/network.module.ts:136](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L136) + +___ + +### removeNetworkNode + +▸ **removeNetworkNode**(`network`, `node`): `Promise`\<`void`\> + +Removes an existing node from a specified network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `network` | [`Network`](network_network.Network) | The network from which the node will be removed. | +| `node` | [`NetworkNode`](network_node.NetworkNode) | The node to be removed. | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[NetworkModule](../interfaces/network_network_module.NetworkModule).[removeNetworkNode](../interfaces/network_network_module.NetworkModule#removenetworknode) + +#### Defined in + +[src/network/network.module.ts:167](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L167) diff --git a/src/pages/docs/golem-js/reference/classes/network_node.NetworkNode.md b/src/pages/docs/golem-js/reference/classes/network_node.NetworkNode.md index b830e8bb0..e597a6a2a 100644 --- a/src/pages/docs/golem-js/reference/classes/network_node.NetworkNode.md +++ b/src/pages/docs/golem-js/reference/classes/network_node.NetworkNode.md @@ -20,6 +20,8 @@ Describes a node in a VPN, mapping a Golem node id to an IP address - [id](network_node.NetworkNode#id) - [ip](network_node.NetworkNode#ip) +- [getNetworkInfo](network_node.NetworkNode#getnetworkinfo) +- [yagnaBaseUri](network_node.NetworkNode#yagnabaseuri) ### Methods @@ -30,16 +32,16 @@ Describes a node in a VPN, mapping a Golem node id to an IP address ### constructor -• **new NetworkNode**(`id`, `ip`, `getNetworkInfo`, `apiUrl`): [`NetworkNode`](network_node.NetworkNode) +• **new NetworkNode**(`id`, `ip`, `getNetworkInfo`, `yagnaBaseUri`): [`NetworkNode`](network_node.NetworkNode) #### Parameters | Name | Type | | :------ | :------ | | `id` | `string` | -| `ip` | `IPv4` | +| `ip` | `string` | | `getNetworkInfo` | () => [`NetworkInfo`](../interfaces/network_network.NetworkInfo) | -| `apiUrl` | `string` | +| `yagnaBaseUri` | `string` | #### Returns @@ -47,7 +49,7 @@ Describes a node in a VPN, mapping a Golem node id to an IP address #### Defined in -[src/network/node.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/node.ts#L8) +[src/network/node.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/node.ts#L7) ## Properties @@ -57,17 +59,45 @@ Describes a node in a VPN, mapping a Golem node id to an IP address #### Defined in -[src/network/node.ts:9](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/node.ts#L9) +[src/network/node.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/node.ts#L8) ___ ### ip -• `Readonly` **ip**: `IPv4` +• `Readonly` **ip**: `string` #### Defined in -[src/network/node.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/node.ts#L10) +[src/network/node.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/node.ts#L9) + +___ + +### getNetworkInfo + +• **getNetworkInfo**: () => [`NetworkInfo`](../interfaces/network_network.NetworkInfo) + +#### Type declaration + +▸ (): [`NetworkInfo`](../interfaces/network_network.NetworkInfo) + +##### Returns + +[`NetworkInfo`](../interfaces/network_network.NetworkInfo) + +#### Defined in + +[src/network/node.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/node.ts#L10) + +___ + +### yagnaBaseUri + +• **yagnaBaseUri**: `string` + +#### Defined in + +[src/network/node.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/node.ts#L11) ## Methods @@ -85,11 +115,11 @@ on the provider's end. | Name | Type | | :------ | :------ | -| `net` | \{ `nodeIp`: `string` ; `id`: `string` ; `ip`: `string` ; `mask`: `string` ; `nodes`: \{ `[ip: string]`: `string`; } }[] | +| `net` | \{ `nodeIp`: `string` ; `id`: `string` ; `ip`: `string` ; `mask`: `string` ; `gateway?`: `string` ; `nodes`: \{ `[ip: string]`: `string`; } }[] | #### Defined in -[src/network/node.ts:20](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/node.ts#L20) +[src/network/node.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/node.ts#L19) ___ @@ -97,20 +127,16 @@ ___ ▸ **getWebsocketUri**(`port`): `string` -Get the websocket URI corresponding with a specific TCP port on this Node. - #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `port` | `number` | TCP port of the service within the runtime | +| Name | Type | +| :------ | :------ | +| `port` | `number` | #### Returns `string` -the url - #### Defined in -[src/network/node.ts:36](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/node.ts#L36) +[src/network/node.ts:30](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/node.ts#L30) diff --git a/src/pages/docs/golem-js/reference/classes/network_tcpProxy.TcpProxy.md b/src/pages/docs/golem-js/reference/classes/network_tcpProxy.TcpProxy.md new file mode 100644 index 000000000..b1516f32d --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/network_tcpProxy.TcpProxy.md @@ -0,0 +1,101 @@ +--- +title: "Class TcpProxy" +pageTitle: "Class TcpProxy - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class TcpProxy within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: TcpProxy + +[network/tcpProxy](../modules/network_tcpProxy).TcpProxy + +Allows proxying of TCP traffic to a service running in an activity on a provider via the requestor + +**IMPORTANT** + +This feature is supported only in the Node.js environment. In has no effect in browsers. + +## Table of contents + +### Constructors + +- [constructor](network_tcpProxy.TcpProxy#constructor) + +### Properties + +- [events](network_tcpProxy.TcpProxy#events) + +### Methods + +- [listen](network_tcpProxy.TcpProxy#listen) +- [close](network_tcpProxy.TcpProxy#close) + +## Constructors + +### constructor + +• **new TcpProxy**(`wsUrl`, `appKey`, `options`): [`TcpProxy`](network_tcpProxy.TcpProxy) + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `wsUrl` | `string` | The URL to the WebSocket implementing the communication transport layer | +| `appKey` | `string` | The yagna app-key used to authenticate the WebSocket connection | +| `options` | `Partial`\<[`TcpProxyOptions`](../interfaces/network_tcpProxy.TcpProxyOptions)\> | Additional options of the proxy | + +#### Returns + +[`TcpProxy`](network_tcpProxy.TcpProxy) + +#### Defined in + +[src/network/tcpProxy.ts:44](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/tcpProxy.ts#L44) + +## Properties + +### events + +• `Readonly` **events**: `EventEmitter`\<[`TcpProxyEvents`](../interfaces/network_tcpProxy.TcpProxyEvents), `any`\> + +#### Defined in + +[src/network/tcpProxy.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/tcpProxy.ts#L38) + +## Methods + +### listen + +▸ **listen**(`port`, `abort?`): `Promise`\<`void`\> + +Start the proxy in listening mode + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `port` | `number` | The port number to use on the requestor | +| `abort?` | `AbortController` | The abort controller to use in order to control cancelling requests | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/network/tcpProxy.ts:134](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/tcpProxy.ts#L134) + +___ + +### close + +▸ **close**(): `Promise`\<`void`\> + +Gracefully close the proxy + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/network/tcpProxy.ts:163](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/tcpProxy.ts#L163) diff --git a/src/pages/docs/golem-js/reference/classes/package_package.Package.md b/src/pages/docs/golem-js/reference/classes/package_package.Package.md deleted file mode 100644 index 78e86a8b1..000000000 --- a/src/pages/docs/golem-js/reference/classes/package_package.Package.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "Class Package" -pageTitle: "Class Package - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class Package within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: Package - -[package/package](../modules/package_package).Package - -Package module - an object for descriptions of the payload required by the requestor. - -## Table of contents - -### Accessors - -- [details](package_package.Package#details) - -### Methods - -- [create](package_package.Package#create) -- [getImageIdentifier](package_package.Package#getimageidentifier) -- [getDemandDecoration](package_package.Package#getdemanddecoration) - -## Accessors - -### details - -• `get` **details**(): [`PackageDetails`](../interfaces/package_package.PackageDetails) - -#### Returns - -[`PackageDetails`](../interfaces/package_package.PackageDetails) - -#### Defined in - -[src/package/package.ts:138](https://github.com/golemfactory/golem-js/blob/7cee55b/src/package/package.ts#L138) - -## Methods - -### create - -▸ **create**(`options`): [`Package`](package_package.Package) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | [`PackageOptions`](../modules/package_package#packageoptions) | - -#### Returns - -[`Package`](package_package.Package) - -#### Defined in - -[src/package/package.ts:56](https://github.com/golemfactory/golem-js/blob/7cee55b/src/package/package.ts#L56) - -___ - -### getImageIdentifier - -▸ **getImageIdentifier**(`str`): [`RequireAtLeastOne`](../modules/utils_types#requireatleastone)\<\{ `imageHash`: `string` ; `imageTag`: `string` }, ``"imageHash"`` \| ``"imageTag"``\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `str` | `string` | - -#### Returns - -[`RequireAtLeastOne`](../modules/utils_types#requireatleastone)\<\{ `imageHash`: `string` ; `imageTag`: `string` }, ``"imageHash"`` \| ``"imageTag"``\> - -#### Defined in - -[src/package/package.ts:62](https://github.com/golemfactory/golem-js/blob/7cee55b/src/package/package.ts#L62) - -___ - -### getDemandDecoration - -▸ **getDemandDecoration**(): `Promise`\<[`MarketDecoration`](../modules/market_builder#marketdecoration)\> - -#### Returns - -`Promise`\<[`MarketDecoration`](../modules/market_builder#marketdecoration)\> - -#### Defined in - -[src/package/package.ts:77](https://github.com/golemfactory/golem-js/blob/7cee55b/src/package/package.ts#L77) diff --git a/src/pages/docs/golem-js/reference/classes/payment_BaseDocument.BaseDocument.md b/src/pages/docs/golem-js/reference/classes/payment_BaseDocument.BaseDocument.md new file mode 100644 index 000000000..2ecb46da5 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/payment_BaseDocument.BaseDocument.md @@ -0,0 +1,192 @@ +--- +title: "Class BaseDocument" +pageTitle: "Class BaseDocument - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class BaseDocument within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: BaseDocument\ + +[payment/BaseDocument](../modules/payment_BaseDocument).BaseDocument + +Common properties and methods for payment related documents - Invoices and DebitNotes + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `ModelType` | extends [`BaseModel`](../interfaces/payment_BaseDocument.BaseModel) | + +## Hierarchy + +- **`BaseDocument`** + + ↳ [`DebitNote`](payment_debit_note.DebitNote) + + ↳ [`Invoice`](payment_invoice.Invoice) + +## Table of contents + +### Constructors + +- [constructor](payment_BaseDocument.BaseDocument#constructor) + +### Properties + +- [recipientId](payment_BaseDocument.BaseDocument#recipientid) +- [payeeAddr](payment_BaseDocument.BaseDocument#payeeaddr) +- [requestorWalletAddress](payment_BaseDocument.BaseDocument#requestorwalletaddress) +- [paymentPlatform](payment_BaseDocument.BaseDocument#paymentplatform) +- [agreementId](payment_BaseDocument.BaseDocument#agreementid) +- [paymentDueDate](payment_BaseDocument.BaseDocument#paymentduedate) +- [status](payment_BaseDocument.BaseDocument#status) +- [id](payment_BaseDocument.BaseDocument#id) +- [model](payment_BaseDocument.BaseDocument#model) +- [provider](payment_BaseDocument.BaseDocument#provider) + +### Methods + +- [getStatus](payment_BaseDocument.BaseDocument#getstatus) + +## Constructors + +### constructor + +• **new BaseDocument**\<`ModelType`\>(`id`, `model`, `provider`): [`BaseDocument`](payment_BaseDocument.BaseDocument)\<`ModelType`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `ModelType` | extends [`BaseModel`](../interfaces/payment_BaseDocument.BaseModel) | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | +| `model` | `ModelType` | +| `provider` | [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) | + +#### Returns + +[`BaseDocument`](payment_BaseDocument.BaseDocument)\<`ModelType`\> + +#### Defined in + +[src/payment/BaseDocument.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L28) + +## Properties + +### recipientId + +• `Readonly` **recipientId**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L19) + +___ + +### payeeAddr + +• `Readonly` **payeeAddr**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L20) + +___ + +### requestorWalletAddress + +• `Readonly` **requestorWalletAddress**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:21](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L21) + +___ + +### paymentPlatform + +• `Readonly` **paymentPlatform**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L22) + +___ + +### agreementId + +• `Readonly` **agreementId**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L23) + +___ + +### paymentDueDate + +• `Optional` `Readonly` **paymentDueDate**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L24) + +___ + +### status + +• `Protected` **status**: ``"ISSUED"`` \| ``"RECEIVED"`` \| ``"ACCEPTED"`` \| ``"REJECTED"`` \| ``"FAILED"`` \| ``"SETTLED"`` \| ``"CANCELLED"`` + +#### Defined in + +[src/payment/BaseDocument.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L26) + +___ + +### id + +• `Readonly` **id**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L29) + +___ + +### model + +• `Protected` **model**: `ModelType` + +#### Defined in + +[src/payment/BaseDocument.ts:30](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L30) + +___ + +### provider + +• `Readonly` **provider**: [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) + +#### Defined in + +[src/payment/BaseDocument.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L31) + +## Methods + +### getStatus + +▸ **getStatus**(): ``"ISSUED"`` \| ``"RECEIVED"`` \| ``"ACCEPTED"`` \| ``"REJECTED"`` \| ``"FAILED"`` \| ``"SETTLED"`` \| ``"CANCELLED"`` + +Tells what's the current status of the document + +#### Returns + +``"ISSUED"`` \| ``"RECEIVED"`` \| ``"ACCEPTED"`` \| ``"REJECTED"`` \| ``"FAILED"`` \| ``"SETTLED"`` \| ``"CANCELLED"`` + +#### Defined in + +[src/payment/BaseDocument.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L45) diff --git a/src/pages/docs/golem-js/reference/classes/payment_InvoiceProcessor.InvoiceProcessor.md b/src/pages/docs/golem-js/reference/classes/payment_InvoiceProcessor.InvoiceProcessor.md index 4a6eca30d..ffcacb1c2 100644 --- a/src/pages/docs/golem-js/reference/classes/payment_InvoiceProcessor.InvoiceProcessor.md +++ b/src/pages/docs/golem-js/reference/classes/payment_InvoiceProcessor.InvoiceProcessor.md @@ -12,61 +12,64 @@ A class that provides methods for working with invoices. It interacts with the Y ## Table of contents +### Constructors + +- [constructor](payment_InvoiceProcessor.InvoiceProcessor#constructor) + ### Methods -- [create](payment_InvoiceProcessor.InvoiceProcessor#create) - [collectInvoices](payment_InvoiceProcessor.InvoiceProcessor#collectinvoices) - [fetchSingleInvoice](payment_InvoiceProcessor.InvoiceProcessor#fetchsingleinvoice) - [acceptInvoice](payment_InvoiceProcessor.InvoiceProcessor#acceptinvoice) - [acceptManyInvoices](payment_InvoiceProcessor.InvoiceProcessor#acceptmanyinvoices) -## Methods +## Constructors -### create +### constructor -▸ **create**(`options?`): `Promise`\<[`InvoiceProcessor`](payment_InvoiceProcessor.InvoiceProcessor)\> +• **new InvoiceProcessor**(`api`): [`InvoiceProcessor`](payment_InvoiceProcessor.InvoiceProcessor) -Creates an instance of `InvoiceProcessor` and connects to the Yagna API. +Use `InvoiceProcessor.create()` to create an instance of this class. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `options?` | [`YagnaOptions`](../modules/utils_yagna_yagna#yagnaoptions) | Options for the Yagna API. | +| Name | Type | +| :------ | :------ | +| `api` | [`YagnaApi`](shared_yagna_yagnaApi.YagnaApi) | #### Returns -`Promise`\<[`InvoiceProcessor`](payment_InvoiceProcessor.InvoiceProcessor)\> +[`InvoiceProcessor`](payment_InvoiceProcessor.InvoiceProcessor) #### Defined in -[src/payment/InvoiceProcessor.ts:36](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/InvoiceProcessor.ts#L36) +[src/payment/InvoiceProcessor.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/InvoiceProcessor.ts#L29) -___ +## Methods ### collectInvoices -▸ **collectInvoices**(`«destructured»?`): `Promise`\<`Invoice`[]\> +▸ **collectInvoices**(`options?`): `Promise`\<{}[]\> Collects invoices from the Yagna API until the limit is reached or there are no more invoices. #### Parameters -| Name | Type | Default value | -| :------ | :------ | :------ | -| `«destructured»` | `Object` | `{}` | -| › `after?` | `Date` | `undefined` | -| › `limit?` | `number` | `50` | -| › `statuses?` | `string`[] | `undefined` | -| › `providerIds?` | `string`[] | `undefined` | -| › `minAmount?` | `Numeric` | `undefined` | -| › `maxAmount?` | `Numeric` | `undefined` | -| › `providerWallets?` | `string`[] | `undefined` | -| › `paymentPlatforms?` | `string`[] | `undefined` | +| Name | Type | Default value | Description | +| :------ | :------ | :------ | :------ | +| `options` | `Object` | `{}` | The parameters for collecting invoices. | +| `options.after?` | `Date` | `undefined` | Only collect invoices that were created after this date. | +| `options.limit?` | `number` | `50` | Maximum number of invoices to collect. | +| `options.statuses?` | `string`[] | `undefined` | Only collect invoices with these statuses. | +| `options.providerIds?` | `string`[] | `undefined` | Only collect invoices from these providers. | +| `options.minAmount?` | `Numeric` | `undefined` | Only collect invoices with an amount greater than or equal to this. | +| `options.maxAmount?` | `Numeric` | `undefined` | Only collect invoices with an amount less than or equal to this. | +| `options.providerWallets?` | `string`[] | `undefined` | Only collect invoices from these provider wallets. | +| `options.paymentPlatforms?` | `string`[] | `undefined` | Only collect invoices from these payment platforms. | #### Returns -`Promise`\<`Invoice`[]\> +`Promise`\<{}[]\> **`Example`** @@ -85,7 +88,7 @@ const invoices = await invoiceProcessor.collectInvoices({ #### Defined in -[src/payment/InvoiceProcessor.ts:68](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/InvoiceProcessor.ts#L68) +[src/payment/InvoiceProcessor.ts:57](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/InvoiceProcessor.ts#L57) ___ @@ -107,7 +110,7 @@ Fetches a single invoice from the Yagna API. #### Defined in -[src/payment/InvoiceProcessor.ts:120](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/InvoiceProcessor.ts#L120) +[src/payment/InvoiceProcessor.ts:109](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/InvoiceProcessor.ts#L109) ___ @@ -132,7 +135,7 @@ If `dryRun` is `true`, no allocation will be created and the invoice will not be #### Defined in -[src/payment/InvoiceProcessor.ts:128](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/InvoiceProcessor.ts#L128) +[src/payment/InvoiceProcessor.ts:117](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/InvoiceProcessor.ts#L117) ___ @@ -162,4 +165,4 @@ Use the returned `InvoiceAcceptResult` to check which invoices were accepted suc #### Defined in -[src/payment/InvoiceProcessor.ts:193](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/InvoiceProcessor.ts#L193) +[src/payment/InvoiceProcessor.ts:182](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/InvoiceProcessor.ts#L182) diff --git a/src/pages/docs/golem-js/reference/classes/payment_PayerDetails.PayerDetails.md b/src/pages/docs/golem-js/reference/classes/payment_PayerDetails.PayerDetails.md new file mode 100644 index 000000000..80a0fcc71 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/payment_PayerDetails.PayerDetails.md @@ -0,0 +1,103 @@ +--- +title: "Class PayerDetails" +pageTitle: "Class PayerDetails - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class PayerDetails within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: PayerDetails + +[payment/PayerDetails](../modules/payment_PayerDetails).PayerDetails + +## Table of contents + +### Constructors + +- [constructor](payment_PayerDetails.PayerDetails#constructor) + +### Properties + +- [network](payment_PayerDetails.PayerDetails#network) +- [driver](payment_PayerDetails.PayerDetails#driver) +- [address](payment_PayerDetails.PayerDetails#address) +- [token](payment_PayerDetails.PayerDetails#token) + +### Methods + +- [getPaymentPlatform](payment_PayerDetails.PayerDetails#getpaymentplatform) + +## Constructors + +### constructor + +• **new PayerDetails**(`network`, `driver`, `address`, `token`): [`PayerDetails`](payment_PayerDetails.PayerDetails) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `network` | `string` | +| `driver` | `string` | +| `address` | `string` | +| `token` | `string` & {} \| ``"glm"`` \| ``"tglm"`` | + +#### Returns + +[`PayerDetails`](payment_PayerDetails.PayerDetails) + +#### Defined in + +[src/payment/PayerDetails.ts:2](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/PayerDetails.ts#L2) + +## Properties + +### network + +• `Readonly` **network**: `string` + +#### Defined in + +[src/payment/PayerDetails.ts:3](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/PayerDetails.ts#L3) + +___ + +### driver + +• `Readonly` **driver**: `string` + +#### Defined in + +[src/payment/PayerDetails.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/PayerDetails.ts#L4) + +___ + +### address + +• `Readonly` **address**: `string` + +#### Defined in + +[src/payment/PayerDetails.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/PayerDetails.ts#L5) + +___ + +### token + +• `Readonly` **token**: `string` & {} \| ``"glm"`` \| ``"tglm"`` + +#### Defined in + +[src/payment/PayerDetails.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/PayerDetails.ts#L7) + +## Methods + +### getPaymentPlatform + +▸ **getPaymentPlatform**(): `string` + +#### Returns + +`string` + +#### Defined in + +[src/payment/PayerDetails.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/PayerDetails.ts#L10) diff --git a/src/pages/docs/golem-js/reference/classes/payment_agreement_payment_process.AgreementPaymentProcess.md b/src/pages/docs/golem-js/reference/classes/payment_agreement_payment_process.AgreementPaymentProcess.md index 46d2ddb0c..f3a0964e6 100644 --- a/src/pages/docs/golem-js/reference/classes/payment_agreement_payment_process.AgreementPaymentProcess.md +++ b/src/pages/docs/golem-js/reference/classes/payment_agreement_payment_process.AgreementPaymentProcess.md @@ -8,7 +8,9 @@ type: "JS API Reference" [payment/agreement\_payment\_process](../modules/payment_agreement_payment_process).AgreementPaymentProcess -Process manager that controls the logic behind processing events related to an agreement which result with payments +Process manager that controls the logic behind processing payments for an agreement (debit notes and invoices). +The process is started automatically and ends when the final invoice is received. +You can stop the process earlier by calling the `stop` method. You cannot restart the process after stopping it. ## Table of contents @@ -21,30 +23,31 @@ Process manager that controls the logic behind processing events related to an a - [logger](payment_agreement_payment_process.AgreementPaymentProcess#logger) - [agreement](payment_agreement_payment_process.AgreementPaymentProcess#agreement) - [allocation](payment_agreement_payment_process.AgreementPaymentProcess#allocation) -- [filters](payment_agreement_payment_process.AgreementPaymentProcess#filters) +- [paymentModule](payment_agreement_payment_process.AgreementPaymentProcess#paymentmodule) ### Methods - [addDebitNote](payment_agreement_payment_process.AgreementPaymentProcess#adddebitnote) - [addInvoice](payment_agreement_payment_process.AgreementPaymentProcess#addinvoice) - [isFinished](payment_agreement_payment_process.AgreementPaymentProcess#isfinished) +- [isStarted](payment_agreement_payment_process.AgreementPaymentProcess#isstarted) +- [stop](payment_agreement_payment_process.AgreementPaymentProcess#stop) ## Constructors ### constructor -• **new AgreementPaymentProcess**(`agreement`, `allocation`, `filters`, `logger?`): [`AgreementPaymentProcess`](payment_agreement_payment_process.AgreementPaymentProcess) +• **new AgreementPaymentProcess**(`agreement`, `allocation`, `paymentModule`, `options?`, `logger?`): [`AgreementPaymentProcess`](payment_agreement_payment_process.AgreementPaymentProcess) #### Parameters | Name | Type | | :------ | :------ | -| `agreement` | `Agreement` | -| `allocation` | `Allocation` | -| `filters` | `Object` | -| `filters.invoiceFilter` | [`InvoiceFilter`](../modules/payment_service#invoicefilter) | -| `filters.debitNoteFilter` | [`DebitNoteFilter`](../modules/payment_service#debitnotefilter) | -| `logger?` | [`Logger`](../interfaces/utils_logger_logger.Logger) | +| `agreement` | [`Agreement`](market_agreement_agreement.Agreement) | +| `allocation` | [`Allocation`](payment_allocation.Allocation) | +| `paymentModule` | [`PaymentModule`](../interfaces/payment_payment_module.PaymentModule) | +| `options?` | `Partial`\<[`PaymentProcessOptions`](../interfaces/payment_agreement_payment_process.PaymentProcessOptions)\> | +| `logger?` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | #### Returns @@ -52,54 +55,47 @@ Process manager that controls the logic behind processing events related to an a #### Defined in -[src/payment/agreement_payment_process.ts:28](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/agreement_payment_process.ts#L28) +[src/payment/agreement_payment_process.ts:59](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L59) ## Properties ### logger -• `Readonly` **logger**: [`Logger`](../interfaces/utils_logger_logger.Logger) +• `Readonly` **logger**: [`Logger`](../interfaces/shared_utils_logger_logger.Logger) #### Defined in -[src/payment/agreement_payment_process.ts:26](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/agreement_payment_process.ts#L26) +[src/payment/agreement_payment_process.ts:55](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L55) ___ ### agreement -• `Readonly` **agreement**: `Agreement` +• `Readonly` **agreement**: [`Agreement`](market_agreement_agreement.Agreement) #### Defined in -[src/payment/agreement_payment_process.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/agreement_payment_process.ts#L29) +[src/payment/agreement_payment_process.ts:60](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L60) ___ ### allocation -• `Readonly` **allocation**: `Allocation` +• `Readonly` **allocation**: [`Allocation`](payment_allocation.Allocation) #### Defined in -[src/payment/agreement_payment_process.ts:30](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/agreement_payment_process.ts#L30) +[src/payment/agreement_payment_process.ts:61](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L61) ___ -### filters +### paymentModule -• `Readonly` **filters**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `invoiceFilter` | [`InvoiceFilter`](../modules/payment_service#invoicefilter) | -| `debitNoteFilter` | [`DebitNoteFilter`](../modules/payment_service#debitnotefilter) | +• `Readonly` **paymentModule**: [`PaymentModule`](../interfaces/payment_payment_module.PaymentModule) #### Defined in -[src/payment/agreement_payment_process.ts:31](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/agreement_payment_process.ts#L31) +[src/payment/agreement_payment_process.ts:62](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L62) ## Methods @@ -113,7 +109,7 @@ Adds the debit note to the process avoiding race conditions | Name | Type | | :------ | :------ | -| `debitNote` | `DebitNote` | +| `debitNote` | [`DebitNote`](payment_debit_note.DebitNote) | #### Returns @@ -121,7 +117,7 @@ Adds the debit note to the process avoiding race conditions #### Defined in -[src/payment/agreement_payment_process.ts:43](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/agreement_payment_process.ts#L43) +[src/payment/agreement_payment_process.ts:91](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L91) ___ @@ -135,7 +131,7 @@ Adds the invoice to the process avoiding race conditions | Name | Type | | :------ | :------ | -| `invoice` | `Invoice` | +| `invoice` | [`Invoice`](payment_invoice.Invoice) | #### Returns @@ -143,7 +139,7 @@ Adds the invoice to the process avoiding race conditions #### Defined in -[src/payment/agreement_payment_process.ts:50](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/agreement_payment_process.ts#L50) +[src/payment/agreement_payment_process.ts:98](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L98) ___ @@ -159,4 +155,32 @@ Tells if the process reached a point in which we can consider it as "finished" #### Defined in -[src/payment/agreement_payment_process.ts:57](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/agreement_payment_process.ts#L57) +[src/payment/agreement_payment_process.ts:105](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L105) + +___ + +### isStarted + +▸ **isStarted**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[src/payment/agreement_payment_process.ts:299](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L299) + +___ + +### stop + +▸ **stop**(): `void` + +#### Returns + +`void` + +#### Defined in + +[src/payment/agreement_payment_process.ts:303](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L303) diff --git a/src/pages/docs/golem-js/reference/classes/payment_allocation.Allocation.md b/src/pages/docs/golem-js/reference/classes/payment_allocation.Allocation.md new file mode 100644 index 000000000..0499adeb6 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/payment_allocation.Allocation.md @@ -0,0 +1,144 @@ +--- +title: "Class Allocation" +pageTitle: "Class Allocation - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Allocation within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Allocation + +[payment/allocation](../modules/payment_allocation).Allocation + +Represents a designated sum of money reserved for the purpose of making some particular payments. Allocations are currently purely virtual objects. An Allocation is connected to a payment account (wallet) specified by address and payment platform field. + +## Table of contents + +### Constructors + +- [constructor](payment_allocation.Allocation#constructor) + +### Properties + +- [id](payment_allocation.Allocation#id) +- [timestamp](payment_allocation.Allocation#timestamp) +- [timeout](payment_allocation.Allocation#timeout) +- [address](payment_allocation.Allocation#address) +- [paymentPlatform](payment_allocation.Allocation#paymentplatform) +- [totalAmount](payment_allocation.Allocation#totalamount) +- [spentAmount](payment_allocation.Allocation#spentamount) +- [remainingAmount](payment_allocation.Allocation#remainingamount) + +## Constructors + +### constructor + +• **new Allocation**(`model`): [`Allocation`](payment_allocation.Allocation) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `model` | `Allocation` | + +#### Returns + +[`Allocation`](payment_allocation.Allocation) + +#### Defined in + +[src/payment/allocation.ts:41](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/allocation.ts#L41) + +## Properties + +### id + +• `Readonly` **id**: `string` + +Allocation ID + +#### Defined in + +[src/payment/allocation.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/allocation.ts#L18) + +___ + +### timestamp + +• `Readonly` **timestamp**: `string` + +Timestamp of creation + +#### Defined in + +[src/payment/allocation.ts:21](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/allocation.ts#L21) + +___ + +### timeout + +• `Optional` `Readonly` **timeout**: `string` + +Timeout + +#### Defined in + +[src/payment/allocation.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/allocation.ts#L24) + +___ + +### address + +• `Readonly` **address**: `string` + +Address of requestor + +#### Defined in + +[src/payment/allocation.ts:27](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/allocation.ts#L27) + +___ + +### paymentPlatform + +• `Readonly` **paymentPlatform**: `string` + +Payment platform + +#### Defined in + +[src/payment/allocation.ts:30](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/allocation.ts#L30) + +___ + +### totalAmount + +• `Readonly` **totalAmount**: `string` + +Total allocation Amount + +#### Defined in + +[src/payment/allocation.ts:33](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/allocation.ts#L33) + +___ + +### spentAmount + +• `Readonly` **spentAmount**: `string` + +The amount that has been already spent + +#### Defined in + +[src/payment/allocation.ts:36](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/allocation.ts#L36) + +___ + +### remainingAmount + +• `Readonly` **remainingAmount**: `string` + +The amount left for spending + +#### Defined in + +[src/payment/allocation.ts:39](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/allocation.ts#L39) diff --git a/src/pages/docs/golem-js/reference/classes/payment_debit_note.DebitNote.md b/src/pages/docs/golem-js/reference/classes/payment_debit_note.DebitNote.md new file mode 100644 index 000000000..e527de761 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/payment_debit_note.DebitNote.md @@ -0,0 +1,295 @@ +--- +title: "Class DebitNote" +pageTitle: "Class DebitNote - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class DebitNote within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: DebitNote + +[payment/debit\_note](../modules/payment_debit_note).DebitNote + +A Debit Note is an artifact issued by the Provider to the Requestor, in the context of a specific Activity. It is a notification of Total Amount Due incurred by the Activity until the moment the Debit Note is issued. This is expected to be used as trigger for payment in upfront-payment or pay-as-you-go scenarios. NOTE: Only Debit Notes with non-null paymentDueDate are expected to trigger payments. NOTE: Debit Notes flag the current Total Amount Due, which is accumulated from the start of Activity. Debit Notes are expected to trigger payments, therefore payment amount for the newly received Debit Note is expected to be determined by difference of Total Payments for the Agreement vs Total Amount Due. + +## Hierarchy + +- [`BaseDocument`](payment_BaseDocument.BaseDocument)\<`PaymentApi.DebitNoteDTO`\> + + ↳ **`DebitNote`** + +## Table of contents + +### Constructors + +- [constructor](payment_debit_note.DebitNote#constructor) + +### Properties + +- [id](payment_debit_note.DebitNote#id) +- [previousDebitNoteId](payment_debit_note.DebitNote#previousdebitnoteid) +- [timestamp](payment_debit_note.DebitNote#timestamp) +- [activityId](payment_debit_note.DebitNote#activityid) +- [totalAmountDue](payment_debit_note.DebitNote#totalamountdue) +- [usageCounterVector](payment_debit_note.DebitNote#usagecountervector) +- [model](payment_debit_note.DebitNote#model) +- [recipientId](payment_debit_note.DebitNote#recipientid) +- [payeeAddr](payment_debit_note.DebitNote#payeeaddr) +- [requestorWalletAddress](payment_debit_note.DebitNote#requestorwalletaddress) +- [paymentPlatform](payment_debit_note.DebitNote#paymentplatform) +- [agreementId](payment_debit_note.DebitNote#agreementid) +- [paymentDueDate](payment_debit_note.DebitNote#paymentduedate) +- [status](payment_debit_note.DebitNote#status) +- [provider](payment_debit_note.DebitNote#provider) + +### Methods + +- [getPreciseAmount](payment_debit_note.DebitNote#getpreciseamount) +- [getStatus](payment_debit_note.DebitNote#getstatus) + +## Constructors + +### constructor + +• **new DebitNote**(`model`, `providerInfo`): [`DebitNote`](payment_debit_note.DebitNote) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `model` | `DebitNote` | +| `providerInfo` | [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) | + +#### Returns + +[`DebitNote`](payment_debit_note.DebitNote) + +#### Overrides + +[BaseDocument](payment_BaseDocument.BaseDocument).[constructor](payment_BaseDocument.BaseDocument#constructor) + +#### Defined in + +[src/payment/debit_note.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/debit_note.ts#L26) + +## Properties + +### id + +• `Readonly` **id**: `string` + +#### Overrides + +[BaseDocument](payment_BaseDocument.BaseDocument).[id](payment_BaseDocument.BaseDocument#id) + +#### Defined in + +[src/payment/debit_note.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/debit_note.ts#L14) + +___ + +### previousDebitNoteId + +• `Optional` `Readonly` **previousDebitNoteId**: `string` + +#### Defined in + +[src/payment/debit_note.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/debit_note.ts#L15) + +___ + +### timestamp + +• `Readonly` **timestamp**: `string` + +#### Defined in + +[src/payment/debit_note.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/debit_note.ts#L16) + +___ + +### activityId + +• `Readonly` **activityId**: `string` + +#### Defined in + +[src/payment/debit_note.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/debit_note.ts#L17) + +___ + +### totalAmountDue + +• `Readonly` **totalAmountDue**: `string` + +#### Defined in + +[src/payment/debit_note.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/debit_note.ts#L18) + +___ + +### usageCounterVector + +• `Optional` `Readonly` **usageCounterVector**: `object` + +#### Defined in + +[src/payment/debit_note.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/debit_note.ts#L19) + +___ + +### model + +• `Protected` **model**: `DebitNote` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[model](payment_BaseDocument.BaseDocument#model) + +#### Defined in + +[src/payment/debit_note.ts:27](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/debit_note.ts#L27) + +___ + +### recipientId + +• `Readonly` **recipientId**: `string` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[recipientId](payment_BaseDocument.BaseDocument#recipientid) + +#### Defined in + +[src/payment/BaseDocument.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L19) + +___ + +### payeeAddr + +• `Readonly` **payeeAddr**: `string` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[payeeAddr](payment_BaseDocument.BaseDocument#payeeaddr) + +#### Defined in + +[src/payment/BaseDocument.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L20) + +___ + +### requestorWalletAddress + +• `Readonly` **requestorWalletAddress**: `string` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[requestorWalletAddress](payment_BaseDocument.BaseDocument#requestorwalletaddress) + +#### Defined in + +[src/payment/BaseDocument.ts:21](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L21) + +___ + +### paymentPlatform + +• `Readonly` **paymentPlatform**: `string` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[paymentPlatform](payment_BaseDocument.BaseDocument#paymentplatform) + +#### Defined in + +[src/payment/BaseDocument.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L22) + +___ + +### agreementId + +• `Readonly` **agreementId**: `string` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[agreementId](payment_BaseDocument.BaseDocument#agreementid) + +#### Defined in + +[src/payment/BaseDocument.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L23) + +___ + +### paymentDueDate + +• `Optional` `Readonly` **paymentDueDate**: `string` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[paymentDueDate](payment_BaseDocument.BaseDocument#paymentduedate) + +#### Defined in + +[src/payment/BaseDocument.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L24) + +___ + +### status + +• `Protected` **status**: ``"ISSUED"`` \| ``"RECEIVED"`` \| ``"ACCEPTED"`` \| ``"REJECTED"`` \| ``"FAILED"`` \| ``"SETTLED"`` \| ``"CANCELLED"`` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[status](payment_BaseDocument.BaseDocument#status) + +#### Defined in + +[src/payment/BaseDocument.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L26) + +___ + +### provider + +• `Readonly` **provider**: [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[provider](payment_BaseDocument.BaseDocument#provider) + +#### Defined in + +[src/payment/BaseDocument.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L31) + +## Methods + +### getPreciseAmount + +▸ **getPreciseAmount**(): `Decimal` + +#### Returns + +`Decimal` + +#### Defined in + +[src/payment/debit_note.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/debit_note.ts#L38) + +___ + +### getStatus + +▸ **getStatus**(): ``"ISSUED"`` \| ``"RECEIVED"`` \| ``"ACCEPTED"`` \| ``"REJECTED"`` \| ``"FAILED"`` \| ``"SETTLED"`` \| ``"CANCELLED"`` + +Tells what's the current status of the document + +#### Returns + +``"ISSUED"`` \| ``"RECEIVED"`` \| ``"ACCEPTED"`` \| ``"REJECTED"`` \| ``"FAILED"`` \| ``"SETTLED"`` \| ``"CANCELLED"`` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[getStatus](payment_BaseDocument.BaseDocument#getstatus) + +#### Defined in + +[src/payment/BaseDocument.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L45) diff --git a/src/pages/docs/golem-js/reference/classes/payment_error.GolemPaymentError.md b/src/pages/docs/golem-js/reference/classes/payment_error.GolemPaymentError.md index d81f0a0c4..f5c4cfe69 100644 --- a/src/pages/docs/golem-js/reference/classes/payment_error.GolemPaymentError.md +++ b/src/pages/docs/golem-js/reference/classes/payment_error.GolemPaymentError.md @@ -14,7 +14,7 @@ additionally containing an error code specific to a given subdomain ## Hierarchy -- [`GolemModuleError`](error_golem_error.GolemModuleError) +- [`GolemModuleError`](shared_error_golem_error.GolemModuleError) ↳ **`GolemPaymentError`** @@ -27,10 +27,13 @@ additionally containing an error code specific to a given subdomain ### Properties - [code](payment_error.GolemPaymentError#code) -- [allocation](payment_error.GolemPaymentError#allocation) -- [provider](payment_error.GolemPaymentError#provider) - [previous](payment_error.GolemPaymentError#previous) +### Methods + +- [getAllocation](payment_error.GolemPaymentError#getallocation) +- [getProvider](payment_error.GolemPaymentError#getprovider) + ## Constructors ### constructor @@ -43,8 +46,8 @@ additionally containing an error code specific to a given subdomain | :------ | :------ | | `message` | `string` | | `code` | [`PaymentErrorCode`](../enums/payment_error.PaymentErrorCode) | -| `allocation?` | `Allocation` | -| `provider?` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | +| `allocation?` | [`Allocation`](payment_allocation.Allocation) | +| `provider?` | [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) | | `previous?` | `Error` | #### Returns @@ -53,11 +56,11 @@ additionally containing an error code specific to a given subdomain #### Overrides -[GolemModuleError](error_golem_error.GolemModuleError).[constructor](error_golem_error.GolemModuleError#constructor) +[GolemModuleError](shared_error_golem_error.GolemModuleError).[constructor](shared_error_golem_error.GolemModuleError#constructor) #### Defined in -[src/payment/error.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L19) +[src/payment/error.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L23) ## Properties @@ -67,44 +70,52 @@ additionally containing an error code specific to a given subdomain #### Inherited from -[GolemModuleError](error_golem_error.GolemModuleError).[code](error_golem_error.GolemModuleError#code) +[GolemModuleError](shared_error_golem_error.GolemModuleError).[code](shared_error_golem_error.GolemModuleError#code) #### Defined in -[src/payment/error.ts:21](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L21) +[src/payment/error.ts:25](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L25) ___ -### allocation +### previous + +• `Optional` **previous**: `Error` + +The previous error, if any, that led to this error. -• `Optional` **allocation**: `Allocation` +#### Inherited from + +[GolemModuleError](shared_error_golem_error.GolemModuleError).[previous](shared_error_golem_error.GolemModuleError#previous) #### Defined in -[src/payment/error.ts:22](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L22) +[src/payment/error.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L28) -___ +## Methods -### provider +### getAllocation -• `Optional` **provider**: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) +▸ **getAllocation**(): `undefined` \| [`Allocation`](payment_allocation.Allocation) + +#### Returns + +`undefined` \| [`Allocation`](payment_allocation.Allocation) #### Defined in -[src/payment/error.ts:23](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L23) +[src/payment/error.ts:34](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L34) ___ -### previous +### getProvider -• `Optional` **previous**: `Error` +▸ **getProvider**(): `undefined` \| [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) -The previous error, if any, that led to this error. - -#### Inherited from +#### Returns -[GolemModuleError](error_golem_error.GolemModuleError).[previous](error_golem_error.GolemModuleError#previous) +`undefined` \| [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) #### Defined in -[src/payment/error.ts:24](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L24) +[src/payment/error.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L37) diff --git a/src/pages/docs/golem-js/reference/classes/payment_invoice.Invoice.md b/src/pages/docs/golem-js/reference/classes/payment_invoice.Invoice.md new file mode 100644 index 000000000..3dc0f37c2 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/payment_invoice.Invoice.md @@ -0,0 +1,304 @@ +--- +title: "Class Invoice" +pageTitle: "Class Invoice - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class Invoice within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: Invoice + +[payment/invoice](../modules/payment_invoice).Invoice + +An Invoice is an artifact issued by the Provider to the Requestor, in the context of a specific Agreement. It indicates the total Amount owed by the Requestor in this Agreement. No further Debit Notes shall be issued after the Invoice is issued. The issue of Invoice signals the Termination of the Agreement (if it hasn't been terminated already). No Activity execution is allowed after the Invoice is issued. + +## Hierarchy + +- [`BaseDocument`](payment_BaseDocument.BaseDocument)\<`PaymentApi.InvoiceDTO`\> + + ↳ **`Invoice`** + +## Table of contents + +### Constructors + +- [constructor](payment_invoice.Invoice#constructor) + +### Properties + +- [activityIds](payment_invoice.Invoice#activityids) +- [amount](payment_invoice.Invoice#amount) +- [timestamp](payment_invoice.Invoice#timestamp) +- [recipientId](payment_invoice.Invoice#recipientid) +- [model](payment_invoice.Invoice#model) +- [payeeAddr](payment_invoice.Invoice#payeeaddr) +- [requestorWalletAddress](payment_invoice.Invoice#requestorwalletaddress) +- [paymentPlatform](payment_invoice.Invoice#paymentplatform) +- [agreementId](payment_invoice.Invoice#agreementid) +- [paymentDueDate](payment_invoice.Invoice#paymentduedate) +- [status](payment_invoice.Invoice#status) +- [id](payment_invoice.Invoice#id) +- [provider](payment_invoice.Invoice#provider) + +### Methods + +- [getPreciseAmount](payment_invoice.Invoice#getpreciseamount) +- [isSameAs](payment_invoice.Invoice#issameas) +- [getStatus](payment_invoice.Invoice#getstatus) + +## Constructors + +### constructor + +• **new Invoice**(`model`, `providerInfo`): [`Invoice`](payment_invoice.Invoice) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `model` | `Invoice` | +| `providerInfo` | [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) | + +#### Returns + +[`Invoice`](payment_invoice.Invoice) + +#### Overrides + +[BaseDocument](payment_BaseDocument.BaseDocument).[constructor](payment_BaseDocument.BaseDocument#constructor) + +#### Defined in + +[src/payment/invoice.ts:30](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/invoice.ts#L30) + +## Properties + +### activityIds + +• `Optional` `Readonly` **activityIds**: `string`[] + +Activities IDs covered by this Invoice + +#### Defined in + +[src/payment/invoice.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/invoice.ts#L18) + +___ + +### amount + +• `Readonly` **amount**: `string` + +Amount in the invoice + +#### Defined in + +[src/payment/invoice.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/invoice.ts#L20) + +___ + +### timestamp + +• `Readonly` **timestamp**: `string` + +Invoice creation timestamp + +#### Defined in + +[src/payment/invoice.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/invoice.ts#L22) + +___ + +### recipientId + +• `Readonly` **recipientId**: `string` + +Recipient ID + +#### Overrides + +[BaseDocument](payment_BaseDocument.BaseDocument).[recipientId](payment_BaseDocument.BaseDocument#recipientid) + +#### Defined in + +[src/payment/invoice.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/invoice.ts#L24) + +___ + +### model + +• `Protected` **model**: `Invoice` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[model](payment_BaseDocument.BaseDocument#model) + +#### Defined in + +[src/payment/invoice.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/invoice.ts#L31) + +___ + +### payeeAddr + +• `Readonly` **payeeAddr**: `string` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[payeeAddr](payment_BaseDocument.BaseDocument#payeeaddr) + +#### Defined in + +[src/payment/BaseDocument.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L20) + +___ + +### requestorWalletAddress + +• `Readonly` **requestorWalletAddress**: `string` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[requestorWalletAddress](payment_BaseDocument.BaseDocument#requestorwalletaddress) + +#### Defined in + +[src/payment/BaseDocument.ts:21](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L21) + +___ + +### paymentPlatform + +• `Readonly` **paymentPlatform**: `string` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[paymentPlatform](payment_BaseDocument.BaseDocument#paymentplatform) + +#### Defined in + +[src/payment/BaseDocument.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L22) + +___ + +### agreementId + +• `Readonly` **agreementId**: `string` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[agreementId](payment_BaseDocument.BaseDocument#agreementid) + +#### Defined in + +[src/payment/BaseDocument.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L23) + +___ + +### paymentDueDate + +• `Optional` `Readonly` **paymentDueDate**: `string` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[paymentDueDate](payment_BaseDocument.BaseDocument#paymentduedate) + +#### Defined in + +[src/payment/BaseDocument.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L24) + +___ + +### status + +• `Protected` **status**: ``"ISSUED"`` \| ``"RECEIVED"`` \| ``"ACCEPTED"`` \| ``"REJECTED"`` \| ``"FAILED"`` \| ``"SETTLED"`` \| ``"CANCELLED"`` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[status](payment_BaseDocument.BaseDocument#status) + +#### Defined in + +[src/payment/BaseDocument.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L26) + +___ + +### id + +• `Readonly` **id**: `string` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[id](payment_BaseDocument.BaseDocument#id) + +#### Defined in + +[src/payment/BaseDocument.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L29) + +___ + +### provider + +• `Readonly` **provider**: [`ProviderInfo`](../interfaces/market_agreement_agreement.ProviderInfo) + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[provider](payment_BaseDocument.BaseDocument#provider) + +#### Defined in + +[src/payment/BaseDocument.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L31) + +## Methods + +### getPreciseAmount + +▸ **getPreciseAmount**(): `Decimal` + +#### Returns + +`Decimal` + +#### Defined in + +[src/payment/invoice.ts:41](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/invoice.ts#L41) + +___ + +### isSameAs + +▸ **isSameAs**(`invoice`): `boolean` + +Compares two invoices together and tells if they are the same thing + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `invoice` | [`Invoice`](payment_invoice.Invoice) | + +#### Returns + +`boolean` + +#### Defined in + +[src/payment/invoice.ts:48](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/invoice.ts#L48) + +___ + +### getStatus + +▸ **getStatus**(): ``"ISSUED"`` \| ``"RECEIVED"`` \| ``"ACCEPTED"`` \| ``"REJECTED"`` \| ``"FAILED"`` \| ``"SETTLED"`` \| ``"CANCELLED"`` + +Tells what's the current status of the document + +#### Returns + +``"ISSUED"`` \| ``"RECEIVED"`` \| ``"ACCEPTED"`` \| ``"REJECTED"`` \| ``"FAILED"`` \| ``"SETTLED"`` \| ``"CANCELLED"`` + +#### Inherited from + +[BaseDocument](payment_BaseDocument.BaseDocument).[getStatus](payment_BaseDocument.BaseDocument#getstatus) + +#### Defined in + +[src/payment/BaseDocument.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L45) diff --git a/src/pages/docs/golem-js/reference/classes/payment_payment_module.PaymentModuleImpl.md b/src/pages/docs/golem-js/reference/classes/payment_payment_module.PaymentModuleImpl.md new file mode 100644 index 000000000..5612b0042 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/payment_payment_module.PaymentModuleImpl.md @@ -0,0 +1,375 @@ +--- +title: "Class PaymentModuleImpl" +pageTitle: "Class PaymentModuleImpl - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class PaymentModuleImpl within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: PaymentModuleImpl + +[payment/payment.module](../modules/payment_payment_module).PaymentModuleImpl + +## Implements + +- [`PaymentModule`](../interfaces/payment_payment_module.PaymentModule) + +## Table of contents + +### Constructors + +- [constructor](payment_payment_module.PaymentModuleImpl#constructor) + +### Properties + +- [events](payment_payment_module.PaymentModuleImpl#events) + +### Methods + +- [getPayerDetails](payment_payment_module.PaymentModuleImpl#getpayerdetails) +- [observeDebitNotes](payment_payment_module.PaymentModuleImpl#observedebitnotes) +- [observeInvoices](payment_payment_module.PaymentModuleImpl#observeinvoices) +- [createAllocation](payment_payment_module.PaymentModuleImpl#createallocation) +- [releaseAllocation](payment_payment_module.PaymentModuleImpl#releaseallocation) +- [getAllocation](payment_payment_module.PaymentModuleImpl#getallocation) +- [amendAllocation](payment_payment_module.PaymentModuleImpl#amendallocation) +- [acceptInvoice](payment_payment_module.PaymentModuleImpl#acceptinvoice) +- [rejectInvoice](payment_payment_module.PaymentModuleImpl#rejectinvoice) +- [acceptDebitNote](payment_payment_module.PaymentModuleImpl#acceptdebitnote) +- [rejectDebitNote](payment_payment_module.PaymentModuleImpl#rejectdebitnote) +- [createInvoiceProcessor](payment_payment_module.PaymentModuleImpl#createinvoiceprocessor) +- [createAgreementPaymentProcess](payment_payment_module.PaymentModuleImpl#createagreementpaymentprocess) + +## Constructors + +### constructor + +• **new PaymentModuleImpl**(`deps`, `options?`): [`PaymentModuleImpl`](payment_payment_module.PaymentModuleImpl) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `deps` | [`GolemServices`](../modules/golem_network_golem_network#golemservices) | +| `options?` | [`PaymentModuleOptions`](../interfaces/payment_payment_module.PaymentModuleOptions) | + +#### Returns + +[`PaymentModuleImpl`](payment_payment_module.PaymentModuleImpl) + +#### Defined in + +[src/payment/payment.module.ts:97](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L97) + +## Properties + +### events + +• **events**: `EventEmitter`\<[`PaymentEvents`](../modules/payment_api#paymentevents), `any`\> + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[events](../interfaces/payment_payment_module.PaymentModule#events) + +#### Defined in + +[src/payment/payment.module.ts:83](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L83) + +## Methods + +### getPayerDetails + +▸ **getPayerDetails**(): `Promise`\<[`PayerDetails`](payment_PayerDetails.PayerDetails)\> + +Get the payment platform and wallet address of the payer. + +#### Returns + +`Promise`\<[`PayerDetails`](payment_PayerDetails.PayerDetails)\> + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[getPayerDetails](../interfaces/payment_payment_module.PaymentModule#getpayerdetails) + +#### Defined in + +[src/payment/payment.module.ts:125](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L125) + +___ + +### observeDebitNotes + +▸ **observeDebitNotes**(): `Observable`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Returns + +`Observable`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[observeDebitNotes](../interfaces/payment_payment_module.PaymentModule#observedebitnotes) + +#### Defined in + +[src/payment/payment.module.ts:131](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L131) + +___ + +### observeInvoices + +▸ **observeInvoices**(): `Observable`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Returns + +`Observable`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[observeInvoices](../interfaces/payment_payment_module.PaymentModule#observeinvoices) + +#### Defined in + +[src/payment/payment.module.ts:135](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L135) + +___ + +### createAllocation + +▸ **createAllocation**(`params`): `Promise`\<[`Allocation`](payment_allocation.Allocation)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`CreateAllocationParams`](../modules/payment_api#createallocationparams) | + +#### Returns + +`Promise`\<[`Allocation`](payment_allocation.Allocation)\> + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[createAllocation](../interfaces/payment_payment_module.PaymentModule#createallocation) + +#### Defined in + +[src/payment/payment.module.ts:139](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L139) + +___ + +### releaseAllocation + +▸ **releaseAllocation**(`allocation`): `Promise`\<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `allocation` | [`Allocation`](payment_allocation.Allocation) | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[releaseAllocation](../interfaces/payment_payment_module.PaymentModule#releaseallocation) + +#### Defined in + +[src/payment/payment.module.ts:155](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L155) + +___ + +### getAllocation + +▸ **getAllocation**(`id`): `Promise`\<[`Allocation`](payment_allocation.Allocation)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Allocation`](payment_allocation.Allocation)\> + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[getAllocation](../interfaces/payment_payment_module.PaymentModule#getallocation) + +#### Defined in + +[src/payment/payment.module.ts:177](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L177) + +___ + +### amendAllocation + +▸ **amendAllocation**(`allocation`, `_newOpts`): `Promise`\<[`Allocation`](payment_allocation.Allocation)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `allocation` | [`Allocation`](payment_allocation.Allocation) | +| `_newOpts` | [`CreateAllocationParams`](../modules/payment_api#createallocationparams) | + +#### Returns + +`Promise`\<[`Allocation`](payment_allocation.Allocation)\> + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[amendAllocation](../interfaces/payment_payment_module.PaymentModule#amendallocation) + +#### Defined in + +[src/payment/payment.module.ts:183](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L183) + +___ + +### acceptInvoice + +▸ **acceptInvoice**(`invoice`, `allocation`, `amount`): `Promise`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `invoice` | [`Invoice`](payment_invoice.Invoice) | +| `allocation` | [`Allocation`](payment_allocation.Allocation) | +| `amount` | `string` | + +#### Returns + +`Promise`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[acceptInvoice](../interfaces/payment_payment_module.PaymentModule#acceptinvoice) + +#### Defined in + +[src/payment/payment.module.ts:188](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L188) + +___ + +### rejectInvoice + +▸ **rejectInvoice**(`invoice`, `reason`): `Promise`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `invoice` | [`Invoice`](payment_invoice.Invoice) | +| `reason` | `string` | + +#### Returns + +`Promise`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[rejectInvoice](../interfaces/payment_payment_module.PaymentModule#rejectinvoice) + +#### Defined in + +[src/payment/payment.module.ts:200](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L200) + +___ + +### acceptDebitNote + +▸ **acceptDebitNote**(`debitNote`, `allocation`, `amount`): `Promise`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `debitNote` | [`DebitNote`](payment_debit_note.DebitNote) | +| `allocation` | [`Allocation`](payment_allocation.Allocation) | +| `amount` | `string` | + +#### Returns + +`Promise`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[acceptDebitNote](../interfaces/payment_payment_module.PaymentModule#acceptdebitnote) + +#### Defined in + +[src/payment/payment.module.ts:212](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L212) + +___ + +### rejectDebitNote + +▸ **rejectDebitNote**(`debitNote`, `reason`): `Promise`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `debitNote` | [`DebitNote`](payment_debit_note.DebitNote) | +| `reason` | `string` | + +#### Returns + +`Promise`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[rejectDebitNote](../interfaces/payment_payment_module.PaymentModule#rejectdebitnote) + +#### Defined in + +[src/payment/payment.module.ts:224](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L224) + +___ + +### createInvoiceProcessor + +▸ **createInvoiceProcessor**(): [`InvoiceProcessor`](payment_InvoiceProcessor.InvoiceProcessor) + +Creates an instance of utility class InvoiceProcessor that deals with invoice related use-cases + +#### Returns + +[`InvoiceProcessor`](payment_InvoiceProcessor.InvoiceProcessor) + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[createInvoiceProcessor](../interfaces/payment_payment_module.PaymentModule#createinvoiceprocessor) + +#### Defined in + +[src/payment/payment.module.ts:245](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L245) + +___ + +### createAgreementPaymentProcess + +▸ **createAgreementPaymentProcess**(`agreement`, `allocation`, `options?`): [`AgreementPaymentProcess`](payment_agreement_payment_process.AgreementPaymentProcess) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](market_agreement_agreement.Agreement) | +| `allocation` | [`Allocation`](payment_allocation.Allocation) | +| `options?` | `Partial`\<[`PaymentProcessOptions`](../interfaces/payment_agreement_payment_process.PaymentProcessOptions)\> | + +#### Returns + +[`AgreementPaymentProcess`](payment_agreement_payment_process.AgreementPaymentProcess) + +#### Implementation of + +[PaymentModule](../interfaces/payment_payment_module.PaymentModule).[createAgreementPaymentProcess](../interfaces/payment_payment_module.PaymentModule#createagreementpaymentprocess) + +#### Defined in + +[src/payment/payment.module.ts:249](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L249) diff --git a/src/pages/docs/golem-js/reference/classes/payment_payments.Payments.md b/src/pages/docs/golem-js/reference/classes/payment_payments.Payments.md deleted file mode 100644 index 844e1ac4b..000000000 --- a/src/pages/docs/golem-js/reference/classes/payment_payments.Payments.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: "Class Payments" -pageTitle: "Class Payments - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class Payments within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: Payments - -[payment/payments](../modules/payment_payments).Payments - -## Hierarchy - -- `EventTarget` - - ↳ **`Payments`** - -## Table of contents - -### Constructors - -- [constructor](payment_payments.Payments#constructor) - -### Methods - -- [create](payment_payments.Payments#create) -- [unsubscribe](payment_payments.Payments#unsubscribe) - -## Constructors - -### constructor - -• **new Payments**(`yagnaApi`, `options?`): [`Payments`](payment_payments.Payments) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `yagnaApi` | [`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi) | -| `options?` | [`PaymentOptions`](../interfaces/payment_payments.PaymentOptions) | - -#### Returns - -[`Payments`](payment_payments.Payments) - -#### Overrides - -EventTarget.constructor - -#### Defined in - -[src/payment/payments.ts:28](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/payments.ts#L28) - -## Methods - -### create - -▸ **create**(`yagnaApi`, `options?`): `Promise`\<[`Payments`](payment_payments.Payments)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `yagnaApi` | [`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi) | -| `options?` | [`PaymentOptions`](../interfaces/payment_payments.PaymentOptions) | - -#### Returns - -`Promise`\<[`Payments`](payment_payments.Payments)\> - -#### Defined in - -[src/payment/payments.ts:24](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/payments.ts#L24) - -___ - -### unsubscribe - -▸ **unsubscribe**(): `Promise`\<`unknown`\> - -Unsubscribe from collecting payment events. -An error will be thrown when the unsubscribe timeout expires. - -#### Returns - -`Promise`\<`unknown`\> - -#### Defined in - -[src/payment/payments.ts:42](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/payments.ts#L42) diff --git a/src/pages/docs/golem-js/reference/classes/resource_rental_rental_module.RentalModuleImpl.md b/src/pages/docs/golem-js/reference/classes/resource_rental_rental_module.RentalModuleImpl.md new file mode 100644 index 000000000..624cdb8d8 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/resource_rental_rental_module.RentalModuleImpl.md @@ -0,0 +1,107 @@ +--- +title: "Class RentalModuleImpl" +pageTitle: "Class RentalModuleImpl - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class RentalModuleImpl within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: RentalModuleImpl + +[resource-rental/rental.module](../modules/resource_rental_rental_module).RentalModuleImpl + +## Implements + +- [`RentalModule`](../interfaces/resource_rental_rental_module.RentalModule) + +## Table of contents + +### Constructors + +- [constructor](resource_rental_rental_module.RentalModuleImpl#constructor) + +### Methods + +- [createResourceRental](resource_rental_rental_module.RentalModuleImpl#createresourcerental) +- [createResourceRentalPool](resource_rental_rental_module.RentalModuleImpl#createresourcerentalpool) + +## Constructors + +### constructor + +• **new RentalModuleImpl**(`deps`): [`RentalModuleImpl`](resource_rental_rental_module.RentalModuleImpl) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `deps` | `Object` | +| `deps.marketModule` | [`MarketModule`](../interfaces/market_market_module.MarketModule) | +| `deps.paymentModule` | [`PaymentModule`](../interfaces/payment_payment_module.PaymentModule) | +| `deps.activityModule` | [`ActivityModule`](../interfaces/activity_activity_module.ActivityModule) | +| `deps.networkModule` | [`NetworkModule`](../interfaces/network_network_module.NetworkModule) | +| `deps.storageProvider` | [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) | +| `deps.logger` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | + +#### Returns + +[`RentalModuleImpl`](resource_rental_rental_module.RentalModuleImpl) + +#### Defined in + +[src/resource-rental/rental.module.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/rental.module.ts#L28) + +## Methods + +### createResourceRental + +▸ **createResourceRental**(`agreement`, `allocation`, `options?`): [`ResourceRental`](resource_rental_resource_rental.ResourceRental) + +Factory that creates a new resource rental that's fully configured. +This method will also create the payment process for the agreement. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](market_agreement_agreement.Agreement) | +| `allocation` | [`Allocation`](payment_allocation.Allocation) | +| `options?` | [`ResourceRentalOptions`](../interfaces/resource_rental_resource_rental.ResourceRentalOptions) | + +#### Returns + +[`ResourceRental`](resource_rental_resource_rental.ResourceRental) + +#### Implementation of + +[RentalModule](../interfaces/resource_rental_rental_module.RentalModule).[createResourceRental](../interfaces/resource_rental_rental_module.RentalModule#createresourcerental) + +#### Defined in + +[src/resource-rental/rental.module.ts:39](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/rental.module.ts#L39) + +___ + +### createResourceRentalPool + +▸ **createResourceRentalPool**(`draftPool`, `allocation`, `options?`): [`ResourceRentalPool`](resource_rental_resource_rental_pool.ResourceRentalPool) + +Factory that creates new resource rental pool that's fully configured + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `draftPool` | [`DraftOfferProposalPool`](market_draft_offer_proposal_pool.DraftOfferProposalPool) | +| `allocation` | [`Allocation`](payment_allocation.Allocation) | +| `options?` | [`ResourceRentalPoolOptions`](../interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolOptions) | + +#### Returns + +[`ResourceRentalPool`](resource_rental_resource_rental_pool.ResourceRentalPool) + +#### Implementation of + +[RentalModule](../interfaces/resource_rental_rental_module.RentalModule).[createResourceRentalPool](../interfaces/resource_rental_rental_module.RentalModule#createresourcerentalpool) + +#### Defined in + +[src/resource-rental/rental.module.ts:57](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/rental.module.ts#L57) diff --git a/src/pages/docs/golem-js/reference/classes/resource_rental_resource_rental.ResourceRental.md b/src/pages/docs/golem-js/reference/classes/resource_rental_resource_rental.ResourceRental.md new file mode 100644 index 000000000..eff2751d0 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/resource_rental_resource_rental.ResourceRental.md @@ -0,0 +1,163 @@ +--- +title: "Class ResourceRental" +pageTitle: "Class ResourceRental - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class ResourceRental within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: ResourceRental + +[resource-rental/resource-rental](../modules/resource_rental_resource_rental).ResourceRental + +Combines an agreement, activity, exe unit and payment process into a single high-level abstraction. + +## Table of contents + +### Constructors + +- [constructor](resource_rental_resource_rental.ResourceRental#constructor) + +### Properties + +- [events](resource_rental_resource_rental.ResourceRental#events) +- [networkNode](resource_rental_resource_rental.ResourceRental#networknode) +- [agreement](resource_rental_resource_rental.ResourceRental#agreement) + +### Methods + +- [stopAndFinalize](resource_rental_resource_rental.ResourceRental#stopandfinalize) +- [hasActivity](resource_rental_resource_rental.ResourceRental#hasactivity) +- [getExeUnit](resource_rental_resource_rental.ResourceRental#getexeunit) +- [destroyExeUnit](resource_rental_resource_rental.ResourceRental#destroyexeunit) +- [fetchAgreementState](resource_rental_resource_rental.ResourceRental#fetchagreementstate) + +## Constructors + +### constructor + +• **new ResourceRental**(`agreement`, `storageProvider`, `paymentProcess`, `marketModule`, `activityModule`, `logger`, `resourceRentalOptions?`): [`ResourceRental`](resource_rental_resource_rental.ResourceRental) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](market_agreement_agreement.Agreement) | +| `storageProvider` | [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) | +| `paymentProcess` | [`AgreementPaymentProcess`](payment_agreement_payment_process.AgreementPaymentProcess) | +| `marketModule` | [`MarketModule`](../interfaces/market_market_module.MarketModule) | +| `activityModule` | [`ActivityModule`](../interfaces/activity_activity_module.ActivityModule) | +| `logger` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | +| `resourceRentalOptions?` | [`ResourceRentalOptions`](../interfaces/resource_rental_resource_rental.ResourceRentalOptions) | + +#### Returns + +[`ResourceRental`](resource_rental_resource_rental.ResourceRental) + +#### Defined in + +[src/resource-rental/resource-rental.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L38) + +## Properties + +### events + +• `Readonly` **events**: `EventEmitter`\<[`ResourceRentalEvents`](../interfaces/resource_rental_resource_rental.ResourceRentalEvents), `any`\> + +#### Defined in + +[src/resource-rental/resource-rental.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L31) + +___ + +### networkNode + +• `Optional` `Readonly` **networkNode**: [`NetworkNode`](network_node.NetworkNode) + +#### Defined in + +[src/resource-rental/resource-rental.ts:32](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L32) + +___ + +### agreement + +• `Readonly` **agreement**: [`Agreement`](market_agreement_agreement.Agreement) + +#### Defined in + +[src/resource-rental/resource-rental.ts:39](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L39) + +## Methods + +### stopAndFinalize + +▸ **stopAndFinalize**(): `Promise`\<`void`\> + +Terminates the activity and agreement (stopping any ongoing work) and finalizes the payment process. +Resolves when the rental will be fully terminated and all pending business operations finalized. +If the rental is already finalized, it will resolve immediately. + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/resource-rental/resource-rental.ts:57](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L57) + +___ + +### hasActivity + +▸ **hasActivity**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[src/resource-rental/resource-rental.ts:90](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L90) + +___ + +### getExeUnit + +▸ **getExeUnit**(): `Promise`\<[`ExeUnit`](activity_exe_unit_exe_unit.ExeUnit)\> + +Creates an activity on the Provider, and returns a exe-unit that can be used to operate within the activity + +#### Returns + +`Promise`\<[`ExeUnit`](activity_exe_unit_exe_unit.ExeUnit)\> + +#### Defined in + +[src/resource-rental/resource-rental.ts:97](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L97) + +___ + +### destroyExeUnit + +▸ **destroyExeUnit**(): `Promise`\<`void`\> + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/resource-rental/resource-rental.ts:117](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L117) + +___ + +### fetchAgreementState + +▸ **fetchAgreementState**(): `Promise`\<``"Proposal"`` \| ``"Pending"`` \| ``"Cancelled"`` \| ``"Rejected"`` \| ``"Approved"`` \| ``"Expired"`` \| ``"Terminated"``\> + +#### Returns + +`Promise`\<``"Proposal"`` \| ``"Pending"`` \| ``"Cancelled"`` \| ``"Rejected"`` \| ``"Approved"`` \| ``"Expired"`` \| ``"Terminated"``\> + +#### Defined in + +[src/resource-rental/resource-rental.ts:126](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L126) diff --git a/src/pages/docs/golem-js/reference/classes/resource_rental_resource_rental_pool.ResourceRentalPool.md b/src/pages/docs/golem-js/reference/classes/resource_rental_resource_rental_pool.ResourceRentalPool.md new file mode 100644 index 000000000..f33dfec7d --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/resource_rental_resource_rental_pool.ResourceRentalPool.md @@ -0,0 +1,287 @@ +--- +title: "Class ResourceRentalPool" +pageTitle: "Class ResourceRentalPool - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class ResourceRentalPool within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: ResourceRentalPool + +[resource-rental/resource-rental-pool](../modules/resource_rental_resource_rental_pool).ResourceRentalPool + +Pool of resource rentals that can be borrowed, released or destroyed. + +## Table of contents + +### Constructors + +- [constructor](resource_rental_resource_rental_pool.ResourceRentalPool#constructor) + +### Properties + +- [events](resource_rental_resource_rental_pool.ResourceRentalPool#events) + +### Methods + +- [acquire](resource_rental_resource_rental_pool.ResourceRentalPool#acquire) +- [release](resource_rental_resource_rental_pool.ResourceRentalPool#release) +- [destroy](resource_rental_resource_rental_pool.ResourceRentalPool#destroy) +- [drainAndClear](resource_rental_resource_rental_pool.ResourceRentalPool#drainandclear) +- [getSize](resource_rental_resource_rental_pool.ResourceRentalPool#getsize) +- [getAvailableSize](resource_rental_resource_rental_pool.ResourceRentalPool#getavailablesize) +- [getBorrowedSize](resource_rental_resource_rental_pool.ResourceRentalPool#getborrowedsize) +- [ready](resource_rental_resource_rental_pool.ResourceRentalPool#ready) +- [withRental](resource_rental_resource_rental_pool.ResourceRentalPool#withrental) + +## Constructors + +### constructor + +• **new ResourceRentalPool**(`options`): [`ResourceRentalPool`](resource_rental_resource_rental_pool.ResourceRentalPool) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options` | [`ResourceRentalPoolOptions`](../interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolOptions) & [`ResourceRentalPoolDependencies`](../interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolDependencies) | + +#### Returns + +[`ResourceRentalPool`](resource_rental_resource_rental_pool.ResourceRentalPool) + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:81](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L81) + +## Properties + +### events + +• `Readonly` **events**: `EventEmitter`\<[`ResourceRentalPoolEvents`](../interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolEvents), `any`\> + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:47](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L47) + +## Methods + +### acquire + +▸ **acquire**(`signalOrTimeout?`): `Promise`\<[`ResourceRental`](resource_rental_resource_rental.ResourceRental)\> + +Borrow a resource rental from the pool. +If there is no valid resource rental a new one will be created. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `signalOrTimeout?` | `number` \| `AbortSignal` | the timeout in milliseconds or an AbortSignal that will be used to cancel the rental request | + +#### Returns + +`Promise`\<[`ResourceRental`](resource_rental_resource_rental.ResourceRental)\> + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:196](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L196) + +___ + +### release + +▸ **release**(`resourceRental`): `Promise`\<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `resourceRental` | [`ResourceRental`](resource_rental_resource_rental.ResourceRental) | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:229](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L229) + +___ + +### destroy + +▸ **destroy**(`resourceRental`): `Promise`\<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `resourceRental` | [`ResourceRental`](resource_rental_resource_rental.ResourceRental) | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:242](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L242) + +___ + +### drainAndClear + +▸ **drainAndClear**(): `Promise`\<`void`\> + +Sets the pool into draining mode and then clears it + +When set to drain mode, no new acquires will be possible. At the same time, all agreements in the pool will be terminated with the Providers. + +#### Returns + +`Promise`\<`void`\> + +Resolves when all agreements are terminated + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:268](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L268) + +___ + +### getSize + +▸ **getSize**(): `number` + +Total size (available + borrowed) + +#### Returns + +`number` + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:286](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L286) + +___ + +### getAvailableSize + +▸ **getAvailableSize**(): `number` + +Available size (how many resource rental are ready to be borrowed) + +#### Returns + +`number` + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:293](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L293) + +___ + +### getBorrowedSize + +▸ **getBorrowedSize**(): `number` + +Borrowed size (how many resource rental are currently out of the pool) + +#### Returns + +`number` + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:300](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L300) + +___ + +### ready + +▸ **ready**(`timeoutMs?`): `Promise`\<`void`\> + +Wait till the pool is ready to use (min number of items in pool are usable). +If an error occurs while creating new resource rentals, it will be retried until the pool is ready +(potentially indefinitely). To stop this process if it fails to reach the desired state in a given time, +you can pass either a timeout in milliseconds or an AbortSignal. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `timeoutMs?` | `number` | + +#### Returns + +`Promise`\<`void`\> + +**`Example`** + +```typescript +await pool.ready(10_000); // If the pool is not ready in 10 seconds, an error will be thrown +``` + +**`Example`** + +```typescript +await pool.ready(AbortSignal.timeout(10_000)); // If the pool is not ready in 10 seconds, an error will be thrown +``` + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:319](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L319) + +▸ **ready**(`abortSignal?`): `Promise`\<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `abortSignal?` | `AbortSignal` | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:320](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L320) + +___ + +### withRental + +▸ **withRental**\<`T`\>(`callback`, `signalOrTimeout?`): `Promise`\<`T`\> + +Acquire a resource rental from the pool and release it after the callback is done + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `callback` | (`rental`: [`ResourceRental`](resource_rental_resource_rental.ResourceRental)) => `Promise`\<`T`\> | a function that takes a `rental` object as its argument. The renatl is automatically released after the callback is executed, regardless of whether it completes successfully or throws an error. | +| `signalOrTimeout?` | `number` \| `AbortSignal` | the timeout in milliseconds or an AbortSignal that will be used to cancel the rental request | + +#### Returns + +`Promise`\<`T`\> + +**`Example`** + +```typescript +const result = await pool.withRental(async (rental) => { + // Do something with the rented resources + return result; + // pool.release(rental) is called automatically + // even if an error is thrown in the callback +}); +``` + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:375](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L375) diff --git a/src/pages/docs/golem-js/reference/classes/script_command.DownloadData.md b/src/pages/docs/golem-js/reference/classes/script_command.DownloadData.md deleted file mode 100644 index cfd5cceaa..000000000 --- a/src/pages/docs/golem-js/reference/classes/script_command.DownloadData.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -title: "Class DownloadData" -pageTitle: "Class DownloadData - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class DownloadData within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: DownloadData - -[script/command](../modules/script_command).DownloadData - -## Hierarchy - -- `Transfer`\<`Uint8Array`\> - - ↳ **`DownloadData`** - -## Table of contents - -### Constructors - -- [constructor](script_command.DownloadData#constructor) - -### Properties - -- [from](script_command.DownloadData#from) -- [to](script_command.DownloadData#to) -- [args](script_command.DownloadData#args) - -### Methods - -- [before](script_command.DownloadData#before) -- [after](script_command.DownloadData#after) -- [toJson](script_command.DownloadData#tojson) -- [toExeScriptRequest](script_command.DownloadData#toexescriptrequest) - -## Constructors - -### constructor - -• **new DownloadData**(`storageProvider`, `srcPath`): [`DownloadData`](script_command.DownloadData) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `storageProvider` | [`StorageProvider`](../interfaces/storage_provider.StorageProvider) | -| `srcPath` | `string` | - -#### Returns - -[`DownloadData`](script_command.DownloadData) - -#### Overrides - -Transfer\<Uint8Array\>.constructor - -#### Defined in - -[src/script/command.ts:199](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L199) - -## Properties - -### from - -• `Protected` `Optional` **from**: `string` - -#### Inherited from - -Transfer.from - -#### Defined in - -[src/script/command.ts:116](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L116) - -___ - -### to - -• `Protected` `Optional` **to**: `string` - -#### Inherited from - -Transfer.to - -#### Defined in - -[src/script/command.ts:117](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L117) - -___ - -### args - -• `Protected` **args**: `Record`\<`string`, `unknown`\> - -#### Inherited from - -Transfer.args - -#### Defined in - -[src/script/command.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L16) - -## Methods - -### before - -▸ **before**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> - -#### Overrides - -Transfer.before - -#### Defined in - -[src/script/command.ts:207](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L207) - -___ - -### after - -▸ **after**(`result`): `Promise`\<[`Result`](activity_results.Result)\<`Uint8Array`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `result` | [`Result`](activity_results.Result)\<`any`\> | - -#### Returns - -`Promise`\<[`Result`](activity_results.Result)\<`Uint8Array`\>\> - -#### Overrides - -Transfer.after - -#### Defined in - -[src/script/command.ts:214](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L214) - -___ - -### toJson - -▸ **toJson**(): `Object` - -#### Returns - -`Object` - -#### Inherited from - -Transfer.toJson - -#### Defined in - -[src/script/command.ts:25](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L25) - -___ - -### toExeScriptRequest - -▸ **toExeScriptRequest**(): `ExeScriptRequest` - -#### Returns - -`ExeScriptRequest` - -#### Inherited from - -Transfer.toExeScriptRequest - -#### Defined in - -[src/script/command.ts:31](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L31) diff --git a/src/pages/docs/golem-js/reference/classes/script_command.Terminate.md b/src/pages/docs/golem-js/reference/classes/script_command.Terminate.md deleted file mode 100644 index e4e16e6b9..000000000 --- a/src/pages/docs/golem-js/reference/classes/script_command.Terminate.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -title: "Class Terminate" -pageTitle: "Class Terminate - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class Terminate within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: Terminate - -[script/command](../modules/script_command).Terminate - -## Hierarchy - -- `Command` - - ↳ **`Terminate`** - -## Table of contents - -### Constructors - -- [constructor](script_command.Terminate#constructor) - -### Properties - -- [args](script_command.Terminate#args) - -### Methods - -- [toJson](script_command.Terminate#tojson) -- [toExeScriptRequest](script_command.Terminate#toexescriptrequest) -- [before](script_command.Terminate#before) -- [after](script_command.Terminate#after) - -## Constructors - -### constructor - -• **new Terminate**(`args?`): [`Terminate`](script_command.Terminate) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `args?` | `Record`\<`string`, `unknown`\> | - -#### Returns - -[`Terminate`](script_command.Terminate) - -#### Overrides - -Command.constructor - -#### Defined in - -[src/script/command.ts:106](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L106) - -## Properties - -### args - -• `Protected` **args**: `Record`\<`string`, `unknown`\> - -#### Inherited from - -Command.args - -#### Defined in - -[src/script/command.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L16) - -## Methods - -### toJson - -▸ **toJson**(): `Object` - -#### Returns - -`Object` - -#### Inherited from - -Command.toJson - -#### Defined in - -[src/script/command.ts:25](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L25) - -___ - -### toExeScriptRequest - -▸ **toExeScriptRequest**(): `ExeScriptRequest` - -#### Returns - -`ExeScriptRequest` - -#### Inherited from - -Command.toExeScriptRequest - -#### Defined in - -[src/script/command.ts:31](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L31) - -___ - -### before - -▸ **before**(): `Promise`\<`void`\> - -Setup local environment for executing this command. - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -Command.before - -#### Defined in - -[src/script/command.ts:38](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L38) - -___ - -### after - -▸ **after**(`result?`): `Promise`\<[`Result`](activity_results.Result)\<`unknown`\>\> - -Cleanup local setup that was needed for the command to run. - -It is called after the command was sent to the activity, and the command was processed. - -When run within scripts or batch commands, after() might be called without any results, as one of the previous -commands might have failed. In this case, the command should still cleanup its local setup and return an empty -error result. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `result?` | [`Result`](activity_results.Result)\<`unknown`\> | - -#### Returns - -`Promise`\<[`Result`](activity_results.Result)\<`unknown`\>\> - -#### Inherited from - -Command.after - -#### Defined in - -[src/script/command.ts:53](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L53) diff --git a/src/pages/docs/golem-js/reference/classes/script_command.UploadData.md b/src/pages/docs/golem-js/reference/classes/script_command.UploadData.md deleted file mode 100644 index 7d385b008..000000000 --- a/src/pages/docs/golem-js/reference/classes/script_command.UploadData.md +++ /dev/null @@ -1,180 +0,0 @@ ---- -title: "Class UploadData" -pageTitle: "Class UploadData - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class UploadData within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: UploadData - -[script/command](../modules/script_command).UploadData - -## Hierarchy - -- `Transfer` - - ↳ **`UploadData`** - -## Table of contents - -### Constructors - -- [constructor](script_command.UploadData#constructor) - -### Properties - -- [from](script_command.UploadData#from) -- [to](script_command.UploadData#to) -- [args](script_command.UploadData#args) - -### Methods - -- [before](script_command.UploadData#before) -- [after](script_command.UploadData#after) -- [toJson](script_command.UploadData#tojson) -- [toExeScriptRequest](script_command.UploadData#toexescriptrequest) - -## Constructors - -### constructor - -• **new UploadData**(`storageProvider`, `src`, `dstPath`): [`UploadData`](script_command.UploadData) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `storageProvider` | [`StorageProvider`](../interfaces/storage_provider.StorageProvider) | -| `src` | `Uint8Array` | -| `dstPath` | `string` | - -#### Returns - -[`UploadData`](script_command.UploadData) - -#### Overrides - -Transfer.constructor - -#### Defined in - -[src/script/command.ts:151](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L151) - -## Properties - -### from - -• `Protected` `Optional` **from**: `string` - -#### Inherited from - -Transfer.from - -#### Defined in - -[src/script/command.ts:116](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L116) - -___ - -### to - -• `Protected` `Optional` **to**: `string` - -#### Inherited from - -Transfer.to - -#### Defined in - -[src/script/command.ts:117](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L117) - -___ - -### args - -• `Protected` **args**: `Record`\<`string`, `unknown`\> - -#### Inherited from - -Transfer.args - -#### Defined in - -[src/script/command.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L16) - -## Methods - -### before - -▸ **before**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> - -#### Overrides - -Transfer.before - -#### Defined in - -[src/script/command.ts:160](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L160) - -___ - -### after - -▸ **after**(`result`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `result` | [`Result`](activity_results.Result)\<`any`\> | - -#### Returns - -`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Overrides - -Transfer.after - -#### Defined in - -[src/script/command.ts:164](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L164) - -___ - -### toJson - -▸ **toJson**(): `Object` - -#### Returns - -`Object` - -#### Inherited from - -Transfer.toJson - -#### Defined in - -[src/script/command.ts:25](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L25) - -___ - -### toExeScriptRequest - -▸ **toExeScriptRequest**(): `ExeScriptRequest` - -#### Returns - -`ExeScriptRequest` - -#### Inherited from - -Transfer.toExeScriptRequest - -#### Defined in - -[src/script/command.ts:31](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L31) diff --git a/src/pages/docs/golem-js/reference/classes/shared_cache_CacheService.CacheService.md b/src/pages/docs/golem-js/reference/classes/shared_cache_CacheService.CacheService.md new file mode 100644 index 000000000..227adb329 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_cache_CacheService.CacheService.md @@ -0,0 +1,155 @@ +--- +title: "Class CacheService" +pageTitle: "Class CacheService - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class CacheService within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: CacheService\ + +[shared/cache/CacheService](../modules/shared_cache_CacheService).CacheService + +## Type parameters + +| Name | +| :------ | +| `T` | + +## Table of contents + +### Constructors + +- [constructor](shared_cache_CacheService.CacheService#constructor) + +### Methods + +- [set](shared_cache_CacheService.CacheService#set) +- [get](shared_cache_CacheService.CacheService#get) +- [delete](shared_cache_CacheService.CacheService#delete) +- [has](shared_cache_CacheService.CacheService#has) +- [getAll](shared_cache_CacheService.CacheService#getall) +- [flushAll](shared_cache_CacheService.CacheService#flushall) + +## Constructors + +### constructor + +• **new CacheService**\<`T`\>(): [`CacheService`](shared_cache_CacheService.CacheService)\<`T`\> + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Returns + +[`CacheService`](shared_cache_CacheService.CacheService)\<`T`\> + +## Methods + +### set + +▸ **set**(`key`, `value`): `T` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `key` | `string` | +| `value` | `T` | + +#### Returns + +`T` + +#### Defined in + +[src/shared/cache/CacheService.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/cache/CacheService.ts#L4) + +___ + +### get + +▸ **get**(`key`): `undefined` \| `T` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `key` | `string` | + +#### Returns + +`undefined` \| `T` + +#### Defined in + +[src/shared/cache/CacheService.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/cache/CacheService.ts#L10) + +___ + +### delete + +▸ **delete**(`key`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `key` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +[src/shared/cache/CacheService.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/cache/CacheService.ts#L14) + +___ + +### has + +▸ **has**(`key`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `key` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +[src/shared/cache/CacheService.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/cache/CacheService.ts#L18) + +___ + +### getAll + +▸ **getAll**(): `T`[] + +#### Returns + +`T`[] + +#### Defined in + +[src/shared/cache/CacheService.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/cache/CacheService.ts#L22) + +___ + +### flushAll + +▸ **flushAll**(): `void` + +#### Returns + +`void` + +#### Defined in + +[src/shared/cache/CacheService.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/cache/CacheService.ts#L26) diff --git a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemAbortError.md b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemAbortError.md similarity index 53% rename from src/pages/docs/golem-js/reference/classes/error_golem_error.GolemAbortError.md rename to src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemAbortError.md index bfd727bbb..c649bedaf 100644 --- a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemAbortError.md +++ b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemAbortError.md @@ -6,7 +6,7 @@ type: "JS API Reference" --- # Class: GolemAbortError -[error/golem-error](../modules/error_golem_error).GolemAbortError +[shared/error/golem-error](../modules/shared_error_golem_error).GolemAbortError Represents errors related to the user choosing to abort or stop running activities. @@ -18,7 +18,7 @@ CTRL+C abort error ## Hierarchy -- [`GolemUserError`](error_golem_error.GolemUserError) +- [`GolemUserError`](shared_error_golem_error.GolemUserError) ↳ **`GolemAbortError`** @@ -26,17 +26,17 @@ CTRL+C abort error ### Constructors -- [constructor](error_golem_error.GolemAbortError#constructor) +- [constructor](shared_error_golem_error.GolemAbortError#constructor) ### Properties -- [previous](error_golem_error.GolemAbortError#previous) +- [previous](shared_error_golem_error.GolemAbortError#previous) ## Constructors ### constructor -• **new GolemAbortError**(`message`, `previous?`): [`GolemAbortError`](error_golem_error.GolemAbortError) +• **new GolemAbortError**(`message`, `previous?`): [`GolemAbortError`](shared_error_golem_error.GolemAbortError) #### Parameters @@ -47,15 +47,15 @@ CTRL+C abort error #### Returns -[`GolemAbortError`](error_golem_error.GolemAbortError) +[`GolemAbortError`](shared_error_golem_error.GolemAbortError) #### Inherited from -[GolemUserError](error_golem_error.GolemUserError).[constructor](error_golem_error.GolemUserError#constructor) +[GolemUserError](shared_error_golem_error.GolemUserError).[constructor](shared_error_golem_error.GolemUserError#constructor) #### Defined in -[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5) +[src/shared/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L5) ## Properties @@ -67,8 +67,8 @@ The previous error, if any, that led to this error. #### Inherited from -[GolemUserError](error_golem_error.GolemUserError).[previous](error_golem_error.GolemUserError#previous) +[GolemUserError](shared_error_golem_error.GolemUserError).[previous](shared_error_golem_error.GolemUserError#previous) #### Defined in -[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L10) +[src/shared/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L10) diff --git a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemConfigError.md b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemConfigError.md similarity index 52% rename from src/pages/docs/golem-js/reference/classes/error_golem_error.GolemConfigError.md rename to src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemConfigError.md index 64579c4a7..d75e92006 100644 --- a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemConfigError.md +++ b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemConfigError.md @@ -6,7 +6,7 @@ type: "JS API Reference" --- # Class: GolemConfigError -[error/golem-error](../modules/error_golem_error).GolemConfigError +[shared/error/golem-error](../modules/shared_error_golem_error).GolemConfigError Represents configuration errors. @@ -18,7 +18,7 @@ Api key not defined ## Hierarchy -- [`GolemUserError`](error_golem_error.GolemUserError) +- [`GolemUserError`](shared_error_golem_error.GolemUserError) ↳ **`GolemConfigError`** @@ -26,17 +26,17 @@ Api key not defined ### Constructors -- [constructor](error_golem_error.GolemConfigError#constructor) +- [constructor](shared_error_golem_error.GolemConfigError#constructor) ### Properties -- [previous](error_golem_error.GolemConfigError#previous) +- [previous](shared_error_golem_error.GolemConfigError#previous) ## Constructors ### constructor -• **new GolemConfigError**(`message`, `previous?`): [`GolemConfigError`](error_golem_error.GolemConfigError) +• **new GolemConfigError**(`message`, `previous?`): [`GolemConfigError`](shared_error_golem_error.GolemConfigError) #### Parameters @@ -47,15 +47,15 @@ Api key not defined #### Returns -[`GolemConfigError`](error_golem_error.GolemConfigError) +[`GolemConfigError`](shared_error_golem_error.GolemConfigError) #### Inherited from -[GolemUserError](error_golem_error.GolemUserError).[constructor](error_golem_error.GolemUserError#constructor) +[GolemUserError](shared_error_golem_error.GolemUserError).[constructor](shared_error_golem_error.GolemUserError#constructor) #### Defined in -[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5) +[src/shared/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L5) ## Properties @@ -67,8 +67,8 @@ The previous error, if any, that led to this error. #### Inherited from -[GolemUserError](error_golem_error.GolemUserError).[previous](error_golem_error.GolemUserError#previous) +[GolemUserError](shared_error_golem_error.GolemUserError).[previous](shared_error_golem_error.GolemUserError#previous) #### Defined in -[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L10) +[src/shared/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L10) diff --git a/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemError.md b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemError.md new file mode 100644 index 000000000..84e01eece --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemError.md @@ -0,0 +1,74 @@ +--- +title: "Class GolemError" +pageTitle: "Class GolemError - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class GolemError within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: GolemError + +[shared/error/golem-error](../modules/shared_error_golem_error).GolemError + +Base class for all errors directly thrown by Golem SDK. + +## Hierarchy + +- `Error` + + ↳ **`GolemError`** + + ↳↳ [`GolemUserError`](shared_error_golem_error.GolemUserError) + + ↳↳ [`GolemInternalError`](shared_error_golem_error.GolemInternalError) + + ↳↳ [`GolemPlatformError`](shared_error_golem_error.GolemPlatformError) + + ↳↳ [`GolemTimeoutError`](shared_error_golem_error.GolemTimeoutError) + + ↳↳ [`GolemModuleError`](shared_error_golem_error.GolemModuleError) + +## Table of contents + +### Constructors + +- [constructor](shared_error_golem_error.GolemError#constructor) + +### Properties + +- [previous](shared_error_golem_error.GolemError#previous) + +## Constructors + +### constructor + +• **new GolemError**(`message`, `previous?`): [`GolemError`](shared_error_golem_error.GolemError) + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `message` | `string` | - | +| `previous?` | `Error` | The previous error, if any, that led to this error. | + +#### Returns + +[`GolemError`](shared_error_golem_error.GolemError) + +#### Overrides + +Error.constructor + +#### Defined in + +[src/shared/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L5) + +## Properties + +### previous + +• `Optional` `Readonly` **previous**: `Error` + +The previous error, if any, that led to this error. + +#### Defined in + +[src/shared/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L10) diff --git a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemInternalError.md b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemInternalError.md similarity index 55% rename from src/pages/docs/golem-js/reference/classes/error_golem_error.GolemInternalError.md rename to src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemInternalError.md index cb6d88add..cac38a757 100644 --- a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemInternalError.md +++ b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemInternalError.md @@ -6,7 +6,7 @@ type: "JS API Reference" --- # Class: GolemInternalError -[error/golem-error](../modules/error_golem_error).GolemInternalError +[shared/error/golem-error](../modules/shared_error_golem_error).GolemInternalError Represents errors when the SDK encountered an internal error that wasn't handled correctly. @@ -18,7 +18,7 @@ JSON.parse(undefined) -> Error: Unexpected token u in JSON at position 0 ## Hierarchy -- [`GolemError`](error_golem_error.GolemError) +- [`GolemError`](shared_error_golem_error.GolemError) ↳ **`GolemInternalError`** @@ -26,17 +26,17 @@ JSON.parse(undefined) -> Error: Unexpected token u in JSON at position 0 ### Constructors -- [constructor](error_golem_error.GolemInternalError#constructor) +- [constructor](shared_error_golem_error.GolemInternalError#constructor) ### Properties -- [previous](error_golem_error.GolemInternalError#previous) +- [previous](shared_error_golem_error.GolemInternalError#previous) ## Constructors ### constructor -• **new GolemInternalError**(`message`, `previous?`): [`GolemInternalError`](error_golem_error.GolemInternalError) +• **new GolemInternalError**(`message`, `previous?`): [`GolemInternalError`](shared_error_golem_error.GolemInternalError) #### Parameters @@ -47,15 +47,15 @@ JSON.parse(undefined) -> Error: Unexpected token u in JSON at position 0 #### Returns -[`GolemInternalError`](error_golem_error.GolemInternalError) +[`GolemInternalError`](shared_error_golem_error.GolemInternalError) #### Inherited from -[GolemError](error_golem_error.GolemError).[constructor](error_golem_error.GolemError#constructor) +[GolemError](shared_error_golem_error.GolemError).[constructor](shared_error_golem_error.GolemError#constructor) #### Defined in -[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5) +[src/shared/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L5) ## Properties @@ -67,8 +67,8 @@ The previous error, if any, that led to this error. #### Inherited from -[GolemError](error_golem_error.GolemError).[previous](error_golem_error.GolemError#previous) +[GolemError](shared_error_golem_error.GolemError).[previous](shared_error_golem_error.GolemError#previous) #### Defined in -[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L10) +[src/shared/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L10) diff --git a/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemModuleError.md b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemModuleError.md new file mode 100644 index 000000000..5ff9023a1 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemModuleError.md @@ -0,0 +1,92 @@ +--- +title: "Class GolemModuleError" +pageTitle: "Class GolemModuleError - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class GolemModuleError within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: GolemModuleError + +[shared/error/golem-error](../modules/shared_error_golem_error).GolemModuleError + +Module specific errors - Market, Work, Payment. +Each of the major modules will have its own domain specific root error type, +additionally containing an error code specific to a given subdomain + +## Hierarchy + +- [`GolemError`](shared_error_golem_error.GolemError) + + ↳ **`GolemModuleError`** + + ↳↳ [`GolemWorkError`](activity_exe_unit_error.GolemWorkError) + + ↳↳ [`GolemReputationError`](experimental_reputation_error.GolemReputationError) + + ↳↳ [`GolemMarketError`](market_error.GolemMarketError) + + ↳↳ [`GolemNetworkError`](network_error.GolemNetworkError) + + ↳↳ [`GolemPaymentError`](payment_error.GolemPaymentError) + +## Table of contents + +### Constructors + +- [constructor](shared_error_golem_error.GolemModuleError#constructor) + +### Properties + +- [code](shared_error_golem_error.GolemModuleError#code) +- [previous](shared_error_golem_error.GolemModuleError#previous) + +## Constructors + +### constructor + +• **new GolemModuleError**(`message`, `code`, `previous?`): [`GolemModuleError`](shared_error_golem_error.GolemModuleError) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `message` | `string` | +| `code` | `string` \| `number` | +| `previous?` | `Error` | + +#### Returns + +[`GolemModuleError`](shared_error_golem_error.GolemModuleError) + +#### Overrides + +[GolemError](shared_error_golem_error.GolemError).[constructor](shared_error_golem_error.GolemError#constructor) + +#### Defined in + +[src/shared/error/golem-error.ts:64](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L64) + +## Properties + +### code + +• **code**: `string` \| `number` + +#### Defined in + +[src/shared/error/golem-error.ts:66](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L66) + +___ + +### previous + +• `Optional` `Readonly` **previous**: `Error` + +The previous error, if any, that led to this error. + +#### Inherited from + +[GolemError](shared_error_golem_error.GolemError).[previous](shared_error_golem_error.GolemError#previous) + +#### Defined in + +[src/shared/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L10) diff --git a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemPlatformError.md b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemPlatformError.md similarity index 56% rename from src/pages/docs/golem-js/reference/classes/error_golem_error.GolemPlatformError.md rename to src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemPlatformError.md index fa5bc3e6a..c8cbe53f4 100644 --- a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemPlatformError.md +++ b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemPlatformError.md @@ -6,7 +6,7 @@ type: "JS API Reference" --- # Class: GolemPlatformError -[error/golem-error](../modules/error_golem_error).GolemPlatformError +[shared/error/golem-error](../modules/shared_error_golem_error).GolemPlatformError Represents errors resulting from yagna’s errors or provider failure @examples: @@ -15,7 +15,7 @@ Represents errors resulting from yagna’s errors or provider failure ## Hierarchy -- [`GolemError`](error_golem_error.GolemError) +- [`GolemError`](shared_error_golem_error.GolemError) ↳ **`GolemPlatformError`** @@ -23,17 +23,17 @@ Represents errors resulting from yagna’s errors or provider failure ### Constructors -- [constructor](error_golem_error.GolemPlatformError#constructor) +- [constructor](shared_error_golem_error.GolemPlatformError#constructor) ### Properties -- [previous](error_golem_error.GolemPlatformError#previous) +- [previous](shared_error_golem_error.GolemPlatformError#previous) ## Constructors ### constructor -• **new GolemPlatformError**(`message`, `previous?`): [`GolemPlatformError`](error_golem_error.GolemPlatformError) +• **new GolemPlatformError**(`message`, `previous?`): [`GolemPlatformError`](shared_error_golem_error.GolemPlatformError) #### Parameters @@ -44,15 +44,15 @@ Represents errors resulting from yagna’s errors or provider failure #### Returns -[`GolemPlatformError`](error_golem_error.GolemPlatformError) +[`GolemPlatformError`](shared_error_golem_error.GolemPlatformError) #### Inherited from -[GolemError](error_golem_error.GolemError).[constructor](error_golem_error.GolemError#constructor) +[GolemError](shared_error_golem_error.GolemError).[constructor](shared_error_golem_error.GolemError#constructor) #### Defined in -[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5) +[src/shared/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L5) ## Properties @@ -64,8 +64,8 @@ The previous error, if any, that led to this error. #### Inherited from -[GolemError](error_golem_error.GolemError).[previous](error_golem_error.GolemError#previous) +[GolemError](shared_error_golem_error.GolemError).[previous](shared_error_golem_error.GolemError#previous) #### Defined in -[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L10) +[src/shared/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L10) diff --git a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemTimeoutError.md b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemTimeoutError.md similarity index 58% rename from src/pages/docs/golem-js/reference/classes/error_golem_error.GolemTimeoutError.md rename to src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemTimeoutError.md index 22ebf181a..e53c51117 100644 --- a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemTimeoutError.md +++ b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemTimeoutError.md @@ -6,7 +6,7 @@ type: "JS API Reference" --- # Class: GolemTimeoutError -[error/golem-error](../modules/error_golem_error).GolemTimeoutError +[shared/error/golem-error](../modules/shared_error_golem_error).GolemTimeoutError SDK timeout errors @examples: @@ -17,7 +17,7 @@ SDK timeout errors ## Hierarchy -- [`GolemError`](error_golem_error.GolemError) +- [`GolemError`](shared_error_golem_error.GolemError) ↳ **`GolemTimeoutError`** @@ -25,17 +25,17 @@ SDK timeout errors ### Constructors -- [constructor](error_golem_error.GolemTimeoutError#constructor) +- [constructor](shared_error_golem_error.GolemTimeoutError#constructor) ### Properties -- [previous](error_golem_error.GolemTimeoutError#previous) +- [previous](shared_error_golem_error.GolemTimeoutError#previous) ## Constructors ### constructor -• **new GolemTimeoutError**(`message`, `previous?`): [`GolemTimeoutError`](error_golem_error.GolemTimeoutError) +• **new GolemTimeoutError**(`message`, `previous?`): [`GolemTimeoutError`](shared_error_golem_error.GolemTimeoutError) #### Parameters @@ -46,15 +46,15 @@ SDK timeout errors #### Returns -[`GolemTimeoutError`](error_golem_error.GolemTimeoutError) +[`GolemTimeoutError`](shared_error_golem_error.GolemTimeoutError) #### Inherited from -[GolemError](error_golem_error.GolemError).[constructor](error_golem_error.GolemError#constructor) +[GolemError](shared_error_golem_error.GolemError).[constructor](shared_error_golem_error.GolemError#constructor) #### Defined in -[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5) +[src/shared/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L5) ## Properties @@ -66,8 +66,8 @@ The previous error, if any, that led to this error. #### Inherited from -[GolemError](error_golem_error.GolemError).[previous](error_golem_error.GolemError#previous) +[GolemError](shared_error_golem_error.GolemError).[previous](shared_error_golem_error.GolemError#previous) #### Defined in -[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L10) +[src/shared/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L10) diff --git a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemUserError.md b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemUserError.md similarity index 51% rename from src/pages/docs/golem-js/reference/classes/error_golem_error.GolemUserError.md rename to src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemUserError.md index f56cde40e..fa1ae4e9d 100644 --- a/src/pages/docs/golem-js/reference/classes/error_golem_error.GolemUserError.md +++ b/src/pages/docs/golem-js/reference/classes/shared_error_golem_error.GolemUserError.md @@ -6,7 +6,7 @@ type: "JS API Reference" --- # Class: GolemUserError -[error/golem-error](../modules/error_golem_error).GolemUserError +[shared/error/golem-error](../modules/shared_error_golem_error).GolemUserError User-caused errors in the Golem SDK containing logic errors. @@ -18,29 +18,29 @@ you cannot create an activity for an agreement that already expired ## Hierarchy -- [`GolemError`](error_golem_error.GolemError) +- [`GolemError`](shared_error_golem_error.GolemError) ↳ **`GolemUserError`** - ↳↳ [`GolemAbortError`](error_golem_error.GolemAbortError) + ↳↳ [`GolemAbortError`](shared_error_golem_error.GolemAbortError) - ↳↳ [`GolemConfigError`](error_golem_error.GolemConfigError) + ↳↳ [`GolemConfigError`](shared_error_golem_error.GolemConfigError) ## Table of contents ### Constructors -- [constructor](error_golem_error.GolemUserError#constructor) +- [constructor](shared_error_golem_error.GolemUserError#constructor) ### Properties -- [previous](error_golem_error.GolemUserError#previous) +- [previous](shared_error_golem_error.GolemUserError#previous) ## Constructors ### constructor -• **new GolemUserError**(`message`, `previous?`): [`GolemUserError`](error_golem_error.GolemUserError) +• **new GolemUserError**(`message`, `previous?`): [`GolemUserError`](shared_error_golem_error.GolemUserError) #### Parameters @@ -51,15 +51,15 @@ you cannot create an activity for an agreement that already expired #### Returns -[`GolemUserError`](error_golem_error.GolemUserError) +[`GolemUserError`](shared_error_golem_error.GolemUserError) #### Inherited from -[GolemError](error_golem_error.GolemError).[constructor](error_golem_error.GolemError#constructor) +[GolemError](shared_error_golem_error.GolemError).[constructor](shared_error_golem_error.GolemError#constructor) #### Defined in -[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5) +[src/shared/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L5) ## Properties @@ -71,8 +71,8 @@ The previous error, if any, that led to this error. #### Inherited from -[GolemError](error_golem_error.GolemError).[previous](error_golem_error.GolemError#previous) +[GolemError](shared_error_golem_error.GolemError).[previous](shared_error_golem_error.GolemError#previous) #### Defined in -[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L10) +[src/shared/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/error/golem-error.ts#L10) diff --git a/src/pages/docs/golem-js/reference/classes/shared_storage_GftpServerAdapter.GftpServerAdapter.md b/src/pages/docs/golem-js/reference/classes/shared_storage_GftpServerAdapter.GftpServerAdapter.md new file mode 100644 index 000000000..989a4377d --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_storage_GftpServerAdapter.GftpServerAdapter.md @@ -0,0 +1,146 @@ +--- +title: "Class GftpServerAdapter" +pageTitle: "Class GftpServerAdapter - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class GftpServerAdapter within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: GftpServerAdapter + +[shared/storage/GftpServerAdapter](../modules/shared_storage_GftpServerAdapter).GftpServerAdapter + +This class provides GFTP based implementation of the IFileServer interface used in the SDK + +## Implements + +- [`IFileServer`](../interfaces/activity_activity_module.IFileServer) + +## Table of contents + +### Constructors + +- [constructor](shared_storage_GftpServerAdapter.GftpServerAdapter#constructor) + +### Methods + +- [publishFile](shared_storage_GftpServerAdapter.GftpServerAdapter#publishfile) +- [isServing](shared_storage_GftpServerAdapter.GftpServerAdapter#isserving) +- [getPublishInfo](shared_storage_GftpServerAdapter.GftpServerAdapter#getpublishinfo) +- [isFilePublished](shared_storage_GftpServerAdapter.GftpServerAdapter#isfilepublished) + +## Constructors + +### constructor + +• **new GftpServerAdapter**(`storage`): [`GftpServerAdapter`](shared_storage_GftpServerAdapter.GftpServerAdapter) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) | + +#### Returns + +[`GftpServerAdapter`](shared_storage_GftpServerAdapter.GftpServerAdapter) + +#### Defined in + +[src/shared/storage/GftpServerAdapter.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/GftpServerAdapter.ts#L13) + +## Methods + +### publishFile + +▸ **publishFile**(`sourcePath`): `Promise`\<\{ `fileUrl`: `string` ; `fileHash`: `string` }\> + +Exposes a file that can be accessed via Golem Network and GFTP + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `sourcePath` | `string` | + +#### Returns + +`Promise`\<\{ `fileUrl`: `string` ; `fileHash`: `string` }\> + +#### Implementation of + +[IFileServer](../interfaces/activity_activity_module.IFileServer).[publishFile](../interfaces/activity_activity_module.IFileServer#publishfile) + +#### Defined in + +[src/shared/storage/GftpServerAdapter.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/GftpServerAdapter.ts#L15) + +___ + +### isServing + +▸ **isServing**(): `boolean` + +Tells if the server is currently serving any files + +#### Returns + +`boolean` + +#### Implementation of + +[IFileServer](../interfaces/activity_activity_module.IFileServer).[isServing](../interfaces/activity_activity_module.IFileServer#isserving) + +#### Defined in + +[src/shared/storage/GftpServerAdapter.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/GftpServerAdapter.ts#L37) + +___ + +### getPublishInfo + +▸ **getPublishInfo**(`sourcePath`): `undefined` \| [`FileServerEntry`](../modules/activity_activity_module#fileserverentry) + +Returns publishing information for a file that has been already served + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `sourcePath` | `string` | + +#### Returns + +`undefined` \| [`FileServerEntry`](../modules/activity_activity_module#fileserverentry) + +#### Implementation of + +[IFileServer](../interfaces/activity_activity_module.IFileServer).[getPublishInfo](../interfaces/activity_activity_module.IFileServer#getpublishinfo) + +#### Defined in + +[src/shared/storage/GftpServerAdapter.ts:41](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/GftpServerAdapter.ts#L41) + +___ + +### isFilePublished + +▸ **isFilePublished**(`sourcePath`): `boolean` + +Tells if the file was already published on the server + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `sourcePath` | `string` | + +#### Returns + +`boolean` + +#### Implementation of + +[IFileServer](../interfaces/activity_activity_module.IFileServer).[isFilePublished](../interfaces/activity_activity_module.IFileServer#isfilepublished) + +#### Defined in + +[src/shared/storage/GftpServerAdapter.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/GftpServerAdapter.ts#L45) diff --git a/src/pages/docs/golem-js/reference/classes/shared_storage_gftp.GftpStorageProvider.md b/src/pages/docs/golem-js/reference/classes/shared_storage_gftp.GftpStorageProvider.md new file mode 100644 index 000000000..f92cdafad --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_storage_gftp.GftpStorageProvider.md @@ -0,0 +1,243 @@ +--- +title: "Class GftpStorageProvider" +pageTitle: "Class GftpStorageProvider - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class GftpStorageProvider within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: GftpStorageProvider + +[shared/storage/gftp](../modules/shared_storage_gftp).GftpStorageProvider + +## Implements + +- [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) + +## Table of contents + +### Constructors + +- [constructor](shared_storage_gftp.GftpStorageProvider#constructor) + +### Methods + +- [init](shared_storage_gftp.GftpStorageProvider#init) +- [isInitiated](shared_storage_gftp.GftpStorageProvider#isinitiated) +- [receiveFile](shared_storage_gftp.GftpStorageProvider#receivefile) +- [receiveData](shared_storage_gftp.GftpStorageProvider#receivedata) +- [publishFile](shared_storage_gftp.GftpStorageProvider#publishfile) +- [publishData](shared_storage_gftp.GftpStorageProvider#publishdata) +- [release](shared_storage_gftp.GftpStorageProvider#release) +- [close](shared_storage_gftp.GftpStorageProvider#close) +- [isReady](shared_storage_gftp.GftpStorageProvider#isready) + +## Constructors + +### constructor + +• **new GftpStorageProvider**(`logger?`): [`GftpStorageProvider`](shared_storage_gftp.GftpStorageProvider) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `logger?` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | + +#### Returns + +[`GftpStorageProvider`](shared_storage_gftp.GftpStorageProvider) + +#### Defined in + +[src/shared/storage/gftp.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/gftp.ts#L26) + +## Methods + +### init + +▸ **init**(): `Promise`\<`void`\> + +Initialize storage provider. + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[init](../interfaces/shared_storage_provider.StorageProvider#init) + +#### Defined in + +[src/shared/storage/gftp.ts:33](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/gftp.ts#L33) + +___ + +### isInitiated + +▸ **isInitiated**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[src/shared/storage/gftp.ts:66](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/gftp.ts#L66) + +___ + +### receiveFile + +▸ **receiveFile**(`path`): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of a file to be downloaded. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `path` | `string` | + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[receiveFile](../interfaces/shared_storage_provider.StorageProvider#receivefile) + +#### Defined in + +[src/shared/storage/gftp.ts:78](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/gftp.ts#L78) + +___ + +### receiveData + +▸ **receiveData**(): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of a file to be downloaded. + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[receiveData](../interfaces/shared_storage_provider.StorageProvider#receivedata) + +#### Defined in + +[src/shared/storage/gftp.ts:83](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/gftp.ts#L83) + +___ + +### publishFile + +▸ **publishFile**(`src`): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of a file to be uploaded. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `src` | `string` | + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[publishFile](../interfaces/shared_storage_provider.StorageProvider#publishfile) + +#### Defined in + +[src/shared/storage/gftp.ts:87](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/gftp.ts#L87) + +___ + +### publishData + +▸ **publishData**(`src`): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of data to be uploaded. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `src` | `Uint8Array` | + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[publishData](../interfaces/shared_storage_provider.StorageProvider#publishdata) + +#### Defined in + +[src/shared/storage/gftp.ts:93](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/gftp.ts#L93) + +___ + +### release + +▸ **release**(): `Promise`\<`void`\> + +Release previously allocated resource URL from Yagna. + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[release](../interfaces/shared_storage_provider.StorageProvider#release) + +#### Defined in + +[src/shared/storage/gftp.ts:105](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/gftp.ts#L105) + +___ + +### close + +▸ **close**(): `Promise`\<`void`\> + +Close storage provider and release all resources. + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[close](../interfaces/shared_storage_provider.StorageProvider#close) + +#### Defined in + +[src/shared/storage/gftp.ts:119](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/gftp.ts#L119) + +___ + +### isReady + +▸ **isReady**(): `boolean` + +Tells if the storage provider is ready for use + +#### Returns + +`boolean` + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[isReady](../interfaces/shared_storage_provider.StorageProvider#isready) + +#### Defined in + +[src/shared/storage/gftp.ts:179](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/gftp.ts#L179) diff --git a/src/pages/docs/golem-js/reference/classes/shared_storage_null.NullStorageProvider.md b/src/pages/docs/golem-js/reference/classes/shared_storage_null.NullStorageProvider.md new file mode 100644 index 000000000..b3efb13d2 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_storage_null.NullStorageProvider.md @@ -0,0 +1,237 @@ +--- +title: "Class NullStorageProvider" +pageTitle: "Class NullStorageProvider - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class NullStorageProvider within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: NullStorageProvider + +[shared/storage/null](../modules/shared_storage_null).NullStorageProvider + +Null Storage Provider. + +Blocks all storage operations. Any attempt to use storage will result in an error. + +This will be the default storage provider if no default storage provider is available +for the platform the SDK is running on. + +## Implements + +- [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) + +## Table of contents + +### Constructors + +- [constructor](shared_storage_null.NullStorageProvider#constructor) + +### Methods + +- [close](shared_storage_null.NullStorageProvider#close) +- [init](shared_storage_null.NullStorageProvider#init) +- [publishData](shared_storage_null.NullStorageProvider#publishdata) +- [publishFile](shared_storage_null.NullStorageProvider#publishfile) +- [receiveFile](shared_storage_null.NullStorageProvider#receivefile) +- [receiveData](shared_storage_null.NullStorageProvider#receivedata) +- [release](shared_storage_null.NullStorageProvider#release) +- [isReady](shared_storage_null.NullStorageProvider#isready) + +## Constructors + +### constructor + +• **new NullStorageProvider**(): [`NullStorageProvider`](shared_storage_null.NullStorageProvider) + +#### Returns + +[`NullStorageProvider`](shared_storage_null.NullStorageProvider) + +## Methods + +### close + +▸ **close**(): `Promise`\<`void`\> + +Close storage provider and release all resources. + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[close](../interfaces/shared_storage_provider.StorageProvider#close) + +#### Defined in + +[src/shared/storage/null.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/null.ts#L15) + +___ + +### init + +▸ **init**(): `Promise`\<`void`\> + +Initialize storage provider. + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[init](../interfaces/shared_storage_provider.StorageProvider#init) + +#### Defined in + +[src/shared/storage/null.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/null.ts#L19) + +___ + +### publishData + +▸ **publishData**(`src`): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of data to be uploaded. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `src` | `Uint8Array` | + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[publishData](../interfaces/shared_storage_provider.StorageProvider#publishdata) + +#### Defined in + +[src/shared/storage/null.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/null.ts#L24) + +___ + +### publishFile + +▸ **publishFile**(`src`): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of a file to be uploaded. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `src` | `string` | + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[publishFile](../interfaces/shared_storage_provider.StorageProvider#publishfile) + +#### Defined in + +[src/shared/storage/null.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/null.ts#L29) + +___ + +### receiveFile + +▸ **receiveFile**(`path`): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of a file to be downloaded. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `path` | `string` | + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[receiveFile](../interfaces/shared_storage_provider.StorageProvider#receivefile) + +#### Defined in + +[src/shared/storage/null.ts:34](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/null.ts#L34) + +___ + +### receiveData + +▸ **receiveData**(`callback`): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of a file to be downloaded. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `callback` | [`StorageProviderDataCallback`](../modules/shared_storage_provider#storageproviderdatacallback) | + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[receiveData](../interfaces/shared_storage_provider.StorageProvider#receivedata) + +#### Defined in + +[src/shared/storage/null.ts:39](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/null.ts#L39) + +___ + +### release + +▸ **release**(`urls`): `Promise`\<`void`\> + +Release previously allocated resource URL from Yagna. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `urls` | `string`[] | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[release](../interfaces/shared_storage_provider.StorageProvider#release) + +#### Defined in + +[src/shared/storage/null.ts:44](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/null.ts#L44) + +___ + +### isReady + +▸ **isReady**(): `boolean` + +Tells if the storage provider is ready for use + +#### Returns + +`boolean` + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[isReady](../interfaces/shared_storage_provider.StorageProvider#isready) + +#### Defined in + +[src/shared/storage/null.ts:48](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/null.ts#L48) diff --git a/src/pages/docs/golem-js/reference/classes/shared_storage_ws_browser.WebSocketBrowserStorageProvider.md b/src/pages/docs/golem-js/reference/classes/shared_storage_ws_browser.WebSocketBrowserStorageProvider.md new file mode 100644 index 000000000..5c924e34e --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_storage_ws_browser.WebSocketBrowserStorageProvider.md @@ -0,0 +1,231 @@ +--- +title: "Class WebSocketBrowserStorageProvider" +pageTitle: "Class WebSocketBrowserStorageProvider - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class WebSocketBrowserStorageProvider within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: WebSocketBrowserStorageProvider + +[shared/storage/ws-browser](../modules/shared_storage_ws_browser).WebSocketBrowserStorageProvider + +Storage provider that uses GFTP over WebSockets. + +## Implements + +- [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) + +## Table of contents + +### Constructors + +- [constructor](shared_storage_ws_browser.WebSocketBrowserStorageProvider#constructor) + +### Methods + +- [close](shared_storage_ws_browser.WebSocketBrowserStorageProvider#close) +- [init](shared_storage_ws_browser.WebSocketBrowserStorageProvider#init) +- [publishData](shared_storage_ws_browser.WebSocketBrowserStorageProvider#publishdata) +- [publishFile](shared_storage_ws_browser.WebSocketBrowserStorageProvider#publishfile) +- [receiveData](shared_storage_ws_browser.WebSocketBrowserStorageProvider#receivedata) +- [receiveFile](shared_storage_ws_browser.WebSocketBrowserStorageProvider#receivefile) +- [release](shared_storage_ws_browser.WebSocketBrowserStorageProvider#release) +- [isReady](shared_storage_ws_browser.WebSocketBrowserStorageProvider#isready) + +## Constructors + +### constructor + +• **new WebSocketBrowserStorageProvider**(`yagnaApi`, `options`): [`WebSocketBrowserStorageProvider`](shared_storage_ws_browser.WebSocketBrowserStorageProvider) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `yagnaApi` | [`YagnaApi`](shared_yagna_yagnaApi.YagnaApi) | +| `options` | [`WebSocketStorageProviderOptions`](../interfaces/shared_storage_ws_browser.WebSocketStorageProviderOptions) | + +#### Returns + +[`WebSocketBrowserStorageProvider`](shared_storage_ws_browser.WebSocketBrowserStorageProvider) + +#### Defined in + +[src/shared/storage/ws-browser.ts:64](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/ws-browser.ts#L64) + +## Methods + +### close + +▸ **close**(): `Promise`\<`void`\> + +Close storage provider and release all resources. + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[close](../interfaces/shared_storage_provider.StorageProvider#close) + +#### Defined in + +[src/shared/storage/ws-browser.ts:71](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/ws-browser.ts#L71) + +___ + +### init + +▸ **init**(): `Promise`\<`void`\> + +Initialize storage provider. + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[init](../interfaces/shared_storage_provider.StorageProvider#init) + +#### Defined in + +[src/shared/storage/ws-browser.ts:76](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/ws-browser.ts#L76) + +___ + +### publishData + +▸ **publishData**(`data`): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of data to be uploaded. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `Uint8Array` | + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[publishData](../interfaces/shared_storage_provider.StorageProvider#publishdata) + +#### Defined in + +[src/shared/storage/ws-browser.ts:81](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/ws-browser.ts#L81) + +___ + +### publishFile + +▸ **publishFile**(): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of a file to be uploaded. + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[publishFile](../interfaces/shared_storage_provider.StorageProvider#publishfile) + +#### Defined in + +[src/shared/storage/ws-browser.ts:106](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/ws-browser.ts#L106) + +___ + +### receiveData + +▸ **receiveData**(`callback`): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of a file to be downloaded. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `callback` | [`StorageProviderDataCallback`](../modules/shared_storage_provider#storageproviderdatacallback) | + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[receiveData](../interfaces/shared_storage_provider.StorageProvider#receivedata) + +#### Defined in + +[src/shared/storage/ws-browser.ts:110](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/ws-browser.ts#L110) + +___ + +### receiveFile + +▸ **receiveFile**(): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of a file to be downloaded. + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[receiveFile](../interfaces/shared_storage_provider.StorageProvider#receivefile) + +#### Defined in + +[src/shared/storage/ws-browser.ts:136](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/ws-browser.ts#L136) + +___ + +### release + +▸ **release**(`urls`): `Promise`\<`void`\> + +Release previously allocated resource URL from Yagna. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `urls` | `string`[] | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[release](../interfaces/shared_storage_provider.StorageProvider#release) + +#### Defined in + +[src/shared/storage/ws-browser.ts:140](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/ws-browser.ts#L140) + +___ + +### isReady + +▸ **isReady**(): `boolean` + +Tells if the storage provider is ready for use + +#### Returns + +`boolean` + +#### Implementation of + +[StorageProvider](../interfaces/shared_storage_provider.StorageProvider).[isReady](../interfaces/shared_storage_provider.StorageProvider#isready) + +#### Defined in + +[src/shared/storage/ws-browser.ts:152](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/ws-browser.ts#L152) diff --git a/src/pages/docs/golem-js/reference/classes/shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter.md b/src/pages/docs/golem-js/reference/classes/shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter.md new file mode 100644 index 000000000..966453a23 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter.md @@ -0,0 +1,227 @@ +--- +title: "Class ActivityApiAdapter" +pageTitle: "Class ActivityApiAdapter - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class ActivityApiAdapter within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: ActivityApiAdapter + +[shared/yagna/adapters/activity-api-adapter](../modules/shared_yagna_adapters_activity_api_adapter).ActivityApiAdapter + +Represents a set of use cases related to managing the lifetime of an activity + +## Implements + +- [`IActivityApi`](../interfaces/activity_api.IActivityApi) + +## Table of contents + +### Constructors + +- [constructor](shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter#constructor) + +### Methods + +- [getActivity](shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter#getactivity) +- [createActivity](shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter#createactivity) +- [destroyActivity](shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter#destroyactivity) +- [getActivityState](shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter#getactivitystate) +- [executeScript](shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter#executescript) +- [getExecBatchResults](shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter#getexecbatchresults) +- [getExecBatchEvents](shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter#getexecbatchevents) + +## Constructors + +### constructor + +• **new ActivityApiAdapter**(`state`, `control`, `exec`, `activityRepo`): [`ActivityApiAdapter`](shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `state` | `RequestorStateService` | +| `control` | `RequestorControlService` | +| `exec` | [`YagnaExeScriptObserver`](../interfaces/shared_yagna_yagnaApi.YagnaExeScriptObserver) | +| `activityRepo` | [`IActivityRepository`](../interfaces/activity_activity.IActivityRepository) | + +#### Returns + +[`ActivityApiAdapter`](shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter) + +#### Defined in + +[src/shared/yagna/adapters/activity-api-adapter.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/activity-api-adapter.ts#L12) + +## Methods + +### getActivity + +▸ **getActivity**(`id`): `Promise`\<[`Activity`](activity_activity.Activity)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Activity`](activity_activity.Activity)\> + +#### Implementation of + +[IActivityApi](../interfaces/activity_api.IActivityApi).[getActivity](../interfaces/activity_api.IActivityApi#getactivity) + +#### Defined in + +[src/shared/yagna/adapters/activity-api-adapter.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/activity-api-adapter.ts#L19) + +___ + +### createActivity + +▸ **createActivity**(`agreement`): `Promise`\<[`Activity`](activity_activity.Activity)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](market_agreement_agreement.Agreement) | + +#### Returns + +`Promise`\<[`Activity`](activity_activity.Activity)\> + +#### Implementation of + +[IActivityApi](../interfaces/activity_api.IActivityApi).[createActivity](../interfaces/activity_api.IActivityApi#createactivity) + +#### Defined in + +[src/shared/yagna/adapters/activity-api-adapter.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/activity-api-adapter.ts#L23) + +___ + +### destroyActivity + +▸ **destroyActivity**(`activity`): `Promise`\<[`Activity`](activity_activity.Activity)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](activity_activity.Activity) | + +#### Returns + +`Promise`\<[`Activity`](activity_activity.Activity)\> + +#### Implementation of + +[IActivityApi](../interfaces/activity_api.IActivityApi).[destroyActivity](../interfaces/activity_api.IActivityApi#destroyactivity) + +#### Defined in + +[src/shared/yagna/adapters/activity-api-adapter.ts:47](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/activity-api-adapter.ts#L47) + +___ + +### getActivityState + +▸ **getActivityState**(`id`): `Promise`\<[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum)\> + +#### Implementation of + +[IActivityApi](../interfaces/activity_api.IActivityApi).[getActivityState](../interfaces/activity_api.IActivityApi#getactivitystate) + +#### Defined in + +[src/shared/yagna/adapters/activity-api-adapter.ts:63](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/activity-api-adapter.ts#L63) + +___ + +### executeScript + +▸ **executeScript**(`activity`, `script`): `Promise`\<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](activity_activity.Activity) | +| `script` | [`ExeScriptRequest`](../interfaces/activity_exe_script_executor.ExeScriptRequest) | + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[IActivityApi](../interfaces/activity_api.IActivityApi).[executeScript](../interfaces/activity_api.IActivityApi#executescript) + +#### Defined in + +[src/shared/yagna/adapters/activity-api-adapter.ts:67](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/activity-api-adapter.ts#L67) + +___ + +### getExecBatchResults + +▸ **getExecBatchResults**(`activity`, `batchId`, `commandIndex?`, `timeout?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>[]\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](activity_activity.Activity) | +| `batchId` | `string` | +| `commandIndex?` | `number` | +| `timeout?` | `number` | + +#### Returns + +`Promise`\<[`Result`](activity_results.Result)\<`any`\>[]\> + +#### Implementation of + +[IActivityApi](../interfaces/activity_api.IActivityApi).[getExecBatchResults](../interfaces/activity_api.IActivityApi#getexecbatchresults) + +#### Defined in + +[src/shared/yagna/adapters/activity-api-adapter.ts:82](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/activity-api-adapter.ts#L82) + +___ + +### getExecBatchEvents + +▸ **getExecBatchEvents**(`activity`, `batchId`): `Observable`\<[`StreamingBatchEvent`](../interfaces/activity_results.StreamingBatchEvent)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](activity_activity.Activity) | +| `batchId` | `string` | + +#### Returns + +`Observable`\<[`StreamingBatchEvent`](../interfaces/activity_results.StreamingBatchEvent)\> + +#### Implementation of + +[IActivityApi](../interfaces/activity_api.IActivityApi).[getExecBatchEvents](../interfaces/activity_api.IActivityApi#getexecbatchevents) + +#### Defined in + +[src/shared/yagna/adapters/activity-api-adapter.ts:104](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/activity-api-adapter.ts#L104) diff --git a/src/pages/docs/golem-js/reference/classes/shared_yagna_adapters_market_api_adapter.MarketApiAdapter.md b/src/pages/docs/golem-js/reference/classes/shared_yagna_adapters_market_api_adapter.MarketApiAdapter.md new file mode 100644 index 000000000..fccf98b58 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_yagna_adapters_market_api_adapter.MarketApiAdapter.md @@ -0,0 +1,420 @@ +--- +title: "Class MarketApiAdapter" +pageTitle: "Class MarketApiAdapter - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class MarketApiAdapter within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: MarketApiAdapter + +[shared/yagna/adapters/market-api-adapter](../modules/shared_yagna_adapters_market_api_adapter).MarketApiAdapter + +## Implements + +- [`IMarketApi`](../interfaces/market_api.IMarketApi) + +## Table of contents + +### Constructors + +- [constructor](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#constructor) + +### Methods + +- [publishDemandSpecification](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#publishdemandspecification) +- [unpublishDemand](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#unpublishdemand) +- [collectMarketProposalEvents](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#collectmarketproposalevents) +- [counterProposal](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#counterproposal) +- [rejectProposal](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#rejectproposal) +- [getPaymentRelatedDemandDecorations](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#getpaymentrelateddemanddecorations) +- [confirmAgreement](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#confirmagreement) +- [createAgreement](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#createagreement) +- [proposeAgreement](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#proposeagreement) +- [getAgreement](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#getagreement) +- [getAgreementState](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#getagreementstate) +- [terminateAgreement](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#terminateagreement) +- [collectAgreementEvents](shared_yagna_adapters_market_api_adapter.MarketApiAdapter#collectagreementevents) + +## Constructors + +### constructor + +• **new MarketApiAdapter**(`yagnaApi`, `agreementRepo`, `proposalRepo`, `demandRepo`, `logger`): [`MarketApiAdapter`](shared_yagna_adapters_market_api_adapter.MarketApiAdapter) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `yagnaApi` | [`YagnaApi`](shared_yagna_yagnaApi.YagnaApi) | +| `agreementRepo` | [`IAgreementRepository`](../interfaces/market_agreement_agreement.IAgreementRepository) | +| `proposalRepo` | [`IProposalRepository`](../interfaces/market_proposal_market_proposal.IProposalRepository) | +| `demandRepo` | [`IDemandRepository`](../interfaces/market_demand_demand.IDemandRepository) | +| `logger` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | + +#### Returns + +[`MarketApiAdapter`](shared_yagna_adapters_market_api_adapter.MarketApiAdapter) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:43](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L43) + +## Methods + +### publishDemandSpecification + +▸ **publishDemandSpecification**(`spec`): `Promise`\<[`Demand`](market_demand_demand.Demand)\> + +Creates a new demand based on the given specification and publishes +it to the market. +Keep in mind that the demand lasts for a limited time and needs to be +refreshed periodically (see `refreshDemand` method). +Use `unpublishDemand` to remove the demand from the market. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `spec` | [`DemandSpecification`](market_demand_demand.DemandSpecification) | + +#### Returns + +`Promise`\<[`Demand`](market_demand_demand.Demand)\> + +#### Implementation of + +[IMarketApi](../interfaces/market_api.IMarketApi).[publishDemandSpecification](../interfaces/market_api.IMarketApi#publishdemandspecification) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:51](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L51) + +___ + +### unpublishDemand + +▸ **unpublishDemand**(`demand`): `Promise`\<`void`\> + +Remove the given demand from the market. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demand` | [`Demand`](market_demand_demand.Demand) | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[IMarketApi](../interfaces/market_api.IMarketApi).[unpublishDemand](../interfaces/market_api.IMarketApi#unpublishdemand) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:64](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L64) + +___ + +### collectMarketProposalEvents + +▸ **collectMarketProposalEvents**(`demand`): `Observable`\<[`MarketProposalEvent`](../modules/market_proposal_market_proposal_event#marketproposalevent)\> + +"Publishes" the demand on the network and stats to listen (event polling) for the events representing the feedback + +The feedback can fall into four categories: + +- (Initial) We will receive initial offer proposals that were matched by the yagna node which we're using +- (Negotiations) We will receive responses from providers with draft offer proposals if we decided to counter the initial proposal +- (Negotiations) We will receive an event representing rejection of our counter-proposal by the provider +- (Negotiations) We will receive a question from the provider about a certain property as part of the negotiation process (_protocol piece not by yagna 0.15_) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demand` | [`Demand`](market_demand_demand.Demand) | + +#### Returns + +`Observable`\<[`MarketProposalEvent`](../modules/market_proposal_market_proposal_event#marketproposalevent)\> + +A complex object that allows subscribing to these categories of feedback mentioned above + +#### Implementation of + +[IMarketApi](../interfaces/market_api.IMarketApi).[collectMarketProposalEvents](../interfaces/market_api.IMarketApi#collectmarketproposalevents) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:72](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L72) + +___ + +### counterProposal + +▸ **counterProposal**(`receivedProposal`, `demand`): `Promise`\<[`OfferCounterProposal`](market_proposal_offer_counter_proposal.OfferCounterProposal)\> + +Sends a counter-proposal to the given proposal. Returns the newly created counter-proposal. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `receivedProposal` | [`OfferProposal`](market_proposal_offer_proposal.OfferProposal) | +| `demand` | [`DemandSpecification`](market_demand_demand.DemandSpecification) | + +#### Returns + +`Promise`\<[`OfferCounterProposal`](market_proposal_offer_counter_proposal.OfferCounterProposal)\> + +#### Implementation of + +[IMarketApi](../interfaces/market_api.IMarketApi).[counterProposal](../interfaces/market_api.IMarketApi#counterproposal) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:157](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L157) + +___ + +### rejectProposal + +▸ **rejectProposal**(`receivedProposal`, `reason`): `Promise`\<`void`\> + +Sends a "reject" response for the proposal that was received from the Provider as part of the negotiation process + +On the protocol level this means that no further counter-proposals will be generated by the Requestor + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `receivedProposal` | [`OfferProposal`](market_proposal_offer_proposal.OfferProposal) | The proposal from the provider | +| `reason` | `string` | User readable reason that should be presented to the Provider | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[IMarketApi](../interfaces/market_api.IMarketApi).[rejectProposal](../interfaces/market_api.IMarketApi#rejectproposal) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:180](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L180) + +___ + +### getPaymentRelatedDemandDecorations + +▸ **getPaymentRelatedDemandDecorations**(`allocationId`): `Promise`\<[`DemandBodyPrototype`](../modules/market_demand_demand_body_builder#demandbodyprototype)\> + +Fetches payment related decorations, based on the given allocation ID. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `allocationId` | `string` | The ID of the allocation that will be used to pay for computations related to the demand | + +#### Returns + +`Promise`\<[`DemandBodyPrototype`](../modules/market_demand_demand_body_builder#demandbodyprototype)\> + +#### Implementation of + +[IMarketApi](../interfaces/market_api.IMarketApi).[getPaymentRelatedDemandDecorations](../interfaces/market_api.IMarketApi#getpaymentrelateddemanddecorations) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:210](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L210) + +___ + +### confirmAgreement + +▸ **confirmAgreement**(`agreement`, `options?`): `Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +Confirms the agreement with the provider + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](market_agreement_agreement.Agreement) | +| `options?` | [`AgreementOptions`](../interfaces/market_agreement_agreement.AgreementOptions) | + +#### Returns + +`Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +#### Implementation of + +[IMarketApi](../interfaces/market_api.IMarketApi).[confirmAgreement](../interfaces/market_api.IMarketApi#confirmagreement) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:214](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L214) + +___ + +### createAgreement + +▸ **createAgreement**(`proposal`, `options?`): `Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +Request creating an agreement from the provided proposal + +Use this method if you want to decide what should happen with the agreement after it is created + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](market_proposal_offer_proposal.OfferProposal) | +| `options?` | [`AgreementOptions`](../interfaces/market_agreement_agreement.AgreementOptions) | + +#### Returns + +`Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +An agreement that's in a "Proposal" state (not yet usable for activity creation) + +#### Implementation of + +[IMarketApi](../interfaces/market_api.IMarketApi).[createAgreement](../interfaces/market_api.IMarketApi#createagreement) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:233](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L233) + +___ + +### proposeAgreement + +▸ **proposeAgreement**(`proposal`, `options?`): `Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +Request creating an agreement from the provided proposal, send it to the Provider and wait for approval + +Use this method when you want to quickly finalize the deal with the Provider, but be ready for a rejection + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](market_proposal_offer_proposal.OfferProposal) | +| `options?` | [`AgreementOptions`](../interfaces/market_agreement_agreement.AgreementOptions) | + +#### Returns + +`Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +An agreement that's already in an "Approved" state and can be used to create activities on the Provider + +#### Implementation of + +[IMarketApi](../interfaces/market_api.IMarketApi).[proposeAgreement](../interfaces/market_api.IMarketApi#proposeagreement) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:267](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L267) + +___ + +### getAgreement + +▸ **getAgreement**(`id`): `Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +Retrieves an agreement based on the provided ID. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +#### Implementation of + +[IMarketApi](../interfaces/market_api.IMarketApi).[getAgreement](../interfaces/market_api.IMarketApi#getagreement) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:284](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L284) + +___ + +### getAgreementState + +▸ **getAgreementState**(`id`): `Promise`\<[`AgreementState`](../modules/market_agreement_agreement#agreementstate)\> + +Retrieves the state of an agreement based on the provided agreement ID. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`AgreementState`](../modules/market_agreement_agreement#agreementstate)\> + +#### Implementation of + +[IMarketApi](../interfaces/market_api.IMarketApi).[getAgreementState](../interfaces/market_api.IMarketApi#getagreementstate) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:288](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L288) + +___ + +### terminateAgreement + +▸ **terminateAgreement**(`agreement`, `reason?`): `Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +Terminates an agreement. + +#### Parameters + +| Name | Type | Default value | +| :------ | :------ | :------ | +| `agreement` | [`Agreement`](market_agreement_agreement.Agreement) | `undefined` | +| `reason` | `string` | `"Finished"` | + +#### Returns + +`Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +#### Implementation of + +[IMarketApi](../interfaces/market_api.IMarketApi).[terminateAgreement](../interfaces/market_api.IMarketApi#terminateagreement) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:293](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L293) + +___ + +### collectAgreementEvents + +▸ **collectAgreementEvents**(): `Observable`\<[`AgreementEvent`](../modules/market_agreement_agreement_event#agreementevent)\> + +Start looking at the Agreement related events + +#### Returns + +`Observable`\<[`AgreementEvent`](../modules/market_agreement_agreement_event#agreementevent)\> + +#### Implementation of + +[IMarketApi](../interfaces/market_api.IMarketApi).[collectAgreementEvents](../interfaces/market_api.IMarketApi#collectagreementevents) + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:322](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L322) diff --git a/src/pages/docs/golem-js/reference/classes/shared_yagna_adapters_network_api_adapter.NetworkApiAdapter.md b/src/pages/docs/golem-js/reference/classes/shared_yagna_adapters_network_api_adapter.NetworkApiAdapter.md new file mode 100644 index 000000000..dd5c5d36b --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_yagna_adapters_network_api_adapter.NetworkApiAdapter.md @@ -0,0 +1,177 @@ +--- +title: "Class NetworkApiAdapter" +pageTitle: "Class NetworkApiAdapter - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class NetworkApiAdapter within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: NetworkApiAdapter + +[shared/yagna/adapters/network-api-adapter](../modules/shared_yagna_adapters_network_api_adapter).NetworkApiAdapter + +## Implements + +- [`INetworkApi`](../interfaces/network_api.INetworkApi) + +## Table of contents + +### Constructors + +- [constructor](shared_yagna_adapters_network_api_adapter.NetworkApiAdapter#constructor) + +### Methods + +- [createNetwork](shared_yagna_adapters_network_api_adapter.NetworkApiAdapter#createnetwork) +- [removeNetwork](shared_yagna_adapters_network_api_adapter.NetworkApiAdapter#removenetwork) +- [createNetworkNode](shared_yagna_adapters_network_api_adapter.NetworkApiAdapter#createnetworknode) +- [removeNetworkNode](shared_yagna_adapters_network_api_adapter.NetworkApiAdapter#removenetworknode) +- [getIdentity](shared_yagna_adapters_network_api_adapter.NetworkApiAdapter#getidentity) + +## Constructors + +### constructor + +• **new NetworkApiAdapter**(`yagnaApi`): [`NetworkApiAdapter`](shared_yagna_adapters_network_api_adapter.NetworkApiAdapter) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `yagnaApi` | [`YagnaApi`](shared_yagna_yagnaApi.YagnaApi) | + +#### Returns + +[`NetworkApiAdapter`](shared_yagna_adapters_network_api_adapter.NetworkApiAdapter) + +#### Defined in + +[src/shared/yagna/adapters/network-api-adapter.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/network-api-adapter.ts#L6) + +## Methods + +### createNetwork + +▸ **createNetwork**(`options`): `Promise`\<[`Network`](network_network.Network)\> + +Creates a new network with the specified options. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `options` | `Object` | NetworkOptions | +| `options.ip` | `string` | - | +| `options.mask?` | `string` | - | +| `options.gateway?` | `string` | - | + +#### Returns + +`Promise`\<[`Network`](network_network.Network)\> + +#### Implementation of + +[INetworkApi](../interfaces/network_api.INetworkApi).[createNetwork](../interfaces/network_api.INetworkApi#createnetwork) + +#### Defined in + +[src/shared/yagna/adapters/network-api-adapter.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/network-api-adapter.ts#L8) + +___ + +### removeNetwork + +▸ **removeNetwork**(`network`): `Promise`\<`void`\> + +Removes an existing network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `network` | [`Network`](network_network.Network) | The network to be removed. | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[INetworkApi](../interfaces/network_api.INetworkApi).[removeNetwork](../interfaces/network_api.INetworkApi#removenetwork) + +#### Defined in + +[src/shared/yagna/adapters/network-api-adapter.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/network-api-adapter.ts#L22) + +___ + +### createNetworkNode + +▸ **createNetworkNode**(`network`, `nodeId`, `nodeIp`): `Promise`\<[`NetworkNode`](network_node.NetworkNode)\> + +Creates a new node within a specified network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `network` | [`Network`](network_network.Network) | The network to which the node will be added. | +| `nodeId` | `string` | The ID of the node to be created. | +| `nodeIp` | `string` | Optional IP address for the node. If not provided, the first available IP address will be assigned. | + +#### Returns + +`Promise`\<[`NetworkNode`](network_node.NetworkNode)\> + +#### Implementation of + +[INetworkApi](../interfaces/network_api.INetworkApi).[createNetworkNode](../interfaces/network_api.INetworkApi#createnetworknode) + +#### Defined in + +[src/shared/yagna/adapters/network-api-adapter.ts:35](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/network-api-adapter.ts#L35) + +___ + +### removeNetworkNode + +▸ **removeNetworkNode**(`network`, `node`): `Promise`\<`void`\> + +Removes an existing node from a specified network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `network` | [`Network`](network_network.Network) | The network from which the node will be removed. | +| `node` | [`NetworkNode`](network_node.NetworkNode) | The node to be removed. | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[INetworkApi](../interfaces/network_api.INetworkApi).[removeNetworkNode](../interfaces/network_api.INetworkApi#removenetworknode) + +#### Defined in + +[src/shared/yagna/adapters/network-api-adapter.ts:56](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/network-api-adapter.ts#L56) + +___ + +### getIdentity + +▸ **getIdentity**(): `Promise`\<`string`\> + +Returns the identifier of the requesor + +#### Returns + +`Promise`\<`string`\> + +#### Implementation of + +[INetworkApi](../interfaces/network_api.INetworkApi).[getIdentity](../interfaces/network_api.INetworkApi#getidentity) + +#### Defined in + +[src/shared/yagna/adapters/network-api-adapter.ts:70](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/network-api-adapter.ts#L70) diff --git a/src/pages/docs/golem-js/reference/classes/shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter.md b/src/pages/docs/golem-js/reference/classes/shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter.md new file mode 100644 index 000000000..3b0da9181 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter.md @@ -0,0 +1,350 @@ +--- +title: "Class PaymentApiAdapter" +pageTitle: "Class PaymentApiAdapter - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class PaymentApiAdapter within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: PaymentApiAdapter + +[shared/yagna/adapters/payment-api-adapter](../modules/shared_yagna_adapters_payment_api_adapter).PaymentApiAdapter + +## Implements + +- [`IPaymentApi`](../interfaces/payment_api.IPaymentApi) + +## Table of contents + +### Constructors + +- [constructor](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#constructor) + +### Properties + +- [receivedInvoices$](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#receivedinvoices$) +- [receivedDebitNotes$](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#receiveddebitnotes$) + +### Methods + +- [connect](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#connect) +- [getInvoice](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#getinvoice) +- [getDebitNote](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#getdebitnote) +- [disconnect](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#disconnect) +- [acceptInvoice](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#acceptinvoice) +- [rejectInvoice](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#rejectinvoice) +- [acceptDebitNote](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#acceptdebitnote) +- [rejectDebitNote](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#rejectdebitnote) +- [getAllocation](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#getallocation) +- [createAllocation](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#createallocation) +- [releaseAllocation](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter#releaseallocation) + +## Constructors + +### constructor + +• **new PaymentApiAdapter**(`yagna`, `invoiceRepo`, `debitNoteRepo`, `logger`): [`PaymentApiAdapter`](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `yagna` | [`YagnaApi`](shared_yagna_yagnaApi.YagnaApi) | +| `invoiceRepo` | [`IInvoiceRepository`](../interfaces/payment_invoice.IInvoiceRepository) | +| `debitNoteRepo` | [`IDebitNoteRepository`](../interfaces/payment_debit_note.IDebitNoteRepository) | +| `logger` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | + +#### Returns + +[`PaymentApiAdapter`](shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:21](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L21) + +## Properties + +### receivedInvoices$ + +• **receivedInvoices$**: `Subject`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Implementation of + +[IPaymentApi](../interfaces/payment_api.IPaymentApi).[receivedInvoices$](../interfaces/payment_api.IPaymentApi#receivedinvoices$) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L17) + +___ + +### receivedDebitNotes$ + +• **receivedDebitNotes$**: `Subject`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Implementation of + +[IPaymentApi](../interfaces/payment_api.IPaymentApi).[receivedDebitNotes$](../interfaces/payment_api.IPaymentApi#receiveddebitnotes$) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L19) + +## Methods + +### connect + +▸ **connect**(): `Promise`\<`void`\> + +Starts the reader logic + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[IPaymentApi](../interfaces/payment_api.IPaymentApi).[connect](../interfaces/payment_api.IPaymentApi#connect) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L28) + +___ + +### getInvoice + +▸ **getInvoice**(`id`): `Promise`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Implementation of + +[IPaymentApi](../interfaces/payment_api.IPaymentApi).[getInvoice](../interfaces/payment_api.IPaymentApi#getinvoice) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:66](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L66) + +___ + +### getDebitNote + +▸ **getDebitNote**(`id`): `Promise`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Implementation of + +[IPaymentApi](../interfaces/payment_api.IPaymentApi).[getDebitNote](../interfaces/payment_api.IPaymentApi#getdebitnote) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:70](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L70) + +___ + +### disconnect + +▸ **disconnect**(): `Promise`\<`void`\> + +Terminates the reader logic + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[IPaymentApi](../interfaces/payment_api.IPaymentApi).[disconnect](../interfaces/payment_api.IPaymentApi#disconnect) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:74](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L74) + +___ + +### acceptInvoice + +▸ **acceptInvoice**(`invoice`, `allocation`, `amount`): `Promise`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `invoice` | [`Invoice`](payment_invoice.Invoice) | +| `allocation` | [`Allocation`](payment_allocation.Allocation) | +| `amount` | `string` | + +#### Returns + +`Promise`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Implementation of + +[IPaymentApi](../interfaces/payment_api.IPaymentApi).[acceptInvoice](../interfaces/payment_api.IPaymentApi#acceptinvoice) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:79](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L79) + +___ + +### rejectInvoice + +▸ **rejectInvoice**(`invoice`, `reason`): `Promise`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `invoice` | [`Invoice`](payment_invoice.Invoice) | +| `reason` | `string` | + +#### Returns + +`Promise`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Implementation of + +[IPaymentApi](../interfaces/payment_api.IPaymentApi).[rejectInvoice](../interfaces/payment_api.IPaymentApi#rejectinvoice) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:98](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L98) + +___ + +### acceptDebitNote + +▸ **acceptDebitNote**(`debitNote`, `allocation`, `amount`): `Promise`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `debitNote` | [`DebitNote`](payment_debit_note.DebitNote) | +| `allocation` | [`Allocation`](payment_allocation.Allocation) | +| `amount` | `string` | + +#### Returns + +`Promise`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Implementation of + +[IPaymentApi](../interfaces/payment_api.IPaymentApi).[acceptDebitNote](../interfaces/payment_api.IPaymentApi#acceptdebitnote) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:118](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L118) + +___ + +### rejectDebitNote + +▸ **rejectDebitNote**(`debitNote`): `Promise`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `debitNote` | [`DebitNote`](payment_debit_note.DebitNote) | + +#### Returns + +`Promise`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Implementation of + +[IPaymentApi](../interfaces/payment_api.IPaymentApi).[rejectDebitNote](../interfaces/payment_api.IPaymentApi#rejectdebitnote) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:137](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L137) + +___ + +### getAllocation + +▸ **getAllocation**(`id`): `Promise`\<[`Allocation`](payment_allocation.Allocation)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Allocation`](payment_allocation.Allocation)\> + +#### Implementation of + +[IPaymentApi](../interfaces/payment_api.IPaymentApi).[getAllocation](../interfaces/payment_api.IPaymentApi#getallocation) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:160](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L160) + +___ + +### createAllocation + +▸ **createAllocation**(`params`): `Promise`\<[`Allocation`](payment_allocation.Allocation)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`CreateAllocationParams`](../modules/payment_api#createallocationparams) | + +#### Returns + +`Promise`\<[`Allocation`](payment_allocation.Allocation)\> + +#### Implementation of + +[IPaymentApi](../interfaces/payment_api.IPaymentApi).[createAllocation](../interfaces/payment_api.IPaymentApi#createallocation) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:176](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L176) + +___ + +### releaseAllocation + +▸ **releaseAllocation**(`allocation`): `Promise`\<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `allocation` | [`Allocation`](payment_allocation.Allocation) | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[IPaymentApi](../interfaces/payment_api.IPaymentApi).[releaseAllocation](../interfaces/payment_api.IPaymentApi#releaseallocation) + +#### Defined in + +[src/shared/yagna/adapters/payment-api-adapter.ts:214](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/payment-api-adapter.ts#L214) diff --git a/src/pages/docs/golem-js/reference/classes/shared_yagna_event_reader.EventReader.md b/src/pages/docs/golem-js/reference/classes/shared_yagna_event_reader.EventReader.md new file mode 100644 index 000000000..f17fd61cd --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_yagna_event_reader.EventReader.md @@ -0,0 +1,94 @@ +--- +title: "Class EventReader" +pageTitle: "Class EventReader - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class EventReader within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: EventReader + +[shared/yagna/event-reader](../modules/shared_yagna_event_reader).EventReader + +## Table of contents + +### Constructors + +- [constructor](shared_yagna_event_reader.EventReader#constructor) + +### Methods + +- [pollToSubject](shared_yagna_event_reader.EventReader#polltosubject) +- [createReader](shared_yagna_event_reader.EventReader#createreader) + +## Constructors + +### constructor + +• **new EventReader**(`logger`): [`EventReader`](shared_yagna_event_reader.EventReader) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `logger` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | + +#### Returns + +[`EventReader`](shared_yagna_event_reader.EventReader) + +#### Defined in + +[src/shared/yagna/event-reader.ts:30](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/event-reader.ts#L30) + +## Methods + +### pollToSubject + +▸ **pollToSubject**\<`T`\>(`generator`, `subject`): `Promise`\<`void`\> + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `generator` | `AsyncGenerator`\<`T`, `any`, `unknown`\> | +| `subject` | `Subject`\<`T`\> | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/shared/yagna/event-reader.ts:32](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/event-reader.ts#L32) + +___ + +### createReader + +▸ **createReader**\<`T`\>(`eventType`, `eventsFetcher`): [`CancellablePoll`](../modules/shared_yagna_event_reader#cancellablepoll)\<`T`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | extends `Event` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `eventType` | `string` | +| `eventsFetcher` | [`EventsFetcherWithCursor`](../modules/shared_yagna_event_reader#eventsfetcherwithcursor)\<`T`\> | + +#### Returns + +[`CancellablePoll`](../modules/shared_yagna_event_reader#cancellablepoll)\<`T`\> + +#### Defined in + +[src/shared/yagna/event-reader.ts:40](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/event-reader.ts#L40) diff --git a/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_activity_repository.ActivityRepository.md b/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_activity_repository.ActivityRepository.md new file mode 100644 index 000000000..8b66b6aa9 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_activity_repository.ActivityRepository.md @@ -0,0 +1,93 @@ +--- +title: "Class ActivityRepository" +pageTitle: "Class ActivityRepository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class ActivityRepository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: ActivityRepository + +[shared/yagna/repository/activity-repository](../modules/shared_yagna_repository_activity_repository).ActivityRepository + +## Implements + +- [`IActivityRepository`](../interfaces/activity_activity.IActivityRepository) + +## Table of contents + +### Constructors + +- [constructor](shared_yagna_repository_activity_repository.ActivityRepository#constructor) + +### Methods + +- [getById](shared_yagna_repository_activity_repository.ActivityRepository#getbyid) +- [getStateOfActivity](shared_yagna_repository_activity_repository.ActivityRepository#getstateofactivity) + +## Constructors + +### constructor + +• **new ActivityRepository**(`state`, `agreementRepo`): [`ActivityRepository`](shared_yagna_repository_activity_repository.ActivityRepository) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `state` | `RequestorStateService` | +| `agreementRepo` | [`IAgreementRepository`](../interfaces/market_agreement_agreement.IAgreementRepository) | + +#### Returns + +[`ActivityRepository`](shared_yagna_repository_activity_repository.ActivityRepository) + +#### Defined in + +[src/shared/yagna/repository/activity-repository.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/activity-repository.ts#L11) + +## Methods + +### getById + +▸ **getById**(`id`): `Promise`\<[`Activity`](activity_activity.Activity)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Activity`](activity_activity.Activity)\> + +#### Implementation of + +[IActivityRepository](../interfaces/activity_activity.IActivityRepository).[getById](../interfaces/activity_activity.IActivityRepository#getbyid) + +#### Defined in + +[src/shared/yagna/repository/activity-repository.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/activity-repository.ts#L16) + +___ + +### getStateOfActivity + +▸ **getStateOfActivity**(`id`): `Promise`\<[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum)\> + +#### Implementation of + +[IActivityRepository](../interfaces/activity_activity.IActivityRepository).[getStateOfActivity](../interfaces/activity_activity.IActivityRepository#getstateofactivity) + +#### Defined in + +[src/shared/yagna/repository/activity-repository.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/activity-repository.ts#L38) diff --git a/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_agreement_repository.AgreementRepository.md b/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_agreement_repository.AgreementRepository.md new file mode 100644 index 000000000..7d7c8cca0 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_agreement_repository.AgreementRepository.md @@ -0,0 +1,68 @@ +--- +title: "Class AgreementRepository" +pageTitle: "Class AgreementRepository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class AgreementRepository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: AgreementRepository + +[shared/yagna/repository/agreement-repository](../modules/shared_yagna_repository_agreement_repository).AgreementRepository + +## Implements + +- [`IAgreementRepository`](../interfaces/market_agreement_agreement.IAgreementRepository) + +## Table of contents + +### Constructors + +- [constructor](shared_yagna_repository_agreement_repository.AgreementRepository#constructor) + +### Methods + +- [getById](shared_yagna_repository_agreement_repository.AgreementRepository#getbyid) + +## Constructors + +### constructor + +• **new AgreementRepository**(`api`, `demandRepo`): [`AgreementRepository`](shared_yagna_repository_agreement_repository.AgreementRepository) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `api` | `RequestorService` | +| `demandRepo` | [`IDemandRepository`](../interfaces/market_demand_demand.IDemandRepository) | + +#### Returns + +[`AgreementRepository`](shared_yagna_repository_agreement_repository.AgreementRepository) + +#### Defined in + +[src/shared/yagna/repository/agreement-repository.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/agreement-repository.ts#L9) + +## Methods + +### getById + +▸ **getById**(`id`): `Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Agreement`](market_agreement_agreement.Agreement)\> + +#### Implementation of + +[IAgreementRepository](../interfaces/market_agreement_agreement.IAgreementRepository).[getById](../interfaces/market_agreement_agreement.IAgreementRepository#getbyid) + +#### Defined in + +[src/shared/yagna/repository/agreement-repository.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/agreement-repository.ts#L14) diff --git a/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_debit_note_repository.DebitNoteRepository.md b/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_debit_note_repository.DebitNoteRepository.md new file mode 100644 index 000000000..2067565a6 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_debit_note_repository.DebitNoteRepository.md @@ -0,0 +1,68 @@ +--- +title: "Class DebitNoteRepository" +pageTitle: "Class DebitNoteRepository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class DebitNoteRepository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: DebitNoteRepository + +[shared/yagna/repository/debit-note-repository](../modules/shared_yagna_repository_debit_note_repository).DebitNoteRepository + +## Implements + +- [`IDebitNoteRepository`](../interfaces/payment_debit_note.IDebitNoteRepository) + +## Table of contents + +### Constructors + +- [constructor](shared_yagna_repository_debit_note_repository.DebitNoteRepository#constructor) + +### Methods + +- [getById](shared_yagna_repository_debit_note_repository.DebitNoteRepository#getbyid) + +## Constructors + +### constructor + +• **new DebitNoteRepository**(`paymentClient`, `marketClient`): [`DebitNoteRepository`](shared_yagna_repository_debit_note_repository.DebitNoteRepository) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `paymentClient` | `RequestorService` | +| `marketClient` | `RequestorService` | + +#### Returns + +[`DebitNoteRepository`](shared_yagna_repository_debit_note_repository.DebitNoteRepository) + +#### Defined in + +[src/shared/yagna/repository/debit-note-repository.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/debit-note-repository.ts#L8) + +## Methods + +### getById + +▸ **getById**(`id`): `Promise`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`DebitNote`](payment_debit_note.DebitNote)\> + +#### Implementation of + +[IDebitNoteRepository](../interfaces/payment_debit_note.IDebitNoteRepository).[getById](../interfaces/payment_debit_note.IDebitNoteRepository#getbyid) + +#### Defined in + +[src/shared/yagna/repository/debit-note-repository.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/debit-note-repository.ts#L13) diff --git a/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_demand_repository.DemandRepository.md b/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_demand_repository.DemandRepository.md new file mode 100644 index 000000000..69626a3bd --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_demand_repository.DemandRepository.md @@ -0,0 +1,112 @@ +--- +title: "Class DemandRepository" +pageTitle: "Class DemandRepository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class DemandRepository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: DemandRepository + +[shared/yagna/repository/demand-repository](../modules/shared_yagna_repository_demand_repository).DemandRepository + +## Implements + +- [`IDemandRepository`](../interfaces/market_demand_demand.IDemandRepository) + +## Table of contents + +### Constructors + +- [constructor](shared_yagna_repository_demand_repository.DemandRepository#constructor) + +### Methods + +- [getById](shared_yagna_repository_demand_repository.DemandRepository#getbyid) +- [add](shared_yagna_repository_demand_repository.DemandRepository#add) +- [getAll](shared_yagna_repository_demand_repository.DemandRepository#getall) + +## Constructors + +### constructor + +• **new DemandRepository**(`api`, `cache`): [`DemandRepository`](shared_yagna_repository_demand_repository.DemandRepository) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `api` | `RequestorService` | +| `cache` | [`CacheService`](shared_cache_CacheService.CacheService)\<[`Demand`](market_demand_demand.Demand)\> | + +#### Returns + +[`DemandRepository`](shared_yagna_repository_demand_repository.DemandRepository) + +#### Defined in + +[src/shared/yagna/repository/demand-repository.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/demand-repository.ts#L6) + +## Methods + +### getById + +▸ **getById**(`id`): `undefined` \| [`Demand`](market_demand_demand.Demand) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`undefined` \| [`Demand`](market_demand_demand.Demand) + +#### Implementation of + +[IDemandRepository](../interfaces/market_demand_demand.IDemandRepository).[getById](../interfaces/market_demand_demand.IDemandRepository#getbyid) + +#### Defined in + +[src/shared/yagna/repository/demand-repository.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/demand-repository.ts#L11) + +___ + +### add + +▸ **add**(`demand`): [`Demand`](market_demand_demand.Demand) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demand` | [`Demand`](market_demand_demand.Demand) | + +#### Returns + +[`Demand`](market_demand_demand.Demand) + +#### Implementation of + +[IDemandRepository](../interfaces/market_demand_demand.IDemandRepository).[add](../interfaces/market_demand_demand.IDemandRepository#add) + +#### Defined in + +[src/shared/yagna/repository/demand-repository.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/demand-repository.ts#L15) + +___ + +### getAll + +▸ **getAll**(): [`Demand`](market_demand_demand.Demand)[] + +#### Returns + +[`Demand`](market_demand_demand.Demand)[] + +#### Implementation of + +[IDemandRepository](../interfaces/market_demand_demand.IDemandRepository).[getAll](../interfaces/market_demand_demand.IDemandRepository#getall) + +#### Defined in + +[src/shared/yagna/repository/demand-repository.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/demand-repository.ts#L20) diff --git a/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_invoice_repository.InvoiceRepository.md b/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_invoice_repository.InvoiceRepository.md new file mode 100644 index 000000000..2ba2c57c7 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_invoice_repository.InvoiceRepository.md @@ -0,0 +1,68 @@ +--- +title: "Class InvoiceRepository" +pageTitle: "Class InvoiceRepository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class InvoiceRepository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: InvoiceRepository + +[shared/yagna/repository/invoice-repository](../modules/shared_yagna_repository_invoice_repository).InvoiceRepository + +## Implements + +- [`IInvoiceRepository`](../interfaces/payment_invoice.IInvoiceRepository) + +## Table of contents + +### Constructors + +- [constructor](shared_yagna_repository_invoice_repository.InvoiceRepository#constructor) + +### Methods + +- [getById](shared_yagna_repository_invoice_repository.InvoiceRepository#getbyid) + +## Constructors + +### constructor + +• **new InvoiceRepository**(`paymentClient`, `marketClient`): [`InvoiceRepository`](shared_yagna_repository_invoice_repository.InvoiceRepository) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `paymentClient` | `RequestorService` | +| `marketClient` | `RequestorService` | + +#### Returns + +[`InvoiceRepository`](shared_yagna_repository_invoice_repository.InvoiceRepository) + +#### Defined in + +[src/shared/yagna/repository/invoice-repository.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/invoice-repository.ts#L8) + +## Methods + +### getById + +▸ **getById**(`id`): `Promise`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Invoice`](payment_invoice.Invoice)\> + +#### Implementation of + +[IInvoiceRepository](../interfaces/payment_invoice.IInvoiceRepository).[getById](../interfaces/payment_invoice.IInvoiceRepository#getbyid) + +#### Defined in + +[src/shared/yagna/repository/invoice-repository.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/invoice-repository.ts#L13) diff --git a/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_proposal_repository.ProposalRepository.md b/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_proposal_repository.ProposalRepository.md new file mode 100644 index 000000000..259e94741 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_yagna_repository_proposal_repository.ProposalRepository.md @@ -0,0 +1,120 @@ +--- +title: "Class ProposalRepository" +pageTitle: "Class ProposalRepository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class ProposalRepository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: ProposalRepository + +[shared/yagna/repository/proposal-repository](../modules/shared_yagna_repository_proposal_repository).ProposalRepository + +## Implements + +- [`IProposalRepository`](../interfaces/market_proposal_market_proposal.IProposalRepository) + +## Table of contents + +### Constructors + +- [constructor](shared_yagna_repository_proposal_repository.ProposalRepository#constructor) + +### Methods + +- [add](shared_yagna_repository_proposal_repository.ProposalRepository#add) +- [getById](shared_yagna_repository_proposal_repository.ProposalRepository#getbyid) +- [getByDemandAndId](shared_yagna_repository_proposal_repository.ProposalRepository#getbydemandandid) + +## Constructors + +### constructor + +• **new ProposalRepository**(`marketService`, `identityService`, `cache`): [`ProposalRepository`](shared_yagna_repository_proposal_repository.ProposalRepository) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `marketService` | `RequestorService` | +| `identityService` | `DefaultService` | +| `cache` | [`CacheService`](shared_cache_CacheService.CacheService)\<[`MarketProposal`](market_proposal_market_proposal.MarketProposal)\> | + +#### Returns + +[`ProposalRepository`](shared_yagna_repository_proposal_repository.ProposalRepository) + +#### Defined in + +[src/shared/yagna/repository/proposal-repository.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/proposal-repository.ts#L9) + +## Methods + +### add + +▸ **add**(`proposal`): [`MarketProposal`](market_proposal_market_proposal.MarketProposal) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`MarketProposal`](market_proposal_market_proposal.MarketProposal) | + +#### Returns + +[`MarketProposal`](market_proposal_market_proposal.MarketProposal) + +#### Implementation of + +[IProposalRepository](../interfaces/market_proposal_market_proposal.IProposalRepository).[add](../interfaces/market_proposal_market_proposal.IProposalRepository#add) + +#### Defined in + +[src/shared/yagna/repository/proposal-repository.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/proposal-repository.ts#L15) + +___ + +### getById + +▸ **getById**(`id`): `undefined` \| [`MarketProposal`](market_proposal_market_proposal.MarketProposal) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`undefined` \| [`MarketProposal`](market_proposal_market_proposal.MarketProposal) + +#### Implementation of + +[IProposalRepository](../interfaces/market_proposal_market_proposal.IProposalRepository).[getById](../interfaces/market_proposal_market_proposal.IProposalRepository#getbyid) + +#### Defined in + +[src/shared/yagna/repository/proposal-repository.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/proposal-repository.ts#L20) + +___ + +### getByDemandAndId + +▸ **getByDemandAndId**(`demand`, `id`): `Promise`\<[`MarketProposal`](market_proposal_market_proposal.MarketProposal)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demand` | [`Demand`](market_demand_demand.Demand) | +| `id` | `string` | + +#### Returns + +`Promise`\<[`MarketProposal`](market_proposal_market_proposal.MarketProposal)\> + +#### Implementation of + +[IProposalRepository](../interfaces/market_proposal_market_proposal.IProposalRepository).[getByDemandAndId](../interfaces/market_proposal_market_proposal.IProposalRepository#getbydemandandid) + +#### Defined in + +[src/shared/yagna/repository/proposal-repository.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/repository/proposal-repository.ts#L24) diff --git a/src/pages/docs/golem-js/reference/classes/shared_yagna_yagnaApi.YagnaApi.md b/src/pages/docs/golem-js/reference/classes/shared_yagna_yagnaApi.YagnaApi.md new file mode 100644 index 000000000..52a103bb8 --- /dev/null +++ b/src/pages/docs/golem-js/reference/classes/shared_yagna_yagnaApi.YagnaApi.md @@ -0,0 +1,260 @@ +--- +title: "Class YagnaApi" +pageTitle: "Class YagnaApi - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Class YagnaApi within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Class: YagnaApi + +[shared/yagna/yagnaApi](../modules/shared_yagna_yagnaApi).YagnaApi + +Utility class that groups various Yagna APIs under a single wrapper + +This class has the following responsibilities: + +- selectively exposes services from ya-ts-client in a more user-friendly manner +- implements an event reader that collects events from Yagna endpoints and allows subscribing to them as Observables + for agreements, debit notes and invoices. These observables emit ya-ts-client types on outputs + +End users of the SDK should not use this class and make use of [golem-network/golem-network.GolemNetwork](golem_network_golem_network.GolemNetwork) instead. This class is designed for +SDK developers to use. + +## Table of contents + +### Constructors + +- [constructor](shared_yagna_yagnaApi.YagnaApi#constructor) + +### Properties + +- [appSessionId](shared_yagna_yagnaApi.YagnaApi#appsessionid) +- [yagnaOptions](shared_yagna_yagnaApi.YagnaApi#yagnaoptions) +- [basePath](shared_yagna_yagnaApi.YagnaApi#basepath) +- [identity](shared_yagna_yagnaApi.YagnaApi#identity) +- [market](shared_yagna_yagnaApi.YagnaApi#market) +- [activity](shared_yagna_yagnaApi.YagnaApi#activity) +- [net](shared_yagna_yagnaApi.YagnaApi#net) +- [payment](shared_yagna_yagnaApi.YagnaApi#payment) +- [gsb](shared_yagna_yagnaApi.YagnaApi#gsb) +- [version](shared_yagna_yagnaApi.YagnaApi#version) +- [debitNoteEvents$](shared_yagna_yagnaApi.YagnaApi#debitnoteevents$) +- [invoiceEvents$](shared_yagna_yagnaApi.YagnaApi#invoiceevents$) +- [agreementEvents$](shared_yagna_yagnaApi.YagnaApi#agreementevents$) + +### Methods + +- [connect](shared_yagna_yagnaApi.YagnaApi#connect) +- [disconnect](shared_yagna_yagnaApi.YagnaApi#disconnect) +- [getVersion](shared_yagna_yagnaApi.YagnaApi#getversion) + +## Constructors + +### constructor + +• **new YagnaApi**(`options?`): [`YagnaApi`](shared_yagna_yagnaApi.YagnaApi) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | [`YagnaOptions`](../modules/shared_yagna_yagnaApi#yagnaoptions) | + +#### Returns + +[`YagnaApi`](shared_yagna_yagnaApi.YagnaApi) + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:85](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L85) + +## Properties + +### appSessionId + +• `Readonly` **appSessionId**: `string` + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:51](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L51) + +___ + +### yagnaOptions + +• `Readonly` **yagnaOptions**: [`YagnaOptions`](../modules/shared_yagna_yagnaApi#yagnaoptions) + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:53](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L53) + +___ + +### basePath + +• `Readonly` **basePath**: `string` + +Base path used to build paths to Yagna's API + +**`Example`** + +```ts +http://localhost:7465 +``` + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:59](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L59) + +___ + +### identity + +• `Readonly` **identity**: `DefaultService` + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:61](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L61) + +___ + +### market + +• **market**: `RequestorService` + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:62](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L62) + +___ + +### activity + +• **activity**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `control` | `RequestorControlService` | +| `state` | `RequestorStateService` | +| `exec` | [`YagnaExeScriptObserver`](../interfaces/shared_yagna_yagnaApi.YagnaExeScriptObserver) | + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:63](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L63) + +___ + +### net + +• **net**: `RequestorService` + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:68](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L68) + +___ + +### payment + +• **payment**: `RequestorService` + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:69](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L69) + +___ + +### gsb + +• **gsb**: `RequestorService` + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:70](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L70) + +___ + +### version + +• **version**: `DefaultService` + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:71](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L71) + +___ + +### debitNoteEvents$ + +• **debitNoteEvents$**: `Subject`\<{}\> + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:73](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L73) + +___ + +### invoiceEvents$ + +• **invoiceEvents$**: `Subject`\<{}\> + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:76](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L76) + +___ + +### agreementEvents$ + +• **agreementEvents$**: `Subject`\<{} & {}\> + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:79](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L79) + +## Methods + +### connect + +▸ **connect**(): `Promise`\<{}\> + +Effectively starts the Yagna API client including subscribing to events exposed via rxjs subjects + +#### Returns + +`Promise`\<{}\> + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:181](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L181) + +___ + +### disconnect + +▸ **disconnect**(): `Promise`\<`void`\> + +Terminates the Yagna API related activities + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:196](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L196) + +___ + +### getVersion + +▸ **getVersion**(): `Promise`\<`string`\> + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:202](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L202) diff --git a/src/pages/docs/golem-js/reference/classes/storage_gftp.GftpStorageProvider.md b/src/pages/docs/golem-js/reference/classes/storage_gftp.GftpStorageProvider.md deleted file mode 100644 index a759ea814..000000000 --- a/src/pages/docs/golem-js/reference/classes/storage_gftp.GftpStorageProvider.md +++ /dev/null @@ -1,222 +0,0 @@ ---- -title: "Class GftpStorageProvider" -pageTitle: "Class GftpStorageProvider - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class GftpStorageProvider within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: GftpStorageProvider - -[storage/gftp](../modules/storage_gftp).GftpStorageProvider - -## Implements - -- [`StorageProvider`](../interfaces/storage_provider.StorageProvider) - -## Table of contents - -### Constructors - -- [constructor](storage_gftp.GftpStorageProvider#constructor) - -### Methods - -- [init](storage_gftp.GftpStorageProvider#init) -- [isInitiated](storage_gftp.GftpStorageProvider#isinitiated) -- [receiveFile](storage_gftp.GftpStorageProvider#receivefile) -- [receiveData](storage_gftp.GftpStorageProvider#receivedata) -- [publishFile](storage_gftp.GftpStorageProvider#publishfile) -- [publishData](storage_gftp.GftpStorageProvider#publishdata) -- [release](storage_gftp.GftpStorageProvider#release) -- [close](storage_gftp.GftpStorageProvider#close) - -## Constructors - -### constructor - -• **new GftpStorageProvider**(`logger?`): [`GftpStorageProvider`](storage_gftp.GftpStorageProvider) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `logger?` | [`Logger`](../interfaces/utils_logger_logger.Logger) | - -#### Returns - -[`GftpStorageProvider`](storage_gftp.GftpStorageProvider) - -#### Defined in - -[src/storage/gftp.ts:26](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/gftp.ts#L26) - -## Methods - -### init - -▸ **init**(): `Promise`\<`void`\> - -Initialize storage provider. - -#### Returns - -`Promise`\<`void`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[init](../interfaces/storage_provider.StorageProvider#init) - -#### Defined in - -[src/storage/gftp.ts:33](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/gftp.ts#L33) - -___ - -### isInitiated - -▸ **isInitiated**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/storage/gftp.ts:66](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/gftp.ts#L66) - -___ - -### receiveFile - -▸ **receiveFile**(`path`): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of a file to be downloaded. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `path` | `string` | - -#### Returns - -`Promise`\<`string`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[receiveFile](../interfaces/storage_provider.StorageProvider#receivefile) - -#### Defined in - -[src/storage/gftp.ts:78](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/gftp.ts#L78) - -___ - -### receiveData - -▸ **receiveData**(): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of a file to be downloaded. - -#### Returns - -`Promise`\<`string`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[receiveData](../interfaces/storage_provider.StorageProvider#receivedata) - -#### Defined in - -[src/storage/gftp.ts:83](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/gftp.ts#L83) - -___ - -### publishFile - -▸ **publishFile**(`src`): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of a file to be uploaded. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `src` | `string` | - -#### Returns - -`Promise`\<`string`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[publishFile](../interfaces/storage_provider.StorageProvider#publishfile) - -#### Defined in - -[src/storage/gftp.ts:87](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/gftp.ts#L87) - -___ - -### publishData - -▸ **publishData**(`src`): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of data to be uploaded. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `src` | `Uint8Array` | - -#### Returns - -`Promise`\<`string`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[publishData](../interfaces/storage_provider.StorageProvider#publishdata) - -#### Defined in - -[src/storage/gftp.ts:93](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/gftp.ts#L93) - -___ - -### release - -▸ **release**(): `Promise`\<`void`\> - -Release previously allocated resource URL from Yagna. - -#### Returns - -`Promise`\<`void`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[release](../interfaces/storage_provider.StorageProvider#release) - -#### Defined in - -[src/storage/gftp.ts:105](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/gftp.ts#L105) - -___ - -### close - -▸ **close**(): `Promise`\<`void`\> - -Close storage provider and release all resources. - -#### Returns - -`Promise`\<`void`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[close](../interfaces/storage_provider.StorageProvider#close) - -#### Defined in - -[src/storage/gftp.ts:119](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/gftp.ts#L119) diff --git a/src/pages/docs/golem-js/reference/classes/storage_null.NullStorageProvider.md b/src/pages/docs/golem-js/reference/classes/storage_null.NullStorageProvider.md deleted file mode 100644 index 63d734811..000000000 --- a/src/pages/docs/golem-js/reference/classes/storage_null.NullStorageProvider.md +++ /dev/null @@ -1,216 +0,0 @@ ---- -title: "Class NullStorageProvider" -pageTitle: "Class NullStorageProvider - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class NullStorageProvider within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: NullStorageProvider - -[storage/null](../modules/storage_null).NullStorageProvider - -Null Storage Provider. - -Blocks all storage operations. Any attempt to use storage will result in an error. - -This will be the default storage provider if no default storage provider is available -for the platform the SDK is running on. - -## Implements - -- [`StorageProvider`](../interfaces/storage_provider.StorageProvider) - -## Table of contents - -### Constructors - -- [constructor](storage_null.NullStorageProvider#constructor) - -### Methods - -- [close](storage_null.NullStorageProvider#close) -- [init](storage_null.NullStorageProvider#init) -- [publishData](storage_null.NullStorageProvider#publishdata) -- [publishFile](storage_null.NullStorageProvider#publishfile) -- [receiveFile](storage_null.NullStorageProvider#receivefile) -- [receiveData](storage_null.NullStorageProvider#receivedata) -- [release](storage_null.NullStorageProvider#release) - -## Constructors - -### constructor - -• **new NullStorageProvider**(): [`NullStorageProvider`](storage_null.NullStorageProvider) - -#### Returns - -[`NullStorageProvider`](storage_null.NullStorageProvider) - -## Methods - -### close - -▸ **close**(): `Promise`\<`void`\> - -Close storage provider and release all resources. - -#### Returns - -`Promise`\<`void`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[close](../interfaces/storage_provider.StorageProvider#close) - -#### Defined in - -[src/storage/null.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/null.ts#L15) - -___ - -### init - -▸ **init**(): `Promise`\<`void`\> - -Initialize storage provider. - -#### Returns - -`Promise`\<`void`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[init](../interfaces/storage_provider.StorageProvider#init) - -#### Defined in - -[src/storage/null.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/null.ts#L19) - -___ - -### publishData - -▸ **publishData**(`src`): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of data to be uploaded. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `src` | `Uint8Array` | - -#### Returns - -`Promise`\<`string`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[publishData](../interfaces/storage_provider.StorageProvider#publishdata) - -#### Defined in - -[src/storage/null.ts:24](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/null.ts#L24) - -___ - -### publishFile - -▸ **publishFile**(`src`): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of a file to be uploaded. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `src` | `string` | - -#### Returns - -`Promise`\<`string`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[publishFile](../interfaces/storage_provider.StorageProvider#publishfile) - -#### Defined in - -[src/storage/null.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/null.ts#L29) - -___ - -### receiveFile - -▸ **receiveFile**(`path`): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of a file to be downloaded. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `path` | `string` | - -#### Returns - -`Promise`\<`string`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[receiveFile](../interfaces/storage_provider.StorageProvider#receivefile) - -#### Defined in - -[src/storage/null.ts:34](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/null.ts#L34) - -___ - -### receiveData - -▸ **receiveData**(`callback`): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of a file to be downloaded. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `callback` | [`StorageProviderDataCallback`](../modules/storage_provider#storageproviderdatacallback) | - -#### Returns - -`Promise`\<`string`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[receiveData](../interfaces/storage_provider.StorageProvider#receivedata) - -#### Defined in - -[src/storage/null.ts:39](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/null.ts#L39) - -___ - -### release - -▸ **release**(`urls`): `Promise`\<`void`\> - -Release previously allocated resource URL from Yagna. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `urls` | `string`[] | - -#### Returns - -`Promise`\<`void`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[release](../interfaces/storage_provider.StorageProvider#release) - -#### Defined in - -[src/storage/null.ts:44](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/null.ts#L44) diff --git a/src/pages/docs/golem-js/reference/classes/storage_ws_browser.WebSocketBrowserStorageProvider.md b/src/pages/docs/golem-js/reference/classes/storage_ws_browser.WebSocketBrowserStorageProvider.md deleted file mode 100644 index 66865a87a..000000000 --- a/src/pages/docs/golem-js/reference/classes/storage_ws_browser.WebSocketBrowserStorageProvider.md +++ /dev/null @@ -1,210 +0,0 @@ ---- -title: "Class WebSocketBrowserStorageProvider" -pageTitle: "Class WebSocketBrowserStorageProvider - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class WebSocketBrowserStorageProvider within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: WebSocketBrowserStorageProvider - -[storage/ws-browser](../modules/storage_ws_browser).WebSocketBrowserStorageProvider - -Storage provider that uses GFTP over WebSockets. - -## Implements - -- [`StorageProvider`](../interfaces/storage_provider.StorageProvider) - -## Table of contents - -### Constructors - -- [constructor](storage_ws_browser.WebSocketBrowserStorageProvider#constructor) - -### Methods - -- [close](storage_ws_browser.WebSocketBrowserStorageProvider#close) -- [init](storage_ws_browser.WebSocketBrowserStorageProvider#init) -- [publishData](storage_ws_browser.WebSocketBrowserStorageProvider#publishdata) -- [publishFile](storage_ws_browser.WebSocketBrowserStorageProvider#publishfile) -- [receiveData](storage_ws_browser.WebSocketBrowserStorageProvider#receivedata) -- [receiveFile](storage_ws_browser.WebSocketBrowserStorageProvider#receivefile) -- [release](storage_ws_browser.WebSocketBrowserStorageProvider#release) - -## Constructors - -### constructor - -• **new WebSocketBrowserStorageProvider**(`yagnaApi`, `options`): [`WebSocketBrowserStorageProvider`](storage_ws_browser.WebSocketBrowserStorageProvider) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `yagnaApi` | [`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi) | -| `options` | [`WebSocketStorageProviderOptions`](../interfaces/storage_ws_browser.WebSocketStorageProviderOptions) | - -#### Returns - -[`WebSocketBrowserStorageProvider`](storage_ws_browser.WebSocketBrowserStorageProvider) - -#### Defined in - -[src/storage/ws-browser.ts:62](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/ws-browser.ts#L62) - -## Methods - -### close - -▸ **close**(): `Promise`\<`void`\> - -Close storage provider and release all resources. - -#### Returns - -`Promise`\<`void`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[close](../interfaces/storage_provider.StorageProvider#close) - -#### Defined in - -[src/storage/ws-browser.ts:69](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/ws-browser.ts#L69) - -___ - -### init - -▸ **init**(): `Promise`\<`void`\> - -Initialize storage provider. - -#### Returns - -`Promise`\<`void`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[init](../interfaces/storage_provider.StorageProvider#init) - -#### Defined in - -[src/storage/ws-browser.ts:73](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/ws-browser.ts#L73) - -___ - -### publishData - -▸ **publishData**(`data`): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of data to be uploaded. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Uint8Array` | - -#### Returns - -`Promise`\<`string`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[publishData](../interfaces/storage_provider.StorageProvider#publishdata) - -#### Defined in - -[src/storage/ws-browser.ts:77](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/ws-browser.ts#L77) - -___ - -### publishFile - -▸ **publishFile**(): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of a file to be uploaded. - -#### Returns - -`Promise`\<`string`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[publishFile](../interfaces/storage_provider.StorageProvider#publishfile) - -#### Defined in - -[src/storage/ws-browser.ts:102](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/ws-browser.ts#L102) - -___ - -### receiveData - -▸ **receiveData**(`callback`): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of a file to be downloaded. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `callback` | [`StorageProviderDataCallback`](../modules/storage_provider#storageproviderdatacallback) | - -#### Returns - -`Promise`\<`string`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[receiveData](../interfaces/storage_provider.StorageProvider#receivedata) - -#### Defined in - -[src/storage/ws-browser.ts:106](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/ws-browser.ts#L106) - -___ - -### receiveFile - -▸ **receiveFile**(): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of a file to be downloaded. - -#### Returns - -`Promise`\<`string`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[receiveFile](../interfaces/storage_provider.StorageProvider#receivefile) - -#### Defined in - -[src/storage/ws-browser.ts:132](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/ws-browser.ts#L132) - -___ - -### release - -▸ **release**(`urls`): `Promise`\<`void`\> - -Release previously allocated resource URL from Yagna. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `urls` | `string`[] | - -#### Returns - -`Promise`\<`void`\> - -#### Implementation of - -[StorageProvider](../interfaces/storage_provider.StorageProvider).[release](../interfaces/storage_provider.StorageProvider#release) - -#### Defined in - -[src/storage/ws-browser.ts:136](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/ws-browser.ts#L136) diff --git a/src/pages/docs/golem-js/reference/classes/task_batch.Batch.md b/src/pages/docs/golem-js/reference/classes/task_batch.Batch.md deleted file mode 100644 index 15393d0a8..000000000 --- a/src/pages/docs/golem-js/reference/classes/task_batch.Batch.md +++ /dev/null @@ -1,247 +0,0 @@ ---- -title: "Class Batch" -pageTitle: "Class Batch - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class Batch within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: Batch - -[task/batch](../modules/task_batch).Batch - -## Table of contents - -### Constructors - -- [constructor](task_batch.Batch#constructor) - -### Methods - -- [create](task_batch.Batch#create) -- [run](task_batch.Batch#run) -- [transfer](task_batch.Batch#transfer) -- [uploadFile](task_batch.Batch#uploadfile) -- [uploadJson](task_batch.Batch#uploadjson) -- [uploadData](task_batch.Batch#uploaddata) -- [downloadFile](task_batch.Batch#downloadfile) -- [end](task_batch.Batch#end) -- [endStream](task_batch.Batch#endstream) - -## Constructors - -### constructor - -• **new Batch**(`activity`, `storageProvider`, `logger`): [`Batch`](task_batch.Batch) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `activity` | [`Activity`](activity_activity.Activity) | -| `storageProvider` | [`StorageProvider`](../interfaces/storage_provider.StorageProvider) | -| `logger` | [`Logger`](../interfaces/utils_logger_logger.Logger) | - -#### Returns - -[`Batch`](task_batch.Batch) - -#### Defined in - -[src/task/batch.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/batch.ts#L15) - -## Methods - -### create - -▸ **create**(`activity`, `storageProvider`, `logger?`): [`Batch`](task_batch.Batch) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `activity` | [`Activity`](activity_activity.Activity) | -| `storageProvider` | [`StorageProvider`](../interfaces/storage_provider.StorageProvider) | -| `logger?` | [`Logger`](../interfaces/utils_logger_logger.Logger) | - -#### Returns - -[`Batch`](task_batch.Batch) - -#### Defined in - -[src/task/batch.ts:11](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/batch.ts#L11) - -___ - -### run - -▸ **run**(`commandLine`): [`Batch`](task_batch.Batch) - -Execute a command on provider using a shell (/bin/sh). - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `commandLine` | `string` | Shell command to execute. | - -#### Returns - -[`Batch`](task_batch.Batch) - -#### Defined in - -[src/task/batch.ts:28](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/batch.ts#L28) - -▸ **run**(`executable`, `args`): [`Batch`](task_batch.Batch) - -Execute an executable on provider. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `executable` | `string` | Executable to run. | -| `args` | `string`[] | Executable arguments. | - -#### Returns - -[`Batch`](task_batch.Batch) - -#### Defined in - -[src/task/batch.ts:36](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/batch.ts#L36) - -___ - -### transfer - -▸ **transfer**(`from`, `to`): [`Batch`](task_batch.Batch) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `from` | `string` | -| `to` | `string` | - -#### Returns - -[`Batch`](task_batch.Batch) - -#### Defined in - -[src/task/batch.ts:47](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/batch.ts#L47) - -___ - -### uploadFile - -▸ **uploadFile**(`src`, `dst`): [`Batch`](task_batch.Batch) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `src` | `string` | -| `dst` | `string` | - -#### Returns - -[`Batch`](task_batch.Batch) - -#### Defined in - -[src/task/batch.ts:52](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/batch.ts#L52) - -___ - -### uploadJson - -▸ **uploadJson**(`json`, `dst`): [`Batch`](task_batch.Batch) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `json` | `object` | -| `dst` | `string` | - -#### Returns - -[`Batch`](task_batch.Batch) - -#### Defined in - -[src/task/batch.ts:57](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/batch.ts#L57) - -___ - -### uploadData - -▸ **uploadData**(`data`, `dst`): [`Batch`](task_batch.Batch) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Uint8Array` | -| `dst` | `string` | - -#### Returns - -[`Batch`](task_batch.Batch) - -#### Defined in - -[src/task/batch.ts:63](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/batch.ts#L63) - -___ - -### downloadFile - -▸ **downloadFile**(`src`, `dst`): [`Batch`](task_batch.Batch) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `src` | `string` | -| `dst` | `string` | - -#### Returns - -[`Batch`](task_batch.Batch) - -#### Defined in - -[src/task/batch.ts:68](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/batch.ts#L68) - -___ - -### end - -▸ **end**(): `Promise`\<[`Result`](activity_results.Result)\<`any`\>[]\> - -Executes the batch of commands added via [run](task_batch.Batch#run) returning result for each of the steps. - -#### Returns - -`Promise`\<[`Result`](activity_results.Result)\<`any`\>[]\> - -#### Defined in - -[src/task/batch.ts:76](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/batch.ts#L76) - -___ - -### endStream - -▸ **endStream**(): `Promise`\<`Readable`\> - -#### Returns - -`Promise`\<`Readable`\> - -#### Defined in - -[src/task/batch.ts:141](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/batch.ts#L141) diff --git a/src/pages/docs/golem-js/reference/classes/task_error.GolemWorkError.md b/src/pages/docs/golem-js/reference/classes/task_error.GolemWorkError.md deleted file mode 100644 index ffa8f3180..000000000 --- a/src/pages/docs/golem-js/reference/classes/task_error.GolemWorkError.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: "Class GolemWorkError" -pageTitle: "Class GolemWorkError - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class GolemWorkError within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: GolemWorkError - -[task/error](../modules/task_error).GolemWorkError - -Module specific errors - Market, Work, Payment. -Each of the major modules will have its own domain specific root error type, -additionally containing an error code specific to a given subdomain - -## Hierarchy - -- [`GolemModuleError`](error_golem_error.GolemModuleError) - - ↳ **`GolemWorkError`** - -## Table of contents - -### Constructors - -- [constructor](task_error.GolemWorkError#constructor) - -### Properties - -- [code](task_error.GolemWorkError#code) -- [agreement](task_error.GolemWorkError#agreement) -- [activity](task_error.GolemWorkError#activity) -- [provider](task_error.GolemWorkError#provider) -- [previous](task_error.GolemWorkError#previous) - -## Constructors - -### constructor - -• **new GolemWorkError**(`message`, `code`, `agreement?`, `activity?`, `provider?`, `previous?`): [`GolemWorkError`](task_error.GolemWorkError) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `message` | `string` | -| `code` | [`WorkErrorCode`](../enums/task_error.WorkErrorCode) | -| `agreement?` | `Agreement` | -| `activity?` | [`Activity`](activity_activity.Activity) | -| `provider?` | [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) | -| `previous?` | `Error` | - -#### Returns - -[`GolemWorkError`](task_error.GolemWorkError) - -#### Overrides - -[GolemModuleError](error_golem_error.GolemModuleError).[constructor](error_golem_error.GolemModuleError#constructor) - -#### Defined in - -[src/task/error.ts:20](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L20) - -## Properties - -### code - -• **code**: [`WorkErrorCode`](../enums/task_error.WorkErrorCode) - -#### Inherited from - -[GolemModuleError](error_golem_error.GolemModuleError).[code](error_golem_error.GolemModuleError#code) - -#### Defined in - -[src/task/error.ts:22](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L22) - -___ - -### agreement - -• `Optional` **agreement**: `Agreement` - -#### Defined in - -[src/task/error.ts:23](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L23) - -___ - -### activity - -• `Optional` **activity**: [`Activity`](activity_activity.Activity) - -#### Defined in - -[src/task/error.ts:24](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L24) - -___ - -### provider - -• `Optional` **provider**: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) - -#### Defined in - -[src/task/error.ts:25](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L25) - -___ - -### previous - -• `Optional` **previous**: `Error` - -The previous error, if any, that led to this error. - -#### Inherited from - -[GolemModuleError](error_golem_error.GolemModuleError).[previous](error_golem_error.GolemModuleError#previous) - -#### Defined in - -[src/task/error.ts:26](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L26) diff --git a/src/pages/docs/golem-js/reference/classes/task_task.Task.md b/src/pages/docs/golem-js/reference/classes/task_task.Task.md deleted file mode 100644 index 0f3ca0f74..000000000 --- a/src/pages/docs/golem-js/reference/classes/task_task.Task.md +++ /dev/null @@ -1,416 +0,0 @@ ---- -title: "Class Task" -pageTitle: "Class Task - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class Task within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: Task\ - -[task/task](../modules/task_task).Task - -One computation unit. - -**`Description`** - -Represents one computation unit that will be run on the one provider machine (e.g. rendering of one frame of an animation). - -## Type parameters - -| Name | Type | -| :------ | :------ | -| `OutputType` | `unknown` | - -## Implements - -- `QueueableTask` - -## Table of contents - -### Constructors - -- [constructor](task_task.Task#constructor) - -### Properties - -- [id](task_task.Task#id) - -### Methods - -- [onStateChange](task_task.Task#onstatechange) -- [cleanup](task_task.Task#cleanup) -- [init](task_task.Task#init) -- [start](task_task.Task#start) -- [stop](task_task.Task#stop) -- [isQueueable](task_task.Task#isqueueable) -- [isRetry](task_task.Task#isretry) -- [isDone](task_task.Task#isdone) -- [isFinished](task_task.Task#isfinished) -- [isRejected](task_task.Task#isrejected) -- [isQueued](task_task.Task#isqueued) -- [isPending](task_task.Task#ispending) -- [isNew](task_task.Task#isnew) -- [isFailed](task_task.Task#isfailed) -- [getResults](task_task.Task#getresults) -- [getWorker](task_task.Task#getworker) -- [getActivityReadySetupFunctions](task_task.Task#getactivityreadysetupfunctions) -- [getRetriesCount](task_task.Task#getretriescount) -- [getError](task_task.Task#geterror) -- [getActivity](task_task.Task#getactivity) -- [getNetworkNode](task_task.Task#getnetworknode) - -## Constructors - -### constructor - -• **new Task**\<`OutputType`\>(`id`, `worker`, `options?`): [`Task`](task_task.Task)\<`OutputType`\> - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `OutputType` | `unknown` | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `worker` | [`Worker`](../modules/task_work#worker)\<`OutputType`\> | -| `options?` | [`TaskOptions`](../modules/task_task#taskoptions) | - -#### Returns - -[`Task`](task_task.Task)\<`OutputType`\> - -#### Defined in - -[src/task/task.ts:48](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L48) - -## Properties - -### id - -• `Readonly` **id**: `string` - -#### Defined in - -[src/task/task.ts:49](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L49) - -## Methods - -### onStateChange - -▸ **onStateChange**(`listener`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `listener` | (`state`: [`TaskState`](../enums/task_task.TaskState)) => `void` | - -#### Returns - -`void` - -#### Defined in - -[src/task/task.ts:61](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L61) - -___ - -### cleanup - -▸ **cleanup**(): `void` - -#### Returns - -`void` - -#### Defined in - -[src/task/task.ts:64](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L64) - -___ - -### init - -▸ **init**(): `void` - -#### Returns - -`void` - -#### Defined in - -[src/task/task.ts:68](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L68) - -___ - -### start - -▸ **start**(`activity`, `networkNode?`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `activity` | [`Activity`](activity_activity.Activity) | -| `networkNode?` | [`NetworkNode`](network_node.NetworkNode) | - -#### Returns - -`void` - -#### Defined in - -[src/task/task.ts:72](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L72) - -___ - -### stop - -▸ **stop**(`results?`, `error?`, `retry?`): `void` - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `results?` | `OutputType` | `undefined` | -| `error?` | `Error` | `undefined` | -| `retry` | `boolean` | `true` | - -#### Returns - -`void` - -#### Defined in - -[src/task/task.ts:82](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L82) - -___ - -### isQueueable - -▸ **isQueueable**(): `boolean` - -#### Returns - -`boolean` - -#### Implementation of - -QueueableTask.isQueueable - -#### Defined in - -[src/task/task.ts:101](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L101) - -___ - -### isRetry - -▸ **isRetry**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/task/task.ts:104](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L104) - -___ - -### isDone - -▸ **isDone**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/task/task.ts:107](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L107) - -___ - -### isFinished - -▸ **isFinished**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/task/task.ts:110](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L110) - -___ - -### isRejected - -▸ **isRejected**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/task/task.ts:113](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L113) - -___ - -### isQueued - -▸ **isQueued**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/task/task.ts:116](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L116) - -___ - -### isPending - -▸ **isPending**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/task/task.ts:119](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L119) - -___ - -### isNew - -▸ **isNew**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/task/task.ts:122](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L122) - -___ - -### isFailed - -▸ **isFailed**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/task/task.ts:125](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L125) - -___ - -### getResults - -▸ **getResults**(): `undefined` \| `OutputType` - -#### Returns - -`undefined` \| `OutputType` - -#### Defined in - -[src/task/task.ts:128](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L128) - -___ - -### getWorker - -▸ **getWorker**(): [`Worker`](../modules/task_work#worker)\<`OutputType`\> - -#### Returns - -[`Worker`](../modules/task_work#worker)\<`OutputType`\> - -#### Defined in - -[src/task/task.ts:131](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L131) - -___ - -### getActivityReadySetupFunctions - -▸ **getActivityReadySetupFunctions**(): [`Worker`](../modules/task_work#worker)\<`unknown`\>[] - -#### Returns - -[`Worker`](../modules/task_work#worker)\<`unknown`\>[] - -#### Defined in - -[src/task/task.ts:134](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L134) - -___ - -### getRetriesCount - -▸ **getRetriesCount**(): `number` - -#### Returns - -`number` - -#### Defined in - -[src/task/task.ts:137](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L137) - -___ - -### getError - -▸ **getError**(): `undefined` \| `Error` - -#### Returns - -`undefined` \| `Error` - -#### Defined in - -[src/task/task.ts:140](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L140) - -___ - -### getActivity - -▸ **getActivity**(): `undefined` \| [`Activity`](activity_activity.Activity) - -#### Returns - -`undefined` \| [`Activity`](activity_activity.Activity) - -#### Defined in - -[src/task/task.ts:143](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L143) - -___ - -### getNetworkNode - -▸ **getNetworkNode**(): `undefined` \| [`NetworkNode`](network_node.NetworkNode) - -#### Returns - -`undefined` \| [`NetworkNode`](network_node.NetworkNode) - -#### Defined in - -[src/task/task.ts:146](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L146) diff --git a/src/pages/docs/golem-js/reference/classes/task_work.WorkContext.md b/src/pages/docs/golem-js/reference/classes/task_work.WorkContext.md deleted file mode 100644 index bef4b3ae9..000000000 --- a/src/pages/docs/golem-js/reference/classes/task_work.WorkContext.md +++ /dev/null @@ -1,397 +0,0 @@ ---- -title: "Class WorkContext" -pageTitle: "Class WorkContext - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class WorkContext within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: WorkContext - -[task/work](../modules/task_work).WorkContext - -Work Context - -**`Description`** - -## Table of contents - -### Constructors - -- [constructor](task_work.WorkContext#constructor) - -### Properties - -- [provider](task_work.WorkContext#provider) -- [activity](task_work.WorkContext#activity) - -### Methods - -- [before](task_work.WorkContext#before) -- [run](task_work.WorkContext#run) -- [spawn](task_work.WorkContext#spawn) -- [transfer](task_work.WorkContext#transfer) -- [uploadFile](task_work.WorkContext#uploadfile) -- [uploadJson](task_work.WorkContext#uploadjson) -- [uploadData](task_work.WorkContext#uploaddata) -- [downloadFile](task_work.WorkContext#downloadfile) -- [downloadData](task_work.WorkContext#downloaddata) -- [downloadJson](task_work.WorkContext#downloadjson) -- [beginBatch](task_work.WorkContext#beginbatch) -- [getWebsocketUri](task_work.WorkContext#getwebsocketuri) -- [getIp](task_work.WorkContext#getip) -- [getState](task_work.WorkContext#getstate) - -## Constructors - -### constructor - -• **new WorkContext**(`activity`, `options?`): [`WorkContext`](task_work.WorkContext) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `activity` | [`Activity`](activity_activity.Activity) | -| `options?` | [`WorkOptions`](../interfaces/task_work.WorkOptions) | - -#### Returns - -[`WorkContext`](task_work.WorkContext) - -#### Defined in - -[src/task/work.ts:59](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L59) - -## Properties - -### provider - -• `Readonly` **provider**: [`ProviderInfo`](../interfaces/agreement_agreement.ProviderInfo) - -#### Defined in - -[src/task/work.ts:52](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L52) - -___ - -### activity - -• `Readonly` **activity**: [`Activity`](activity_activity.Activity) - -#### Defined in - -[src/task/work.ts:60](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L60) - -## Methods - -### before - -▸ **before**(): `Promise`\<`void` \| [`Result`](activity_results.Result)\<`any`\>[]\> - -#### Returns - -`Promise`\<`void` \| [`Result`](activity_results.Result)\<`any`\>[]\> - -#### Defined in - -[src/task/work.ts:70](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L70) - -___ - -### run - -▸ **run**(`commandLine`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -Execute a command on provider using a shell (/bin/sh). - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `commandLine` | `string` | Shell command to execute. | -| `options?` | [`CommandOptions`](../interfaces/task_work.CommandOptions) | Additional run options. | - -#### Returns - -`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Defined in - -[src/task/work.ts:167](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L167) - -▸ **run**(`executable`, `args`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -Execute an executable on provider. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `executable` | `string` | Executable to run. | -| `args` | `string`[] | Executable arguments. | -| `options?` | [`CommandOptions`](../interfaces/task_work.CommandOptions) | Additional run options. | - -#### Returns - -`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Defined in - -[src/task/work.ts:176](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L176) - -___ - -### spawn - -▸ **spawn**(`commandLine`, `options?`): `Promise`\<[`RemoteProcess`](task_process.RemoteProcess)\> - -Spawn an executable on provider and return [RemoteProcess](task_process.RemoteProcess) object -that contain stdout and stderr as Readable - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `commandLine` | `string` | Shell command to execute. | -| `options?` | `Omit`\<[`CommandOptions`](../interfaces/task_work.CommandOptions), ``"capture"``\> | Additional run options. | - -#### Returns - -`Promise`\<[`RemoteProcess`](task_process.RemoteProcess)\> - -#### Defined in - -[src/task/work.ts:200](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L200) - -▸ **spawn**(`executable`, `args`, `options?`): `Promise`\<[`RemoteProcess`](task_process.RemoteProcess)\> - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `executable` | `string` | Executable to run. | -| `args` | `string`[] | Executable arguments. | -| `options?` | [`CommandOptions`](../interfaces/task_work.CommandOptions) | Additional run options. | - -#### Returns - -`Promise`\<[`RemoteProcess`](task_process.RemoteProcess)\> - -#### Defined in - -[src/task/work.ts:206](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L206) - -___ - -### transfer - -▸ **transfer**(`from`, `to`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -Generic transfer command, requires the user to provide a publicly readable transfer source - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `from` | `string` | publicly available resource for reading. Supported protocols: file, http, ftp or gftp | -| `to` | `string` | file path | -| `options?` | [`CommandOptions`](../interfaces/task_work.CommandOptions) | Additional run options. | - -#### Returns - -`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Defined in - -[src/task/work.ts:247](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L247) - -___ - -### uploadFile - -▸ **uploadFile**(`src`, `dst`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `src` | `string` | -| `dst` | `string` | -| `options?` | [`CommandOptions`](../interfaces/task_work.CommandOptions) | - -#### Returns - -`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Defined in - -[src/task/work.ts:252](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L252) - -___ - -### uploadJson - -▸ **uploadJson**(`json`, `dst`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `json` | `any` | -| `dst` | `string` | -| `options?` | [`CommandOptions`](../interfaces/task_work.CommandOptions) | - -#### Returns - -`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Defined in - -[src/task/work.ts:258](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L258) - -___ - -### uploadData - -▸ **uploadData**(`data`, `dst`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Uint8Array` | -| `dst` | `string` | -| `options?` | [`CommandOptions`](../interfaces/task_work.CommandOptions) | - -#### Returns - -`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Defined in - -[src/task/work.ts:264](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L264) - -___ - -### downloadFile - -▸ **downloadFile**(`src`, `dst`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `src` | `string` | -| `dst` | `string` | -| `options?` | [`CommandOptions`](../interfaces/task_work.CommandOptions) | - -#### Returns - -`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Defined in - -[src/task/work.ts:269](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L269) - -___ - -### downloadData - -▸ **downloadData**(`src`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`Uint8Array`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `src` | `string` | -| `options?` | [`CommandOptions`](../interfaces/task_work.CommandOptions) | - -#### Returns - -`Promise`\<[`Result`](activity_results.Result)\<`Uint8Array`\>\> - -#### Defined in - -[src/task/work.ts:274](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L274) - -___ - -### downloadJson - -▸ **downloadJson**(`src`, `options?`): `Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `src` | `string` | -| `options?` | [`CommandOptions`](../interfaces/task_work.CommandOptions) | - -#### Returns - -`Promise`\<[`Result`](activity_results.Result)\<`any`\>\> - -#### Defined in - -[src/task/work.ts:280](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L280) - -___ - -### beginBatch - -▸ **beginBatch**(): [`Batch`](task_batch.Batch) - -#### Returns - -[`Batch`](task_batch.Batch) - -#### Defined in - -[src/task/work.ts:296](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L296) - -___ - -### getWebsocketUri - -▸ **getWebsocketUri**(`port`): `string` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `port` | `number` | - -#### Returns - -`string` - -#### Defined in - -[src/task/work.ts:300](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L300) - -___ - -### getIp - -▸ **getIp**(): `string` - -#### Returns - -`string` - -#### Defined in - -[src/task/work.ts:312](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L312) - -___ - -### getState - -▸ **getState**(): `Promise`\<[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum)\> - -#### Returns - -`Promise`\<[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum)\> - -#### Defined in - -[src/task/work.ts:324](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L324) diff --git a/src/pages/docs/golem-js/reference/classes/utils_yagna_activity.RequestorApi.md b/src/pages/docs/golem-js/reference/classes/utils_yagna_activity.RequestorApi.md deleted file mode 100644 index 37b671136..000000000 --- a/src/pages/docs/golem-js/reference/classes/utils_yagna_activity.RequestorApi.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: "Class RequestorApi" -pageTitle: "Class RequestorApi - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class RequestorApi within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: RequestorApi - -[utils/yagna/activity](../modules/utils_yagna_activity).RequestorApi - -## Hierarchy - -- `RequestorStateApi` - - ↳ **`RequestorApi`** - -## Table of contents - -### Constructors - -- [constructor](utils_yagna_activity.RequestorApi#constructor) - -### Methods - -- [getActivityAgreementId](utils_yagna_activity.RequestorApi#getactivityagreementid) - -## Constructors - -### constructor - -• **new RequestorApi**(`configuration?`, `basePath?`, `axios?`): [`RequestorApi`](utils_yagna_activity.RequestorApi) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `configuration?` | `Configuration` | -| `basePath?` | `string` | -| `axios?` | `AxiosInstance` | - -#### Returns - -[`RequestorApi`](utils_yagna_activity.RequestorApi) - -#### Inherited from - -RequestorStateApi.constructor - -#### Defined in - -node_modules/ya-ts-client/dist/ya-activity/base.d.ts:43 - -## Methods - -### getActivityAgreementId - -▸ **getActivityAgreementId**(`activityId`): `Promise`\<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `activityId` | `string` | - -#### Returns - -`Promise`\<`string`\> - -#### Defined in - -[src/utils/yagna/activity.ts:6](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/activity.ts#L6) diff --git a/src/pages/docs/golem-js/reference/classes/utils_yagna_gsb.RequestorApi.md b/src/pages/docs/golem-js/reference/classes/utils_yagna_gsb.RequestorApi.md deleted file mode 100644 index ed1587aba..000000000 --- a/src/pages/docs/golem-js/reference/classes/utils_yagna_gsb.RequestorApi.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: "Class RequestorApi" -pageTitle: "Class RequestorApi - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class RequestorApi within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: RequestorApi - -[utils/yagna/gsb](../modules/utils_yagna_gsb).RequestorApi - -## Hierarchy - -- `BaseAPI` - - ↳ **`RequestorApi`** - -## Implements - -- `GsbRequestorApi` - -## Table of contents - -### Constructors - -- [constructor](utils_yagna_gsb.RequestorApi#constructor) - -### Methods - -- [createService](utils_yagna_gsb.RequestorApi#createservice) -- [deleteService](utils_yagna_gsb.RequestorApi#deleteservice) - -## Constructors - -### constructor - -• **new RequestorApi**(`configuration?`, `basePath?`, `axios?`): [`RequestorApi`](utils_yagna_gsb.RequestorApi) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `configuration?` | `Configuration` | -| `basePath?` | `string` | -| `axios?` | `AxiosInstance` | - -#### Returns - -[`RequestorApi`](utils_yagna_gsb.RequestorApi) - -#### Inherited from - -BaseAPI.constructor - -#### Defined in - -node_modules/ya-ts-client/dist/ya-net/base.d.ts:43 - -## Methods - -### createService - -▸ **createService**(`fileInfo`, `components`): `Promise`\<[`ServiceModel`](../modules/utils_yagna_gsb#servicemodel)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `fileInfo` | [`GftpFileInfo`](../modules/utils_yagna_gsb#gftpfileinfo) | -| `components` | `string`[] | - -#### Returns - -`Promise`\<[`ServiceModel`](../modules/utils_yagna_gsb#servicemodel)\> - -#### Implementation of - -GsbRequestorApi.createService - -#### Defined in - -[src/utils/yagna/gsb.ts:21](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/gsb.ts#L21) - -___ - -### deleteService - -▸ **deleteService**(`id`): `Promise`\<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | - -#### Returns - -`Promise`\<`void`\> - -#### Implementation of - -GsbRequestorApi.deleteService - -#### Defined in - -[src/utils/yagna/gsb.ts:45](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/gsb.ts#L45) diff --git a/src/pages/docs/golem-js/reference/classes/utils_yagna_identity.RequestorApi.md b/src/pages/docs/golem-js/reference/classes/utils_yagna_identity.RequestorApi.md deleted file mode 100644 index 334eda0b4..000000000 --- a/src/pages/docs/golem-js/reference/classes/utils_yagna_identity.RequestorApi.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: "Class RequestorApi" -pageTitle: "Class RequestorApi - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class RequestorApi within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: RequestorApi - -[utils/yagna/identity](../modules/utils_yagna_identity).RequestorApi - -## Hierarchy - -- `BaseAPI` - - ↳ **`RequestorApi`** - -## Implements - -- `IdentityRequestorApi` - -## Table of contents - -### Constructors - -- [constructor](utils_yagna_identity.RequestorApi#constructor) - -### Methods - -- [getIdentity](utils_yagna_identity.RequestorApi#getidentity) - -## Constructors - -### constructor - -• **new RequestorApi**(`configuration?`, `basePath?`, `axios?`): [`RequestorApi`](utils_yagna_identity.RequestorApi) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `configuration?` | `Configuration` | -| `basePath?` | `string` | -| `axios?` | `AxiosInstance` | - -#### Returns - -[`RequestorApi`](utils_yagna_identity.RequestorApi) - -#### Inherited from - -BaseAPI.constructor - -#### Defined in - -node_modules/ya-ts-client/dist/ya-net/base.d.ts:43 - -## Methods - -### getIdentity - -▸ **getIdentity**(): `Promise`\<[`IdentityModel`](../interfaces/utils_yagna_identity.IdentityModel)\> - -#### Returns - -`Promise`\<[`IdentityModel`](../interfaces/utils_yagna_identity.IdentityModel)\> - -#### Implementation of - -IdentityRequestorApi.getIdentity - -#### Defined in - -[src/utils/yagna/identity.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/identity.ts#L17) diff --git a/src/pages/docs/golem-js/reference/classes/utils_yagna_yagna.Yagna.md b/src/pages/docs/golem-js/reference/classes/utils_yagna_yagna.Yagna.md deleted file mode 100644 index 051d6c978..000000000 --- a/src/pages/docs/golem-js/reference/classes/utils_yagna_yagna.Yagna.md +++ /dev/null @@ -1,216 +0,0 @@ ---- -title: "Class Yagna" -pageTitle: "Class Yagna - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Class Yagna within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Class: Yagna - -[utils/yagna/yagna](../modules/utils_yagna_yagna).Yagna - -## Table of contents - -### Constructors - -- [constructor](utils_yagna_yagna.Yagna#constructor) - -### Properties - -- [apiKey](utils_yagna_yagna.Yagna#apikey) -- [apiBaseUrl](utils_yagna_yagna.Yagna#apibaseurl) - -### Methods - -- [getApi](utils_yagna_yagna.Yagna#getapi) -- [connect](utils_yagna_yagna.Yagna#connect) -- [end](utils_yagna_yagna.Yagna#end) -- [getVersion](utils_yagna_yagna.Yagna#getversion) -- [createApi](utils_yagna_yagna.Yagna#createapi) -- [getApiConfig](utils_yagna_yagna.Yagna#getapiconfig) -- [getApiUrl](utils_yagna_yagna.Yagna#getapiurl) -- [errorHandler](utils_yagna_yagna.Yagna#errorhandler) -- [addErrorHandler](utils_yagna_yagna.Yagna#adderrorhandler) - -## Constructors - -### constructor - -• **new Yagna**(`options?`): [`Yagna`](utils_yagna_yagna.Yagna) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | [`YagnaOptions`](../modules/utils_yagna_yagna#yagnaoptions) | - -#### Returns - -[`Yagna`](utils_yagna_yagna.Yagna) - -#### Defined in - -[src/utils/yagna/yagna.ts:61](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L61) - -## Properties - -### apiKey - -• `Protected` `Readonly` **apiKey**: `string` - -#### Defined in - -[src/utils/yagna/yagna.ts:57](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L57) - -___ - -### apiBaseUrl - -• `Protected` `Readonly` **apiBaseUrl**: `string` - -#### Defined in - -[src/utils/yagna/yagna.ts:58](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L58) - -## Methods - -### getApi - -▸ **getApi**(): [`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi) - -#### Returns - -[`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi) - -#### Defined in - -[src/utils/yagna/yagna.ts:70](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L70) - -___ - -### connect - -▸ **connect**(): `Promise`\<[`IdentityModel`](../interfaces/utils_yagna_identity.IdentityModel)\> - -#### Returns - -`Promise`\<[`IdentityModel`](../interfaces/utils_yagna_identity.IdentityModel)\> - -#### Defined in - -[src/utils/yagna/yagna.ts:74](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L74) - -___ - -### end - -▸ **end**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[src/utils/yagna/yagna.ts:99](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L99) - -___ - -### getVersion - -▸ **getVersion**(): `Promise`\<`string`\> - -#### Returns - -`Promise`\<`string`\> - -#### Defined in - -[src/utils/yagna/yagna.ts:104](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L104) - -___ - -### createApi - -▸ **createApi**(): [`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi) - -#### Returns - -[`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi) - -#### Defined in - -[src/utils/yagna/yagna.ts:117](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L117) - -___ - -### getApiConfig - -▸ **getApiConfig**(): `Configuration` - -#### Returns - -`Configuration` - -#### Defined in - -[src/utils/yagna/yagna.ts:142](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L142) - -___ - -### getApiUrl - -▸ **getApiUrl**(`apiName?`): `string` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `apiName?` | `string` | - -#### Returns - -`string` - -#### Defined in - -[src/utils/yagna/yagna.ts:153](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L153) - -___ - -### errorHandler - -▸ **errorHandler**(`error`): `Promise`\<`Error`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `error` | `Error` | - -#### Returns - -`Promise`\<`Error`\> - -#### Defined in - -[src/utils/yagna/yagna.ts:157](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L157) - -___ - -### addErrorHandler - -▸ **addErrorHandler**(`api`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `api` | [`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi) | - -#### Returns - -`void` - -#### Defined in - -[src/utils/yagna/yagna.ts:169](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L169) diff --git a/src/pages/docs/golem-js/reference/enums/activity_activity.ActivityStateEnum.md b/src/pages/docs/golem-js/reference/enums/activity_activity.ActivityStateEnum.md index 5c8d68b5d..d28693534 100644 --- a/src/pages/docs/golem-js/reference/enums/activity_activity.ActivityStateEnum.md +++ b/src/pages/docs/golem-js/reference/enums/activity_activity.ActivityStateEnum.md @@ -18,6 +18,7 @@ type: "JS API Reference" - [Ready](activity_activity.ActivityStateEnum#ready) - [Unresponsive](activity_activity.ActivityStateEnum#unresponsive) - [Terminated](activity_activity.ActivityStateEnum#terminated) +- [Unknown](activity_activity.ActivityStateEnum#unknown) ## Enumeration Members @@ -27,7 +28,7 @@ type: "JS API Reference" #### Defined in -[src/activity/activity.ts:14](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L14) +[src/activity/activity.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L4) ___ @@ -37,7 +38,7 @@ ___ #### Defined in -[src/activity/activity.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L15) +[src/activity/activity.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L5) ___ @@ -47,7 +48,7 @@ ___ #### Defined in -[src/activity/activity.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L16) +[src/activity/activity.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L6) ___ @@ -57,7 +58,7 @@ ___ #### Defined in -[src/activity/activity.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L17) +[src/activity/activity.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L7) ___ @@ -67,7 +68,7 @@ ___ #### Defined in -[src/activity/activity.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L18) +[src/activity/activity.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L8) ___ @@ -77,4 +78,16 @@ ___ #### Defined in -[src/activity/activity.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L19) +[src/activity/activity.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L9) + +___ + +### Unknown + +• **Unknown** = ``"Unknown"`` + +In case when we couldn't establish the in on yagna + +#### Defined in + +[src/activity/activity.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L11) diff --git a/src/pages/docs/golem-js/reference/enums/activity_exe_unit_error.WorkErrorCode.md b/src/pages/docs/golem-js/reference/enums/activity_exe_unit_error.WorkErrorCode.md new file mode 100644 index 000000000..20a7f844f --- /dev/null +++ b/src/pages/docs/golem-js/reference/enums/activity_exe_unit_error.WorkErrorCode.md @@ -0,0 +1,124 @@ +--- +title: "Enum WorkErrorCode" +pageTitle: "Enum WorkErrorCode - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Enum WorkErrorCode within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Enumeration: WorkErrorCode + +[activity/exe-unit/error](../modules/activity_exe_unit_error).WorkErrorCode + +## Table of contents + +### Enumeration Members + +- [ServiceNotInitialized](activity_exe_unit_error.WorkErrorCode#servicenotinitialized) +- [ScriptExecutionFailed](activity_exe_unit_error.WorkErrorCode#scriptexecutionfailed) +- [ActivityDestroyingFailed](activity_exe_unit_error.WorkErrorCode#activitydestroyingfailed) +- [ActivityResultsFetchingFailed](activity_exe_unit_error.WorkErrorCode#activityresultsfetchingfailed) +- [ActivityCreationFailed](activity_exe_unit_error.WorkErrorCode#activitycreationfailed) +- [NetworkSetupMissing](activity_exe_unit_error.WorkErrorCode#networksetupmissing) +- [ScriptInitializationFailed](activity_exe_unit_error.WorkErrorCode#scriptinitializationfailed) +- [ActivityDeploymentFailed](activity_exe_unit_error.WorkErrorCode#activitydeploymentfailed) +- [ActivityStatusQueryFailed](activity_exe_unit_error.WorkErrorCode#activitystatusqueryfailed) +- [ActivityResetFailed](activity_exe_unit_error.WorkErrorCode#activityresetfailed) + +## Enumeration Members + +### ServiceNotInitialized + +• **ServiceNotInitialized** = ``"ServiceNotInitialized"`` + +#### Defined in + +[src/activity/exe-unit/error.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L6) + +___ + +### ScriptExecutionFailed + +• **ScriptExecutionFailed** = ``"ScriptExecutionFailed"`` + +#### Defined in + +[src/activity/exe-unit/error.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L7) + +___ + +### ActivityDestroyingFailed + +• **ActivityDestroyingFailed** = ``"ActivityDestroyingFailed"`` + +#### Defined in + +[src/activity/exe-unit/error.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L8) + +___ + +### ActivityResultsFetchingFailed + +• **ActivityResultsFetchingFailed** = ``"ActivityResultsFetchingFailed"`` + +#### Defined in + +[src/activity/exe-unit/error.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L9) + +___ + +### ActivityCreationFailed + +• **ActivityCreationFailed** = ``"ActivityCreationFailed"`` + +#### Defined in + +[src/activity/exe-unit/error.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L10) + +___ + +### NetworkSetupMissing + +• **NetworkSetupMissing** = ``"NetworkSetupMissing"`` + +#### Defined in + +[src/activity/exe-unit/error.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L11) + +___ + +### ScriptInitializationFailed + +• **ScriptInitializationFailed** = ``"ScriptInitializationFailed"`` + +#### Defined in + +[src/activity/exe-unit/error.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L12) + +___ + +### ActivityDeploymentFailed + +• **ActivityDeploymentFailed** = ``"ActivityDeploymentFailed"`` + +#### Defined in + +[src/activity/exe-unit/error.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L13) + +___ + +### ActivityStatusQueryFailed + +• **ActivityStatusQueryFailed** = ``"ActivityStatusQueryFailed"`` + +#### Defined in + +[src/activity/exe-unit/error.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L14) + +___ + +### ActivityResetFailed + +• **ActivityResetFailed** = ``"ActivityResetFailed"`` + +#### Defined in + +[src/activity/exe-unit/error.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/error.ts#L15) diff --git a/src/pages/docs/golem-js/reference/enums/experimental_deployment_deployment.DeploymentState.md b/src/pages/docs/golem-js/reference/enums/experimental_deployment_deployment.DeploymentState.md new file mode 100644 index 000000000..0caf83b05 --- /dev/null +++ b/src/pages/docs/golem-js/reference/enums/experimental_deployment_deployment.DeploymentState.md @@ -0,0 +1,80 @@ +--- +title: "Enum DeploymentState" +pageTitle: "Enum DeploymentState - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Enum DeploymentState within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Enumeration: DeploymentState + +[experimental/deployment/deployment](../modules/experimental_deployment_deployment).DeploymentState + +## Table of contents + +### Enumeration Members + +- [INITIAL](experimental_deployment_deployment.DeploymentState#initial) +- [STARTING](experimental_deployment_deployment.DeploymentState#starting) +- [READY](experimental_deployment_deployment.DeploymentState#ready) +- [STOPPING](experimental_deployment_deployment.DeploymentState#stopping) +- [STOPPED](experimental_deployment_deployment.DeploymentState#stopped) +- [ERROR](experimental_deployment_deployment.DeploymentState#error) + +## Enumeration Members + +### INITIAL + +• **INITIAL** = ``"INITIAL"`` + +#### Defined in + +[src/experimental/deployment/deployment.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L14) + +___ + +### STARTING + +• **STARTING** = ``"STARTING"`` + +#### Defined in + +[src/experimental/deployment/deployment.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L15) + +___ + +### READY + +• **READY** = ``"READY"`` + +#### Defined in + +[src/experimental/deployment/deployment.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L16) + +___ + +### STOPPING + +• **STOPPING** = ``"STOPPING"`` + +#### Defined in + +[src/experimental/deployment/deployment.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L17) + +___ + +### STOPPED + +• **STOPPED** = ``"STOPPED"`` + +#### Defined in + +[src/experimental/deployment/deployment.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L18) + +___ + +### ERROR + +• **ERROR** = ``"ERROR"`` + +#### Defined in + +[src/experimental/deployment/deployment.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L19) diff --git a/src/pages/docs/golem-js/reference/enums/experimental_job_job.JobState.md b/src/pages/docs/golem-js/reference/enums/experimental_job_job.JobState.md new file mode 100644 index 000000000..5e051a7d8 --- /dev/null +++ b/src/pages/docs/golem-js/reference/enums/experimental_job_job.JobState.md @@ -0,0 +1,80 @@ +--- +title: "Enum JobState" +pageTitle: "Enum JobState - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Enum JobState within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Enumeration: JobState + +[experimental/job/job](../modules/experimental_job_job).JobState + +## Table of contents + +### Enumeration Members + +- [New](experimental_job_job.JobState#new) +- [Queued](experimental_job_job.JobState#queued) +- [Pending](experimental_job_job.JobState#pending) +- [Done](experimental_job_job.JobState#done) +- [Retry](experimental_job_job.JobState#retry) +- [Rejected](experimental_job_job.JobState#rejected) + +## Enumeration Members + +### New + +• **New** = ``"new"`` + +#### Defined in + +[src/experimental/job/job.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L11) + +___ + +### Queued + +• **Queued** = ``"queued"`` + +#### Defined in + +[src/experimental/job/job.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L12) + +___ + +### Pending + +• **Pending** = ``"pending"`` + +#### Defined in + +[src/experimental/job/job.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L13) + +___ + +### Done + +• **Done** = ``"done"`` + +#### Defined in + +[src/experimental/job/job.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L14) + +___ + +### Retry + +• **Retry** = ``"retry"`` + +#### Defined in + +[src/experimental/job/job.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L15) + +___ + +### Rejected + +• **Rejected** = ``"rejected"`` + +#### Defined in + +[src/experimental/job/job.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L16) diff --git a/src/pages/docs/golem-js/reference/enums/market_demand_demand_body_builder.ComparisonOperator.md b/src/pages/docs/golem-js/reference/enums/market_demand_demand_body_builder.ComparisonOperator.md new file mode 100644 index 000000000..25cf49b77 --- /dev/null +++ b/src/pages/docs/golem-js/reference/enums/market_demand_demand_body_builder.ComparisonOperator.md @@ -0,0 +1,69 @@ +--- +title: "Enum ComparisonOperator" +pageTitle: "Enum ComparisonOperator - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Enum ComparisonOperator within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Enumeration: ComparisonOperator + +[market/demand/demand-body-builder](../modules/market_demand_demand_body_builder).ComparisonOperator + +## Table of contents + +### Enumeration Members + +- [Eq](market_demand_demand_body_builder.ComparisonOperator#eq) +- [Lt](market_demand_demand_body_builder.ComparisonOperator#lt) +- [Gt](market_demand_demand_body_builder.ComparisonOperator#gt) +- [GtEq](market_demand_demand_body_builder.ComparisonOperator#gteq) +- [LtEq](market_demand_demand_body_builder.ComparisonOperator#lteq) + +## Enumeration Members + +### Eq + +• **Eq** = ``"="`` + +#### Defined in + +[src/market/demand/demand-body-builder.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand-body-builder.ts#L38) + +___ + +### Lt + +• **Lt** = ``"<"`` + +#### Defined in + +[src/market/demand/demand-body-builder.ts:39](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand-body-builder.ts#L39) + +___ + +### Gt + +• **Gt** = ``">"`` + +#### Defined in + +[src/market/demand/demand-body-builder.ts:40](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand-body-builder.ts#L40) + +___ + +### GtEq + +• **GtEq** = ``">="`` + +#### Defined in + +[src/market/demand/demand-body-builder.ts:41](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand-body-builder.ts#L41) + +___ + +### LtEq + +• **LtEq** = ``"<="`` + +#### Defined in + +[src/market/demand/demand-body-builder.ts:42](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand-body-builder.ts#L42) diff --git a/src/pages/docs/golem-js/reference/enums/market_demand_directors_workload_demand_director_config.PackageFormat.md b/src/pages/docs/golem-js/reference/enums/market_demand_directors_workload_demand_director_config.PackageFormat.md new file mode 100644 index 000000000..d5bf88846 --- /dev/null +++ b/src/pages/docs/golem-js/reference/enums/market_demand_directors_workload_demand_director_config.PackageFormat.md @@ -0,0 +1,25 @@ +--- +title: "Enum PackageFormat" +pageTitle: "Enum PackageFormat - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Enum PackageFormat within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Enumeration: PackageFormat + +[market/demand/directors/workload-demand-director-config](../modules/market_demand_directors_workload_demand_director_config).PackageFormat + +## Table of contents + +### Enumeration Members + +- [GVMKitSquash](market_demand_directors_workload_demand_director_config.PackageFormat#gvmkitsquash) + +## Enumeration Members + +### GVMKitSquash + +• **GVMKitSquash** = ``"gvmkit-squash"`` + +#### Defined in + +[src/market/demand/directors/workload-demand-director-config.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/workload-demand-director-config.ts#L5) diff --git a/src/pages/docs/golem-js/reference/enums/market_error.MarketErrorCode.md b/src/pages/docs/golem-js/reference/enums/market_error.MarketErrorCode.md index d9a0591cc..4593fc2c6 100644 --- a/src/pages/docs/golem-js/reference/enums/market_error.MarketErrorCode.md +++ b/src/pages/docs/golem-js/reference/enums/market_error.MarketErrorCode.md @@ -12,6 +12,8 @@ type: "JS API Reference" ### Enumeration Members +- [CouldNotGetAgreement](market_error.MarketErrorCode#couldnotgetagreement) +- [CouldNotGetProposal](market_error.MarketErrorCode#couldnotgetproposal) - [ServiceNotInitialized](market_error.MarketErrorCode#servicenotinitialized) - [MissingAllocation](market_error.MarketErrorCode#missingallocation) - [SubscriptionFailed](market_error.MarketErrorCode#subscriptionfailed) @@ -19,106 +21,148 @@ type: "JS API Reference" - [ProposalResponseFailed](market_error.MarketErrorCode#proposalresponsefailed) - [ProposalRejectionFailed](market_error.MarketErrorCode#proposalrejectionfailed) - [DemandExpired](market_error.MarketErrorCode#demandexpired) -- [AgreementTerminationFailed](market_error.MarketErrorCode#agreementterminationfailed) -- [AgreementCreationFailed](market_error.MarketErrorCode#agreementcreationfailed) +- [ResourceRentalTerminationFailed](market_error.MarketErrorCode#resourcerentalterminationfailed) +- [ResourceRentalCreationFailed](market_error.MarketErrorCode#resourcerentalcreationfailed) - [AgreementApprovalFailed](market_error.MarketErrorCode#agreementapprovalfailed) +- [NoProposalAvailable](market_error.MarketErrorCode#noproposalavailable) +- [InternalError](market_error.MarketErrorCode#internalerror) ## Enumeration Members +### CouldNotGetAgreement + +• **CouldNotGetAgreement** = ``"CouldNotGetAgreement"`` + +#### Defined in + +[src/market/error.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L4) + +___ + +### CouldNotGetProposal + +• **CouldNotGetProposal** = ``"CouldNotGetProposal"`` + +#### Defined in + +[src/market/error.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L5) + +___ + ### ServiceNotInitialized -• **ServiceNotInitialized** = ``0`` +• **ServiceNotInitialized** = ``"ServiceNotInitialized"`` #### Defined in -[src/market/error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L5) +[src/market/error.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L6) ___ ### MissingAllocation -• **MissingAllocation** = ``1`` +• **MissingAllocation** = ``"MissingAllocation"`` #### Defined in -[src/market/error.ts:6](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L6) +[src/market/error.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L7) ___ ### SubscriptionFailed -• **SubscriptionFailed** = ``2`` +• **SubscriptionFailed** = ``"SubscriptionFailed"`` #### Defined in -[src/market/error.ts:7](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L7) +[src/market/error.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L8) ___ ### InvalidProposal -• **InvalidProposal** = ``3`` +• **InvalidProposal** = ``"InvalidProposal"`` #### Defined in -[src/market/error.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L8) +[src/market/error.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L9) ___ ### ProposalResponseFailed -• **ProposalResponseFailed** = ``4`` +• **ProposalResponseFailed** = ``"ProposalResponseFailed"`` #### Defined in -[src/market/error.ts:9](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L9) +[src/market/error.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L10) ___ ### ProposalRejectionFailed -• **ProposalRejectionFailed** = ``5`` +• **ProposalRejectionFailed** = ``"ProposalRejectionFailed"`` #### Defined in -[src/market/error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L10) +[src/market/error.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L11) ___ ### DemandExpired -• **DemandExpired** = ``6`` +• **DemandExpired** = ``"DemandExpired"`` #### Defined in -[src/market/error.ts:11](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L11) +[src/market/error.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L12) ___ -### AgreementTerminationFailed +### ResourceRentalTerminationFailed -• **AgreementTerminationFailed** = ``7`` +• **ResourceRentalTerminationFailed** = ``"ResourceRentalTerminationFailed"`` #### Defined in -[src/market/error.ts:12](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L12) +[src/market/error.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L13) ___ -### AgreementCreationFailed +### ResourceRentalCreationFailed -• **AgreementCreationFailed** = ``8`` +• **ResourceRentalCreationFailed** = ``"ResourceRentalCreationFailed"`` #### Defined in -[src/market/error.ts:13](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L13) +[src/market/error.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L14) ___ ### AgreementApprovalFailed -• **AgreementApprovalFailed** = ``9`` +• **AgreementApprovalFailed** = ``"AgreementApprovalFailed"`` + +#### Defined in + +[src/market/error.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L15) + +___ + +### NoProposalAvailable + +• **NoProposalAvailable** = ``"NoProposalAvailable"`` + +#### Defined in + +[src/market/error.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L16) + +___ + +### InternalError + +• **InternalError** = ``"InternalError"`` #### Defined in -[src/market/error.ts:14](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/error.ts#L14) +[src/market/error.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/error.ts#L17) diff --git a/src/pages/docs/golem-js/reference/enums/network_error.NetworkErrorCode.md b/src/pages/docs/golem-js/reference/enums/network_error.NetworkErrorCode.md index b1f2c94aa..01261df3c 100644 --- a/src/pages/docs/golem-js/reference/enums/network_error.NetworkErrorCode.md +++ b/src/pages/docs/golem-js/reference/enums/network_error.NetworkErrorCode.md @@ -21,93 +21,115 @@ type: "JS API Reference" - [NodeAddingFailed](network_error.NetworkErrorCode#nodeaddingfailed) - [NodeRemovalFailed](network_error.NetworkErrorCode#noderemovalfailed) - [NetworkRemovalFailed](network_error.NetworkErrorCode#networkremovalfailed) +- [GettingIdentityFailed](network_error.NetworkErrorCode#gettingidentityfailed) +- [NetworkRemoved](network_error.NetworkErrorCode#networkremoved) ## Enumeration Members ### ServiceNotInitialized -• **ServiceNotInitialized** = ``0`` +• **ServiceNotInitialized** = ``"ServiceNotInitialized"`` #### Defined in -[src/network/error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/error.ts#L5) +[src/network/error.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L5) ___ ### NetworkSetupMissing -• **NetworkSetupMissing** = ``1`` +• **NetworkSetupMissing** = ``"NetworkSetupMissing"`` #### Defined in -[src/network/error.ts:6](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/error.ts#L6) +[src/network/error.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L6) ___ ### NetworkCreationFailed -• **NetworkCreationFailed** = ``2`` +• **NetworkCreationFailed** = ``"NetworkCreationFailed"`` #### Defined in -[src/network/error.ts:7](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/error.ts#L7) +[src/network/error.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L7) ___ ### NoAddressesAvailable -• **NoAddressesAvailable** = ``3`` +• **NoAddressesAvailable** = ``"NoAddressesAvailable"`` #### Defined in -[src/network/error.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/error.ts#L8) +[src/network/error.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L8) ___ ### AddressOutOfRange -• **AddressOutOfRange** = ``4`` +• **AddressOutOfRange** = ``"AddressOutOfRange"`` #### Defined in -[src/network/error.ts:9](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/error.ts#L9) +[src/network/error.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L9) ___ ### AddressAlreadyAssigned -• **AddressAlreadyAssigned** = ``5`` +• **AddressAlreadyAssigned** = ``"AddressAlreadyAssigned"`` #### Defined in -[src/network/error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/error.ts#L10) +[src/network/error.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L10) ___ ### NodeAddingFailed -• **NodeAddingFailed** = ``6`` +• **NodeAddingFailed** = ``"NodeAddingFailed"`` #### Defined in -[src/network/error.ts:11](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/error.ts#L11) +[src/network/error.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L11) ___ ### NodeRemovalFailed -• **NodeRemovalFailed** = ``7`` +• **NodeRemovalFailed** = ``"NodeRemovalFailed"`` #### Defined in -[src/network/error.ts:12](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/error.ts#L12) +[src/network/error.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L12) ___ ### NetworkRemovalFailed -• **NetworkRemovalFailed** = ``8`` +• **NetworkRemovalFailed** = ``"NetworkRemovalFailed"`` #### Defined in -[src/network/error.ts:13](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/error.ts#L13) +[src/network/error.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L13) + +___ + +### GettingIdentityFailed + +• **GettingIdentityFailed** = ``"GettingIdentityFailed"`` + +#### Defined in + +[src/network/error.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L14) + +___ + +### NetworkRemoved + +• **NetworkRemoved** = ``"NetworkRemoved"`` + +#### Defined in + +[src/network/error.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/error.ts#L15) diff --git a/src/pages/docs/golem-js/reference/enums/network_network.NetworkState.md b/src/pages/docs/golem-js/reference/enums/network_network.NetworkState.md new file mode 100644 index 000000000..0438403c5 --- /dev/null +++ b/src/pages/docs/golem-js/reference/enums/network_network.NetworkState.md @@ -0,0 +1,36 @@ +--- +title: "Enum NetworkState" +pageTitle: "Enum NetworkState - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Enum NetworkState within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Enumeration: NetworkState + +[network/network](../modules/network_network).NetworkState + +## Table of contents + +### Enumeration Members + +- [Active](network_network.NetworkState#active) +- [Removed](network_network.NetworkState#removed) + +## Enumeration Members + +### Active + +• **Active** = ``"Active"`` + +#### Defined in + +[src/network/network.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L14) + +___ + +### Removed + +• **Removed** = ``"Removed"`` + +#### Defined in + +[src/network/network.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L15) diff --git a/src/pages/docs/golem-js/reference/enums/payment_error.PaymentErrorCode.md b/src/pages/docs/golem-js/reference/enums/payment_error.PaymentErrorCode.md index 3cec05d57..872f28e58 100644 --- a/src/pages/docs/golem-js/reference/enums/payment_error.PaymentErrorCode.md +++ b/src/pages/docs/golem-js/reference/enums/payment_error.PaymentErrorCode.md @@ -20,6 +20,8 @@ type: "JS API Reference" - [DebitNoteAcceptanceFailed](payment_error.PaymentErrorCode#debitnoteacceptancefailed) - [InvoiceRejectionFailed](payment_error.PaymentErrorCode#invoicerejectionfailed) - [DebitNoteRejectionFailed](payment_error.PaymentErrorCode#debitnoterejectionfailed) +- [CouldNotGetDebitNote](payment_error.PaymentErrorCode#couldnotgetdebitnote) +- [CouldNotGetInvoice](payment_error.PaymentErrorCode#couldnotgetinvoice) - [PaymentStatusQueryFailed](payment_error.PaymentErrorCode#paymentstatusqueryfailed) - [AgreementAlreadyPaid](payment_error.PaymentErrorCode#agreementalreadypaid) - [InvoiceAlreadyReceived](payment_error.PaymentErrorCode#invoicealreadyreceived) @@ -28,108 +30,128 @@ type: "JS API Reference" ### AllocationCreationFailed -• **AllocationCreationFailed** = ``0`` +• **AllocationCreationFailed** = ``"AllocationCreationFailed"`` #### Defined in -[src/payment/error.ts:6](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L6) +[src/payment/error.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L6) ___ ### MissingAllocation -• **MissingAllocation** = ``1`` +• **MissingAllocation** = ``"MissingAllocation"`` #### Defined in -[src/payment/error.ts:7](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L7) +[src/payment/error.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L7) ___ ### PaymentProcessNotInitialized -• **PaymentProcessNotInitialized** = ``2`` +• **PaymentProcessNotInitialized** = ``"PaymentProcessNotInitialized"`` #### Defined in -[src/payment/error.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L8) +[src/payment/error.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L8) ___ ### AllocationReleaseFailed -• **AllocationReleaseFailed** = ``3`` +• **AllocationReleaseFailed** = ``"AllocationReleaseFailed"`` #### Defined in -[src/payment/error.ts:9](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L9) +[src/payment/error.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L9) ___ ### InvoiceAcceptanceFailed -• **InvoiceAcceptanceFailed** = ``4`` +• **InvoiceAcceptanceFailed** = ``"InvoiceAcceptanceFailed"`` #### Defined in -[src/payment/error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L10) +[src/payment/error.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L10) ___ ### DebitNoteAcceptanceFailed -• **DebitNoteAcceptanceFailed** = ``5`` +• **DebitNoteAcceptanceFailed** = ``"DebitNoteAcceptanceFailed"`` #### Defined in -[src/payment/error.ts:11](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L11) +[src/payment/error.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L11) ___ ### InvoiceRejectionFailed -• **InvoiceRejectionFailed** = ``6`` +• **InvoiceRejectionFailed** = ``"InvoiceRejectionFailed"`` #### Defined in -[src/payment/error.ts:12](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L12) +[src/payment/error.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L12) ___ ### DebitNoteRejectionFailed -• **DebitNoteRejectionFailed** = ``7`` +• **DebitNoteRejectionFailed** = ``"DebitNoteRejectionFailed"`` #### Defined in -[src/payment/error.ts:13](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L13) +[src/payment/error.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L13) + +___ + +### CouldNotGetDebitNote + +• **CouldNotGetDebitNote** = ``"CouldNotGetDebitNote"`` + +#### Defined in + +[src/payment/error.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L14) + +___ + +### CouldNotGetInvoice + +• **CouldNotGetInvoice** = ``"CouldNotGetInvoice"`` + +#### Defined in + +[src/payment/error.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L15) ___ ### PaymentStatusQueryFailed -• **PaymentStatusQueryFailed** = ``8`` +• **PaymentStatusQueryFailed** = ``"PaymentStatusQueryFailed"`` #### Defined in -[src/payment/error.ts:14](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L14) +[src/payment/error.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L16) ___ ### AgreementAlreadyPaid -• **AgreementAlreadyPaid** = ``9`` +• **AgreementAlreadyPaid** = ``"AgreementAlreadyPaid"`` #### Defined in -[src/payment/error.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L15) +[src/payment/error.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L17) ___ ### InvoiceAlreadyReceived -• **InvoiceAlreadyReceived** = ``10`` +• **InvoiceAlreadyReceived** = ``"InvoiceAlreadyReceived"`` #### Defined in -[src/payment/error.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/error.ts#L16) +[src/payment/error.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/error.ts#L18) diff --git a/src/pages/docs/golem-js/reference/enums/payment_rejection.RejectionReason.md b/src/pages/docs/golem-js/reference/enums/payment_rejection.RejectionReason.md new file mode 100644 index 000000000..a88498407 --- /dev/null +++ b/src/pages/docs/golem-js/reference/enums/payment_rejection.RejectionReason.md @@ -0,0 +1,73 @@ +--- +title: "Enum RejectionReason" +pageTitle: "Enum RejectionReason - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Enum RejectionReason within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Enumeration: RejectionReason + +[payment/rejection](../modules/payment_rejection).RejectionReason + +## Table of contents + +### Enumeration Members + +- [UnsolicitedService](payment_rejection.RejectionReason#unsolicitedservice) +- [BadService](payment_rejection.RejectionReason#badservice) +- [IncorrectAmount](payment_rejection.RejectionReason#incorrectamount) +- [RejectedByRequestorFilter](payment_rejection.RejectionReason#rejectedbyrequestorfilter) +- [AgreementFinalized](payment_rejection.RejectionReason#agreementfinalized) + +## Enumeration Members + +### UnsolicitedService + +• **UnsolicitedService** = ``"UNSOLICITED_SERVICE"`` + +#### Defined in + +[src/payment/rejection.ts:2](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/rejection.ts#L2) + +___ + +### BadService + +• **BadService** = ``"BAD_SERVICE"`` + +#### Defined in + +[src/payment/rejection.ts:3](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/rejection.ts#L3) + +___ + +### IncorrectAmount + +• **IncorrectAmount** = ``"INCORRECT_AMOUNT"`` + +#### Defined in + +[src/payment/rejection.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/rejection.ts#L4) + +___ + +### RejectedByRequestorFilter + +• **RejectedByRequestorFilter** = ``"REJECTED_BY_REQUESTOR_FILTER"`` + +#### Defined in + +[src/payment/rejection.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/rejection.ts#L5) + +___ + +### AgreementFinalized + +• **AgreementFinalized** = ``"AGREEMENT_FINALIZED"`` + +Use it when you're processing an event after the agreement reached it's "final state" + +By final state we mean: we got an invoice for that agreement + +#### Defined in + +[src/payment/rejection.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/rejection.ts#L12) diff --git a/src/pages/docs/golem-js/reference/enums/task_error.WorkErrorCode.md b/src/pages/docs/golem-js/reference/enums/task_error.WorkErrorCode.md deleted file mode 100644 index 717faa69f..000000000 --- a/src/pages/docs/golem-js/reference/enums/task_error.WorkErrorCode.md +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: "Enum WorkErrorCode" -pageTitle: "Enum WorkErrorCode - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Enum WorkErrorCode within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Enumeration: WorkErrorCode - -[task/error](../modules/task_error).WorkErrorCode - -## Table of contents - -### Enumeration Members - -- [ServiceNotInitialized](task_error.WorkErrorCode#servicenotinitialized) -- [ScriptExecutionFailed](task_error.WorkErrorCode#scriptexecutionfailed) -- [ActivityDestroyingFailed](task_error.WorkErrorCode#activitydestroyingfailed) -- [ActivityResultsFetchingFailed](task_error.WorkErrorCode#activityresultsfetchingfailed) -- [ActivityCreationFailed](task_error.WorkErrorCode#activitycreationfailed) -- [TaskAddingFailed](task_error.WorkErrorCode#taskaddingfailed) -- [TaskExecutionFailed](task_error.WorkErrorCode#taskexecutionfailed) -- [TaskRejected](task_error.WorkErrorCode#taskrejected) -- [NetworkSetupMissing](task_error.WorkErrorCode#networksetupmissing) -- [ScriptInitializationFailed](task_error.WorkErrorCode#scriptinitializationfailed) -- [ActivityDeploymentFailed](task_error.WorkErrorCode#activitydeploymentfailed) -- [ActivityStatusQueryFailed](task_error.WorkErrorCode#activitystatusqueryfailed) - -## Enumeration Members - -### ServiceNotInitialized - -• **ServiceNotInitialized** = ``0`` - -#### Defined in - -[src/task/error.ts:6](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L6) - -___ - -### ScriptExecutionFailed - -• **ScriptExecutionFailed** = ``1`` - -#### Defined in - -[src/task/error.ts:7](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L7) - -___ - -### ActivityDestroyingFailed - -• **ActivityDestroyingFailed** = ``2`` - -#### Defined in - -[src/task/error.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L8) - -___ - -### ActivityResultsFetchingFailed - -• **ActivityResultsFetchingFailed** = ``3`` - -#### Defined in - -[src/task/error.ts:9](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L9) - -___ - -### ActivityCreationFailed - -• **ActivityCreationFailed** = ``4`` - -#### Defined in - -[src/task/error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L10) - -___ - -### TaskAddingFailed - -• **TaskAddingFailed** = ``5`` - -#### Defined in - -[src/task/error.ts:11](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L11) - -___ - -### TaskExecutionFailed - -• **TaskExecutionFailed** = ``6`` - -#### Defined in - -[src/task/error.ts:12](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L12) - -___ - -### TaskRejected - -• **TaskRejected** = ``7`` - -#### Defined in - -[src/task/error.ts:13](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L13) - -___ - -### NetworkSetupMissing - -• **NetworkSetupMissing** = ``8`` - -#### Defined in - -[src/task/error.ts:14](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L14) - -___ - -### ScriptInitializationFailed - -• **ScriptInitializationFailed** = ``9`` - -#### Defined in - -[src/task/error.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L15) - -___ - -### ActivityDeploymentFailed - -• **ActivityDeploymentFailed** = ``10`` - -#### Defined in - -[src/task/error.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L16) - -___ - -### ActivityStatusQueryFailed - -• **ActivityStatusQueryFailed** = ``11`` - -#### Defined in - -[src/task/error.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/error.ts#L17) diff --git a/src/pages/docs/golem-js/reference/enums/task_task.TaskState.md b/src/pages/docs/golem-js/reference/enums/task_task.TaskState.md deleted file mode 100644 index b242cc821..000000000 --- a/src/pages/docs/golem-js/reference/enums/task_task.TaskState.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: "Enum TaskState" -pageTitle: "Enum TaskState - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Enum TaskState within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Enumeration: TaskState - -[task/task](../modules/task_task).TaskState - -## Table of contents - -### Enumeration Members - -- [New](task_task.TaskState#new) -- [Queued](task_task.TaskState#queued) -- [Pending](task_task.TaskState#pending) -- [Done](task_task.TaskState#done) -- [Retry](task_task.TaskState#retry) -- [Rejected](task_task.TaskState#rejected) - -## Enumeration Members - -### New - -• **New** = ``"new"`` - -#### Defined in - -[src/task/task.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L8) - -___ - -### Queued - -• **Queued** = ``"queued"`` - -#### Defined in - -[src/task/task.ts:9](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L9) - -___ - -### Pending - -• **Pending** = ``"pending"`` - -#### Defined in - -[src/task/task.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L10) - -___ - -### Done - -• **Done** = ``"done"`` - -#### Defined in - -[src/task/task.ts:11](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L11) - -___ - -### Retry - -• **Retry** = ``"retry"`` - -#### Defined in - -[src/task/task.ts:12](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L12) - -___ - -### Rejected - -• **Rejected** = ``"rejected"`` - -#### Defined in - -[src/task/task.ts:13](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L13) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_activity.ActivityOptions.md b/src/pages/docs/golem-js/reference/interfaces/activity_activity.ActivityOptions.md deleted file mode 100644 index 0aa3845fd..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/activity_activity.ActivityOptions.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: "Interface ActivityOptions" -pageTitle: "Interface ActivityOptions - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface ActivityOptions within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: ActivityOptions - -[activity/activity](../modules/activity_activity).ActivityOptions - -## Hierarchy - -- **`ActivityOptions`** - - ↳ [`TaskServiceOptions`](task_service.TaskServiceOptions) - -## Table of contents - -### Properties - -- [activityRequestTimeout](activity_activity.ActivityOptions#activityrequesttimeout) -- [activityExecuteTimeout](activity_activity.ActivityOptions#activityexecutetimeout) -- [activityExeBatchResultPollIntervalSeconds](activity_activity.ActivityOptions#activityexebatchresultpollintervalseconds) -- [logger](activity_activity.ActivityOptions#logger) -- [eventTarget](activity_activity.ActivityOptions#eventtarget) - -## Properties - -### activityRequestTimeout - -• `Optional` **activityRequestTimeout**: `number` - -timeout for sending and creating batch - -#### Defined in - -[src/activity/activity.ts:28](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L28) - -___ - -### activityExecuteTimeout - -• `Optional` **activityExecuteTimeout**: `number` - -timeout for executing batch - -#### Defined in - -[src/activity/activity.ts:30](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L30) - -___ - -### activityExeBatchResultPollIntervalSeconds - -• `Optional` **activityExeBatchResultPollIntervalSeconds**: `number` - -interval for fetching batch results while polling - -#### Defined in - -[src/activity/activity.ts:32](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L32) - -___ - -### logger - -• `Optional` **logger**: [`Logger`](utils_logger_logger.Logger) - -Logger module - -#### Defined in - -[src/activity/activity.ts:34](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L34) - -___ - -### eventTarget - -• `Optional` **eventTarget**: `EventTarget` - -Event Bus implements EventTarget - -#### Defined in - -[src/activity/activity.ts:36](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L36) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_activity.IActivityRepository.md b/src/pages/docs/golem-js/reference/interfaces/activity_activity.IActivityRepository.md new file mode 100644 index 000000000..d0445af2e --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/activity_activity.IActivityRepository.md @@ -0,0 +1,60 @@ +--- +title: "Interface IActivityRepository" +pageTitle: "Interface IActivityRepository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface IActivityRepository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: IActivityRepository + +[activity/activity](../modules/activity_activity).IActivityRepository + +## Implemented by + +- [`ActivityRepository`](../classes/shared_yagna_repository_activity_repository.ActivityRepository) + +## Table of contents + +### Methods + +- [getById](activity_activity.IActivityRepository#getbyid) +- [getStateOfActivity](activity_activity.IActivityRepository#getstateofactivity) + +## Methods + +### getById + +▸ **getById**(`id`): `Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +#### Defined in + +[src/activity/activity.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L20) + +___ + +### getStateOfActivity + +▸ **getStateOfActivity**(`id`): `Promise`\<[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum)\> + +#### Defined in + +[src/activity/activity.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L22) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_activity_module.ActivityModule.md b/src/pages/docs/golem-js/reference/interfaces/activity_activity_module.ActivityModule.md new file mode 100644 index 000000000..471cb02c2 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/activity_activity_module.ActivityModule.md @@ -0,0 +1,255 @@ +--- +title: "Interface ActivityModule" +pageTitle: "Interface ActivityModule - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ActivityModule within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ActivityModule + +[activity/activity.module](../modules/activity_activity_module).ActivityModule + +## Implemented by + +- [`ActivityModuleImpl`](../classes/activity_activity_module.ActivityModuleImpl) + +## Table of contents + +### Properties + +- [events](activity_activity_module.ActivityModule#events) + +### Methods + +- [createActivity](activity_activity_module.ActivityModule#createactivity) +- [destroyActivity](activity_activity_module.ActivityModule#destroyactivity) +- [refreshActivity](activity_activity_module.ActivityModule#refreshactivity) +- [findActivityById](activity_activity_module.ActivityModule#findactivitybyid) +- [createExeUnit](activity_activity_module.ActivityModule#createexeunit) +- [createScriptExecutor](activity_activity_module.ActivityModule#createscriptexecutor) +- [executeScript](activity_activity_module.ActivityModule#executescript) +- [getBatchResults](activity_activity_module.ActivityModule#getbatchresults) +- [observeStreamingBatchEvents](activity_activity_module.ActivityModule#observestreamingbatchevents) + +## Properties + +### events + +• **events**: `EventEmitter`\<[`ActivityEvents`](../modules/activity_api#activityevents), `any`\> + +#### Defined in + +[src/activity/activity.module.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L12) + +## Methods + +### createActivity + +▸ **createActivity**(`agreement`): `Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +Create and start a new activity on the provider for the supplied agreement + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | + +#### Returns + +`Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +The resulting activity on the provider for further use + +#### Defined in + +[src/activity/activity.module.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L19) + +___ + +### destroyActivity + +▸ **destroyActivity**(`activity`): `Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +Definitely terminate any work on the provider + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](../classes/activity_activity.Activity) | + +#### Returns + +`Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +The activity that was permanently terminated + +#### Defined in + +[src/activity/activity.module.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L26) + +___ + +### refreshActivity + +▸ **refreshActivity**(`staleActivity`): `Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +Fetches the latest state of the activity. It's recommended to use this method +before performing any actions on the activity to make sure it's in the correct state. +If the fetched activity's state is different from the one you have, an event will be emitted. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `staleActivity` | [`Activity`](../classes/activity_activity.Activity) | + +#### Returns + +`Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +#### Defined in + +[src/activity/activity.module.ts:33](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L33) + +___ + +### findActivityById + +▸ **findActivityById**(`activityId`): `Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +Fetches the activity by its ID from yagna. If the activity doesn't exist, an error will be thrown. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activityId` | `string` | + +#### Returns + +`Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +#### Defined in + +[src/activity/activity.module.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L38) + +___ + +### createExeUnit + +▸ **createExeUnit**(`activity`, `options?`): `Promise`\<[`ExeUnit`](../classes/activity_exe_unit_exe_unit.ExeUnit)\> + +Create a exe-unit "within" the activity so that you can perform commands on the rented resources + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](../classes/activity_activity.Activity) | +| `options?` | [`ExeUnitOptions`](activity_exe_unit_exe_unit.ExeUnitOptions) | + +#### Returns + +`Promise`\<[`ExeUnit`](../classes/activity_exe_unit_exe_unit.ExeUnit)\> + +An ExeUnit that's fully commissioned and the user can execute their commands + +#### Defined in + +[src/activity/activity.module.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L45) + +___ + +### createScriptExecutor + +▸ **createScriptExecutor**(`activity`, `options?`): [`ExeScriptExecutor`](../classes/activity_exe_script_executor.ExeScriptExecutor) + +Factory method for creating a script executor for the activity + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](../classes/activity_activity.Activity) | +| `options?` | [`ExecutionOptions`](activity_exe_script_executor.ExecutionOptions) | + +#### Returns + +[`ExeScriptExecutor`](../classes/activity_exe_script_executor.ExeScriptExecutor) + +#### Defined in + +[src/activity/activity.module.ts:50](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L50) + +___ + +### executeScript + +▸ **executeScript**(`activity`, `script`): `Promise`\<`string`\> + +Execute a script on the activity. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](../classes/activity_activity.Activity) | +| `script` | [`ExeScriptRequest`](activity_exe_script_executor.ExeScriptRequest) | + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[src/activity/activity.module.ts:55](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L55) + +___ + +### getBatchResults + +▸ **getBatchResults**(`activity`, `batchId`, `commandIndex?`, `timeout?`): `Promise`\<[`Result`](../classes/activity_results.Result)\<`any`\>[]\> + +Fetch the results of a batch execution. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](../classes/activity_activity.Activity) | +| `batchId` | `string` | +| `commandIndex?` | `number` | +| `timeout?` | `number` | + +#### Returns + +`Promise`\<[`Result`](../classes/activity_results.Result)\<`any`\>[]\> + +#### Defined in + +[src/activity/activity.module.ts:60](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L60) + +___ + +### observeStreamingBatchEvents + +▸ **observeStreamingBatchEvents**(`activity`, `batchId`, `commandIndex?`): `Observable`\<[`StreamingBatchEvent`](activity_results.StreamingBatchEvent)\> + +Create an observable that will emit events from the streaming batch. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](../classes/activity_activity.Activity) | +| `batchId` | `string` | +| `commandIndex?` | `number` | + +#### Returns + +`Observable`\<[`StreamingBatchEvent`](activity_results.StreamingBatchEvent)\> + +#### Defined in + +[src/activity/activity.module.ts:65](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L65) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_activity_module.ActivityModuleOptions.md b/src/pages/docs/golem-js/reference/interfaces/activity_activity_module.ActivityModuleOptions.md new file mode 100644 index 000000000..7d13fa980 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/activity_activity_module.ActivityModuleOptions.md @@ -0,0 +1,9 @@ +--- +title: "Interface ActivityModuleOptions" +pageTitle: "Interface ActivityModuleOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ActivityModuleOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ActivityModuleOptions + +[activity/activity.module](../modules/activity_activity_module).ActivityModuleOptions diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_activity_module.IFileServer.md b/src/pages/docs/golem-js/reference/interfaces/activity_activity_module.IFileServer.md new file mode 100644 index 000000000..e5b76b10a --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/activity_activity_module.IFileServer.md @@ -0,0 +1,106 @@ +--- +title: "Interface IFileServer" +pageTitle: "Interface IFileServer - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface IFileServer within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: IFileServer + +[activity/activity.module](../modules/activity_activity_module).IFileServer + +An abstract interface describing a File Server that can be used to expose files from the Requestor to the Golem Network + +## Implemented by + +- [`GftpServerAdapter`](../classes/shared_storage_GftpServerAdapter.GftpServerAdapter) + +## Table of contents + +### Methods + +- [publishFile](activity_activity_module.IFileServer#publishfile) +- [isFilePublished](activity_activity_module.IFileServer#isfilepublished) +- [getPublishInfo](activity_activity_module.IFileServer#getpublishinfo) +- [isServing](activity_activity_module.IFileServer#isserving) + +## Methods + +### publishFile + +▸ **publishFile**(`sourcePath`): `Promise`\<[`FileServerEntry`](../modules/activity_activity_module#fileserverentry)\> + +Exposes a file that can be accessed via Golem Network and GFTP + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `sourcePath` | `string` | + +#### Returns + +`Promise`\<[`FileServerEntry`](../modules/activity_activity_module#fileserverentry)\> + +#### Defined in + +[src/activity/activity.module.ts:90](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L90) + +___ + +### isFilePublished + +▸ **isFilePublished**(`sourcePath`): `boolean` + +Tells if the file was already published on the server + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `sourcePath` | `string` | + +#### Returns + +`boolean` + +#### Defined in + +[src/activity/activity.module.ts:95](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L95) + +___ + +### getPublishInfo + +▸ **getPublishInfo**(`sourcePath`): `undefined` \| [`FileServerEntry`](../modules/activity_activity_module#fileserverentry) + +Returns publishing information for a file that has been already served + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `sourcePath` | `string` | + +#### Returns + +`undefined` \| [`FileServerEntry`](../modules/activity_activity_module#fileserverentry) + +#### Defined in + +[src/activity/activity.module.ts:100](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L100) + +___ + +### isServing + +▸ **isServing**(): `boolean` + +Tells if the server is currently serving any files + +#### Returns + +`boolean` + +#### Defined in + +[src/activity/activity.module.ts:105](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L105) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_api.IActivityApi.md b/src/pages/docs/golem-js/reference/interfaces/activity_api.IActivityApi.md new file mode 100644 index 000000000..3e47a2b57 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/activity_api.IActivityApi.md @@ -0,0 +1,173 @@ +--- +title: "Interface IActivityApi" +pageTitle: "Interface IActivityApi - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface IActivityApi within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: IActivityApi + +[activity/api](../modules/activity_api).IActivityApi + +Represents a set of use cases related to managing the lifetime of an activity + +## Implemented by + +- [`ActivityApiAdapter`](../classes/shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter) + +## Table of contents + +### Methods + +- [getActivity](activity_api.IActivityApi#getactivity) +- [createActivity](activity_api.IActivityApi#createactivity) +- [destroyActivity](activity_api.IActivityApi#destroyactivity) +- [getActivityState](activity_api.IActivityApi#getactivitystate) +- [executeScript](activity_api.IActivityApi#executescript) +- [getExecBatchResults](activity_api.IActivityApi#getexecbatchresults) +- [getExecBatchEvents](activity_api.IActivityApi#getexecbatchevents) + +## Methods + +### getActivity + +▸ **getActivity**(`id`): `Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +#### Defined in + +[src/activity/api.ts:35](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/api.ts#L35) + +___ + +### createActivity + +▸ **createActivity**(`agreement`): `Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | + +#### Returns + +`Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +#### Defined in + +[src/activity/api.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/api.ts#L37) + +___ + +### destroyActivity + +▸ **destroyActivity**(`activity`): `Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](../classes/activity_activity.Activity) | + +#### Returns + +`Promise`\<[`Activity`](../classes/activity_activity.Activity)\> + +#### Defined in + +[src/activity/api.ts:39](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/api.ts#L39) + +___ + +### getActivityState + +▸ **getActivityState**(`id`): `Promise`\<[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum)\> + +#### Defined in + +[src/activity/api.ts:41](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/api.ts#L41) + +___ + +### executeScript + +▸ **executeScript**(`activity`, `script`): `Promise`\<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](../classes/activity_activity.Activity) | +| `script` | [`ExeScriptRequest`](activity_exe_script_executor.ExeScriptRequest) | + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[src/activity/api.ts:43](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/api.ts#L43) + +___ + +### getExecBatchResults + +▸ **getExecBatchResults**(`activity`, `batchId`, `commandIndex?`, `timeout?`): `Promise`\<[`Result`](../classes/activity_results.Result)\<`any`\>[]\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](../classes/activity_activity.Activity) | +| `batchId` | `string` | +| `commandIndex?` | `number` | +| `timeout?` | `number` | + +#### Returns + +`Promise`\<[`Result`](../classes/activity_results.Result)\<`any`\>[]\> + +#### Defined in + +[src/activity/api.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/api.ts#L45) + +___ + +### getExecBatchEvents + +▸ **getExecBatchEvents**(`activity`, `batchId`, `commandIndex?`): `Observable`\<[`StreamingBatchEvent`](activity_results.StreamingBatchEvent)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activity` | [`Activity`](../classes/activity_activity.Activity) | +| `batchId` | `string` | +| `commandIndex?` | `number` | + +#### Returns + +`Observable`\<[`StreamingBatchEvent`](activity_results.StreamingBatchEvent)\> + +#### Defined in + +[src/activity/api.ts:47](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/api.ts#L47) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_activity.ExeScriptRequest.md b/src/pages/docs/golem-js/reference/interfaces/activity_exe_script_executor.ExeScriptRequest.md similarity index 59% rename from src/pages/docs/golem-js/reference/interfaces/activity_activity.ExeScriptRequest.md rename to src/pages/docs/golem-js/reference/interfaces/activity_exe_script_executor.ExeScriptRequest.md index a4430718c..1010b0ade 100644 --- a/src/pages/docs/golem-js/reference/interfaces/activity_activity.ExeScriptRequest.md +++ b/src/pages/docs/golem-js/reference/interfaces/activity_exe_script_executor.ExeScriptRequest.md @@ -6,13 +6,13 @@ type: "JS API Reference" --- # Interface: ExeScriptRequest -[activity/activity](../modules/activity_activity).ExeScriptRequest +[activity/exe-script-executor](../modules/activity_exe_script_executor).ExeScriptRequest ## Table of contents ### Properties -- [text](activity_activity.ExeScriptRequest#text) +- [text](activity_exe_script_executor.ExeScriptRequest#text) ## Properties @@ -22,4 +22,4 @@ type: "JS API Reference" #### Defined in -[src/activity/activity.ts:23](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L23) +[src/activity/exe-script-executor.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-script-executor.ts#L15) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_exe_script_executor.ExecutionOptions.md b/src/pages/docs/golem-js/reference/interfaces/activity_exe_script_executor.ExecutionOptions.md new file mode 100644 index 000000000..408c3037c --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/activity_exe_script_executor.ExecutionOptions.md @@ -0,0 +1,53 @@ +--- +title: "Interface ExecutionOptions" +pageTitle: "Interface ExecutionOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ExecutionOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ExecutionOptions + +[activity/exe-script-executor](../modules/activity_exe_script_executor).ExecutionOptions + +## Table of contents + +### Properties + +- [activityExeBatchResultPollIntervalSeconds](activity_exe_script_executor.ExecutionOptions#activityexebatchresultpollintervalseconds) +- [activityExeBatchResultMaxRetries](activity_exe_script_executor.ExecutionOptions#activityexebatchresultmaxretries) +- [signalOrTimeout](activity_exe_script_executor.ExecutionOptions#signalortimeout) + +## Properties + +### activityExeBatchResultPollIntervalSeconds + +• `Optional` **activityExeBatchResultPollIntervalSeconds**: `number` + +interval for fetching batch results while polling + +#### Defined in + +[src/activity/exe-script-executor.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-script-executor.ts#L20) + +___ + +### activityExeBatchResultMaxRetries + +• `Optional` **activityExeBatchResultMaxRetries**: `number` + +maximum number of retries retrieving results when an error occurs, default: 10 + +#### Defined in + +[src/activity/exe-script-executor.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-script-executor.ts#L22) + +___ + +### signalOrTimeout + +• `Optional` **signalOrTimeout**: `number` \| `AbortSignal` + +The timeout in milliseconds or an AbortSignal that will be used to cancel the execution + +#### Defined in + +[src/activity/exe-script-executor.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-script-executor.ts#L24) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_exe_unit_exe_unit.ActivityDTO.md b/src/pages/docs/golem-js/reference/interfaces/activity_exe_unit_exe_unit.ActivityDTO.md new file mode 100644 index 000000000..88e000165 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/activity_exe_unit_exe_unit.ActivityDTO.md @@ -0,0 +1,47 @@ +--- +title: "Interface ActivityDTO" +pageTitle: "Interface ActivityDTO - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ActivityDTO within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ActivityDTO + +[activity/exe-unit/exe-unit](../modules/activity_exe_unit_exe_unit).ActivityDTO + +## Table of contents + +### Properties + +- [provider](activity_exe_unit_exe_unit.ActivityDTO#provider) +- [id](activity_exe_unit_exe_unit.ActivityDTO#id) +- [agreement](activity_exe_unit_exe_unit.ActivityDTO#agreement) + +## Properties + +### provider + +• **provider**: [`ProviderInfo`](market_agreement_agreement.ProviderInfo) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:54](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L54) + +___ + +### id + +• **id**: `string` + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:55](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L55) + +___ + +### agreement + +• **agreement**: [`Agreement`](../classes/market_agreement_agreement.Agreement) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:56](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L56) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_exe_unit_exe_unit.CommandOptions.md b/src/pages/docs/golem-js/reference/interfaces/activity_exe_unit_exe_unit.CommandOptions.md new file mode 100644 index 000000000..997104b69 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/activity_exe_unit_exe_unit.CommandOptions.md @@ -0,0 +1,58 @@ +--- +title: "Interface CommandOptions" +pageTitle: "Interface CommandOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface CommandOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: CommandOptions + +[activity/exe-unit/exe-unit](../modules/activity_exe_unit_exe_unit).CommandOptions + +## Table of contents + +### Properties + +- [signalOrTimeout](activity_exe_unit_exe_unit.CommandOptions#signalortimeout) +- [maxRetries](activity_exe_unit_exe_unit.CommandOptions#maxretries) +- [env](activity_exe_unit_exe_unit.CommandOptions#env) +- [capture](activity_exe_unit_exe_unit.CommandOptions#capture) + +## Properties + +### signalOrTimeout + +• `Optional` **signalOrTimeout**: `number` \| `AbortSignal` + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:47](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L47) + +___ + +### maxRetries + +• `Optional` **maxRetries**: `number` + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:48](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L48) + +___ + +### env + +• `Optional` **env**: `object` + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:49](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L49) + +___ + +### capture + +• `Optional` **capture**: [`Capture`](../modules/activity_script_command#capture) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:50](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L50) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_exe_unit_exe_unit.ExeUnitOptions.md b/src/pages/docs/golem-js/reference/interfaces/activity_exe_unit_exe_unit.ExeUnitOptions.md new file mode 100644 index 000000000..cc398a174 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/activity_exe_unit_exe_unit.ExeUnitOptions.md @@ -0,0 +1,117 @@ +--- +title: "Interface ExeUnitOptions" +pageTitle: "Interface ExeUnitOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ExeUnitOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ExeUnitOptions + +[activity/exe-unit/exe-unit](../modules/activity_exe_unit_exe_unit).ExeUnitOptions + +## Table of contents + +### Properties + +- [activityDeployingTimeout](activity_exe_unit_exe_unit.ExeUnitOptions#activitydeployingtimeout) +- [storageProvider](activity_exe_unit_exe_unit.ExeUnitOptions#storageprovider) +- [networkNode](activity_exe_unit_exe_unit.ExeUnitOptions#networknode) +- [logger](activity_exe_unit_exe_unit.ExeUnitOptions#logger) +- [yagnaOptions](activity_exe_unit_exe_unit.ExeUnitOptions#yagnaoptions) +- [setup](activity_exe_unit_exe_unit.ExeUnitOptions#setup) +- [teardown](activity_exe_unit_exe_unit.ExeUnitOptions#teardown) +- [executionOptions](activity_exe_unit_exe_unit.ExeUnitOptions#executionoptions) +- [signalOrTimeout](activity_exe_unit_exe_unit.ExeUnitOptions#signalortimeout) + +## Properties + +### activityDeployingTimeout + +• `Optional` **activityDeployingTimeout**: `number` + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:33](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L33) + +___ + +### storageProvider + +• `Optional` **storageProvider**: [`StorageProvider`](shared_storage_provider.StorageProvider) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:34](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L34) + +___ + +### networkNode + +• `Optional` **networkNode**: [`NetworkNode`](../classes/network_node.NetworkNode) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:35](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L35) + +___ + +### logger + +• `Optional` **logger**: [`Logger`](shared_utils_logger_logger.Logger) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:36](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L36) + +___ + +### yagnaOptions + +• `Optional` **yagnaOptions**: [`YagnaOptions`](../modules/shared_yagna_yagnaApi#yagnaoptions) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L37) + +___ + +### setup + +• `Optional` **setup**: [`LifecycleFunction`](../modules/activity_exe_unit_exe_unit#lifecyclefunction) + +this function is called as soon as the exe unit is ready + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:39](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L39) + +___ + +### teardown + +• `Optional` **teardown**: [`LifecycleFunction`](../modules/activity_exe_unit_exe_unit#lifecyclefunction) + +this function is called before the exe unit is destroyed + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:41](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L41) + +___ + +### executionOptions + +• `Optional` **executionOptions**: [`ExecutionOptions`](activity_exe_script_executor.ExecutionOptions) + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:42](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L42) + +___ + +### signalOrTimeout + +• `Optional` **signalOrTimeout**: `number` \| `AbortSignal` + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:43](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L43) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_results.ResultData.md b/src/pages/docs/golem-js/reference/interfaces/activity_results.ResultData.md index 0fdb25512..2ce7eeddb 100644 --- a/src/pages/docs/golem-js/reference/interfaces/activity_results.ResultData.md +++ b/src/pages/docs/golem-js/reference/interfaces/activity_results.ResultData.md @@ -41,7 +41,7 @@ Index of script command #### Defined in -[src/activity/results.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L10) +[src/activity/results.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L8) ___ @@ -53,19 +53,19 @@ The datetime of the event on which the result was received #### Defined in -[src/activity/results.ts:12](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L12) +[src/activity/results.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L10) ___ ### result -• **result**: `ExeScriptCommandResultResultEnum` +• **result**: ``"Ok"`` \| ``"Error"`` If is success #### Defined in -[src/activity/results.ts:14](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L14) +[src/activity/results.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L12) ___ @@ -77,7 +77,7 @@ stdout of script command #### Defined in -[src/activity/results.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L16) +[src/activity/results.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L14) ___ @@ -89,7 +89,7 @@ stderr of script command #### Defined in -[src/activity/results.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L18) +[src/activity/results.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L16) ___ @@ -101,7 +101,7 @@ an error message if the result is not successful #### Defined in -[src/activity/results.ts:20](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L20) +[src/activity/results.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L18) ___ @@ -113,7 +113,7 @@ Is batch of already finished #### Defined in -[src/activity/results.ts:22](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L22) +[src/activity/results.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L20) ___ @@ -125,4 +125,4 @@ In case the command was related to upload or download, this will contain the tra #### Defined in -[src/activity/results.ts:25](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L25) +[src/activity/results.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L23) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_results.RuntimeEventFinished.md b/src/pages/docs/golem-js/reference/interfaces/activity_results.RuntimeEventFinished.md new file mode 100644 index 000000000..ce5bf852f --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/activity_results.RuntimeEventFinished.md @@ -0,0 +1,36 @@ +--- +title: "Interface RuntimeEventFinished" +pageTitle: "Interface RuntimeEventFinished - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface RuntimeEventFinished within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: RuntimeEventFinished + +[activity/results](../modules/activity_results).RuntimeEventFinished + +## Table of contents + +### Properties + +- [return\_code](activity_results.RuntimeEventFinished#return_code) +- [message](activity_results.RuntimeEventFinished#message) + +## Properties + +### return\_code + +• **return\_code**: `number` + +#### Defined in + +[src/activity/results.ts:90](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L90) + +___ + +### message + +• **message**: ``null`` \| `string` + +#### Defined in + +[src/activity/results.ts:91](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L91) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_results.RuntimeEventKind.md b/src/pages/docs/golem-js/reference/interfaces/activity_results.RuntimeEventKind.md index 22e8da1ca..6d65bf38d 100644 --- a/src/pages/docs/golem-js/reference/interfaces/activity_results.RuntimeEventKind.md +++ b/src/pages/docs/golem-js/reference/interfaces/activity_results.RuntimeEventKind.md @@ -21,11 +21,11 @@ type: "JS API Reference" ### started -• `Optional` **started**: `RuntimeEventStarted` +• `Optional` **started**: [`RuntimeEventStarted`](activity_results.RuntimeEventStarted) #### Defined in -[src/activity/results.ts:79](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L79) +[src/activity/results.ts:77](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L77) ___ @@ -35,7 +35,7 @@ ___ #### Defined in -[src/activity/results.ts:80](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L80) +[src/activity/results.ts:78](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L78) ___ @@ -45,14 +45,14 @@ ___ #### Defined in -[src/activity/results.ts:81](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L81) +[src/activity/results.ts:79](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L79) ___ ### finished -• `Optional` **finished**: `RuntimeEventFinished` +• `Optional` **finished**: [`RuntimeEventFinished`](activity_results.RuntimeEventFinished) #### Defined in -[src/activity/results.ts:82](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L82) +[src/activity/results.ts:80](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L80) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_results.RuntimeEventStarted.md b/src/pages/docs/golem-js/reference/interfaces/activity_results.RuntimeEventStarted.md new file mode 100644 index 000000000..f693b0bb3 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/activity_results.RuntimeEventStarted.md @@ -0,0 +1,25 @@ +--- +title: "Interface RuntimeEventStarted" +pageTitle: "Interface RuntimeEventStarted - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface RuntimeEventStarted within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: RuntimeEventStarted + +[activity/results](../modules/activity_results).RuntimeEventStarted + +## Table of contents + +### Properties + +- [command](activity_results.RuntimeEventStarted#command) + +## Properties + +### command + +• **command**: `object` + +#### Defined in + +[src/activity/results.ts:84](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L84) diff --git a/src/pages/docs/golem-js/reference/interfaces/activity_results.StreamingBatchEvent.md b/src/pages/docs/golem-js/reference/interfaces/activity_results.StreamingBatchEvent.md index 378667c51..b9a9a1a8e 100644 --- a/src/pages/docs/golem-js/reference/interfaces/activity_results.StreamingBatchEvent.md +++ b/src/pages/docs/golem-js/reference/interfaces/activity_results.StreamingBatchEvent.md @@ -25,7 +25,7 @@ type: "JS API Reference" #### Defined in -[src/activity/results.ts:72](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L72) +[src/activity/results.ts:70](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L70) ___ @@ -35,7 +35,7 @@ ___ #### Defined in -[src/activity/results.ts:73](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L73) +[src/activity/results.ts:71](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L71) ___ @@ -45,7 +45,7 @@ ___ #### Defined in -[src/activity/results.ts:74](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L74) +[src/activity/results.ts:72](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L72) ___ @@ -55,4 +55,4 @@ ___ #### Defined in -[src/activity/results.ts:75](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L75) +[src/activity/results.ts:73](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/results.ts#L73) diff --git a/src/pages/docs/golem-js/reference/interfaces/agreement_agreement.ProviderInfo.md b/src/pages/docs/golem-js/reference/interfaces/agreement_agreement.ProviderInfo.md deleted file mode 100644 index d3235f214..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/agreement_agreement.ProviderInfo.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "Interface ProviderInfo" -pageTitle: "Interface ProviderInfo - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface ProviderInfo within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: ProviderInfo - -[agreement/agreement](../modules/agreement_agreement).ProviderInfo - -## Table of contents - -### Properties - -- [name](agreement_agreement.ProviderInfo#name) -- [id](agreement_agreement.ProviderInfo#id) -- [walletAddress](agreement_agreement.ProviderInfo#walletaddress) - -## Properties - -### name - -• **name**: `string` - -#### Defined in - -[src/agreement/agreement.ts:11](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/agreement.ts#L11) - -___ - -### id - -• **id**: `string` - -#### Defined in - -[src/agreement/agreement.ts:12](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/agreement.ts#L12) - -___ - -### walletAddress - -• **walletAddress**: `string` - -#### Defined in - -[src/agreement/agreement.ts:13](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/agreement.ts#L13) diff --git a/src/pages/docs/golem-js/reference/interfaces/agreement_service.AgreementDTO.md b/src/pages/docs/golem-js/reference/interfaces/agreement_service.AgreementDTO.md deleted file mode 100644 index c43b38944..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/agreement_service.AgreementDTO.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: "Interface AgreementDTO" -pageTitle: "Interface AgreementDTO - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface AgreementDTO within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: AgreementDTO - -[agreement/service](../modules/agreement_service).AgreementDTO - -## Table of contents - -### Properties - -- [id](agreement_service.AgreementDTO#id) -- [provider](agreement_service.AgreementDTO#provider) - -## Properties - -### id - -• **id**: `string` - -#### Defined in - -[src/agreement/service.ts:9](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L9) - -___ - -### provider - -• **provider**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `name` | `string` | - -#### Defined in - -[src/agreement/service.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L10) diff --git a/src/pages/docs/golem-js/reference/interfaces/agreement_service.AgreementServiceOptions.md b/src/pages/docs/golem-js/reference/interfaces/agreement_service.AgreementServiceOptions.md deleted file mode 100644 index bf209e95e..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/agreement_service.AgreementServiceOptions.md +++ /dev/null @@ -1,157 +0,0 @@ ---- -title: "Interface AgreementServiceOptions" -pageTitle: "Interface AgreementServiceOptions - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface AgreementServiceOptions within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: AgreementServiceOptions - -[agreement/service](../modules/agreement_service).AgreementServiceOptions - -## Hierarchy - -- `AgreementOptions` - - ↳ **`AgreementServiceOptions`** - -## Table of contents - -### Properties - -- [agreementSelector](agreement_service.AgreementServiceOptions#agreementselector) -- [agreementMaxEvents](agreement_service.AgreementServiceOptions#agreementmaxevents) -- [agreementEventsFetchingIntervalSec](agreement_service.AgreementServiceOptions#agreementeventsfetchingintervalsec) -- [agreementMaxPoolSize](agreement_service.AgreementServiceOptions#agreementmaxpoolsize) -- [yagnaOptions](agreement_service.AgreementServiceOptions#yagnaoptions) -- [agreementRequestTimeout](agreement_service.AgreementServiceOptions#agreementrequesttimeout) -- [agreementWaitingForApprovalTimeout](agreement_service.AgreementServiceOptions#agreementwaitingforapprovaltimeout) -- [logger](agreement_service.AgreementServiceOptions#logger) -- [eventTarget](agreement_service.AgreementServiceOptions#eventtarget) - -## Properties - -### agreementSelector - -• `Optional` **agreementSelector**: [`AgreementSelector`](../modules/agreement_service#agreementselector) - -The selector used when choosing a provider from a pool of existing offers (from the market or already used before) - -#### Defined in - -[src/agreement/service.ts:22](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L22) - -___ - -### agreementMaxEvents - -• `Optional` **agreementMaxEvents**: `number` - -The maximum number of events fetched in one request call - -#### Defined in - -[src/agreement/service.ts:24](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L24) - -___ - -### agreementEventsFetchingIntervalSec - -• `Optional` **agreementEventsFetchingIntervalSec**: `number` - -interval for fetching agreement events - -#### Defined in - -[src/agreement/service.ts:26](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L26) - -___ - -### agreementMaxPoolSize - -• `Optional` **agreementMaxPoolSize**: `number` - -The maximum number of agreements stored in the pool - -#### Defined in - -[src/agreement/service.ts:28](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L28) - -___ - -### yagnaOptions - -• `Optional` **yagnaOptions**: [`YagnaOptions`](../modules/executor_executor#yagnaoptions) - -yagnaOptions - -#### Inherited from - -AgreementOptions.yagnaOptions - -#### Defined in - -[src/agreement/agreement.ts:34](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/agreement.ts#L34) - -___ - -### agreementRequestTimeout - -• `Optional` **agreementRequestTimeout**: `number` - -timeout for create agreement and refresh details in ms - -#### Inherited from - -AgreementOptions.agreementRequestTimeout - -#### Defined in - -[src/agreement/agreement.ts:36](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/agreement.ts#L36) - -___ - -### agreementWaitingForApprovalTimeout - -• `Optional` **agreementWaitingForApprovalTimeout**: `number` - -timeout for wait for provider approval after requestor confirmation in ms - -#### Inherited from - -AgreementOptions.agreementWaitingForApprovalTimeout - -#### Defined in - -[src/agreement/agreement.ts:38](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/agreement.ts#L38) - -___ - -### logger - -• `Optional` **logger**: [`Logger`](utils_logger_logger.Logger) - -Logger module - -#### Inherited from - -AgreementOptions.logger - -#### Defined in - -[src/agreement/agreement.ts:40](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/agreement.ts#L40) - -___ - -### eventTarget - -• `Optional` **eventTarget**: `EventTarget` - -Event Bus implements EventTarget - -#### Inherited from - -AgreementOptions.eventTarget - -#### Defined in - -[src/agreement/agreement.ts:42](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/agreement.ts#L42) diff --git a/src/pages/docs/golem-js/reference/interfaces/executor_events.TaskExecutorEventsDict.md b/src/pages/docs/golem-js/reference/interfaces/executor_events.TaskExecutorEventsDict.md deleted file mode 100644 index 6472362fc..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/executor_events.TaskExecutorEventsDict.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: "Interface TaskExecutorEventsDict" -pageTitle: "Interface TaskExecutorEventsDict - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface TaskExecutorEventsDict within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: TaskExecutorEventsDict - -[executor/events](../modules/executor_events).TaskExecutorEventsDict - -This interface describes events emitted by `TaskExecutor` through `TaskExecutor.events` object. - -## Table of contents - -### Properties - -- [ready](executor_events.TaskExecutorEventsDict#ready) -- [beforeEnd](executor_events.TaskExecutorEventsDict#beforeend) -- [end](executor_events.TaskExecutorEventsDict#end) - -## Properties - -### ready - -• **ready**: () => `void` - -Fires when task executor is initialized and ready to be used. - -#### Type declaration - -▸ (): `void` - -Fires when task executor is initialized and ready to be used. - -##### Returns - -`void` - -#### Defined in - -[src/executor/events.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/events.ts#L8) - -___ - -### beforeEnd - -• **beforeEnd**: () => `void` - -Fires when task executor is about to shut down, immediately after TaskExecutor.shutdown() is called. - -#### Type declaration - -▸ (): `void` - -Fires when task executor is about to shut down, immediately after TaskExecutor.shutdown() is called. - -##### Returns - -`void` - -#### Defined in - -[src/executor/events.ts:14](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/events.ts#L14) - -___ - -### end - -• **end**: () => `void` - -Fires when task executor is completely terminated. - -#### Type declaration - -▸ (): `void` - -Fires when task executor is completely terminated. - -##### Returns - -`void` - -#### Defined in - -[src/executor/events.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/events.ts#L19) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_deployment_builder.CreateResourceRentalPoolOptions.md b/src/pages/docs/golem-js/reference/interfaces/experimental_deployment_builder.CreateResourceRentalPoolOptions.md new file mode 100644 index 000000000..f59343e5a --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_deployment_builder.CreateResourceRentalPoolOptions.md @@ -0,0 +1,108 @@ +--- +title: "Interface CreateResourceRentalPoolOptions" +pageTitle: "Interface CreateResourceRentalPoolOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface CreateResourceRentalPoolOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: CreateResourceRentalPoolOptions + +[experimental/deployment/builder](../modules/experimental_deployment_builder).CreateResourceRentalPoolOptions + +Represents the order specifications which will result in access to ResourceRental. + +## Hierarchy + +- [`MarketOrderSpec`](golem_network_golem_network.MarketOrderSpec) + + ↳ **`CreateResourceRentalPoolOptions`** + +## Table of contents + +### Properties + +- [deployment](experimental_deployment_builder.CreateResourceRentalPoolOptions#deployment) +- [demand](experimental_deployment_builder.CreateResourceRentalPoolOptions#demand) +- [market](experimental_deployment_builder.CreateResourceRentalPoolOptions#market) +- [activity](experimental_deployment_builder.CreateResourceRentalPoolOptions#activity) +- [payment](experimental_deployment_builder.CreateResourceRentalPoolOptions#payment) +- [network](experimental_deployment_builder.CreateResourceRentalPoolOptions#network) + +## Properties + +### deployment + +• **deployment**: [`DeploymentOptions`](experimental_deployment_builder.DeploymentOptions) + +#### Defined in + +[src/experimental/deployment/builder.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/builder.ts#L13) + +___ + +### demand + +• **demand**: [`BuildDemandOptions`](../modules/market_demand_demand#builddemandoptions) + +#### Inherited from + +[MarketOrderSpec](golem_network_golem_network.MarketOrderSpec).[demand](golem_network_golem_network.MarketOrderSpec#demand) + +#### Defined in + +[src/golem-network/golem-network.ts:126](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L126) + +___ + +### market + +• **market**: [`MarketOptions`](market_market_module.MarketOptions) + +#### Inherited from + +[MarketOrderSpec](golem_network_golem_network.MarketOrderSpec).[market](golem_network_golem_network.MarketOrderSpec#market) + +#### Defined in + +[src/golem-network/golem-network.ts:127](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L127) + +___ + +### activity + +• `Optional` **activity**: [`ExecutionOptions`](activity_exe_script_executor.ExecutionOptions) + +#### Inherited from + +[MarketOrderSpec](golem_network_golem_network.MarketOrderSpec).[activity](golem_network_golem_network.MarketOrderSpec#activity) + +#### Defined in + +[src/golem-network/golem-network.ts:128](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L128) + +___ + +### payment + +• `Optional` **payment**: `Partial`\<[`PaymentProcessOptions`](payment_agreement_payment_process.PaymentProcessOptions)\> & `AllocationOptions` + +#### Inherited from + +[MarketOrderSpec](golem_network_golem_network.MarketOrderSpec).[payment](golem_network_golem_network.MarketOrderSpec#payment) + +#### Defined in + +[src/golem-network/golem-network.ts:129](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L129) + +___ + +### network + +• `Optional` **network**: [`Network`](../classes/network_network.Network) + +#### Inherited from + +[MarketOrderSpec](golem_network_golem_network.MarketOrderSpec).[network](golem_network_golem_network.MarketOrderSpec#network) + +#### Defined in + +[src/golem-network/golem-network.ts:130](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L130) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_deployment_builder.DeploymentOptions.md b/src/pages/docs/golem-js/reference/interfaces/experimental_deployment_builder.DeploymentOptions.md new file mode 100644 index 000000000..b6178b43a --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_deployment_builder.DeploymentOptions.md @@ -0,0 +1,36 @@ +--- +title: "Interface DeploymentOptions" +pageTitle: "Interface DeploymentOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface DeploymentOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: DeploymentOptions + +[experimental/deployment/builder](../modules/experimental_deployment_builder).DeploymentOptions + +## Table of contents + +### Properties + +- [replicas](experimental_deployment_builder.DeploymentOptions#replicas) +- [network](experimental_deployment_builder.DeploymentOptions#network) + +## Properties + +### replicas + +• **replicas**: `number` \| \{ `min`: `number` ; `max`: `number` } + +#### Defined in + +[src/experimental/deployment/builder.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/builder.ts#L8) + +___ + +### network + +• `Optional` **network**: `string` + +#### Defined in + +[src/experimental/deployment/builder.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/builder.ts#L9) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_deployment_deployment.DeploymentEvents.md b/src/pages/docs/golem-js/reference/interfaces/experimental_deployment_deployment.DeploymentEvents.md new file mode 100644 index 000000000..b190bc18e --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_deployment_deployment.DeploymentEvents.md @@ -0,0 +1,77 @@ +--- +title: "Interface DeploymentEvents" +pageTitle: "Interface DeploymentEvents - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface DeploymentEvents within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: DeploymentEvents + +[experimental/deployment/deployment](../modules/experimental_deployment_deployment).DeploymentEvents + +## Table of contents + +### Properties + +- [ready](experimental_deployment_deployment.DeploymentEvents#ready) +- [beforeEnd](experimental_deployment_deployment.DeploymentEvents#beforeend) +- [end](experimental_deployment_deployment.DeploymentEvents#end) + +## Properties + +### ready + +• **ready**: () => `void` + +Fires when backend is started. + +#### Type declaration + +▸ (): `void` + +##### Returns + +`void` + +#### Defined in + +[src/experimental/deployment/deployment.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L26) + +___ + +### beforeEnd + +• **beforeEnd**: () => `void` + +Fires when backend is about to be stopped. + +#### Type declaration + +▸ (): `void` + +##### Returns + +`void` + +#### Defined in + +[src/experimental/deployment/deployment.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L37) + +___ + +### end + +• **end**: () => `void` + +Fires when backend is completely terminated. + +#### Type declaration + +▸ (): `void` + +##### Returns + +`void` + +#### Defined in + +[src/experimental/deployment/deployment.ts:42](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L42) diff --git a/src/pages/docs/golem-js/reference/interfaces/job_job.JobEventsDict.md b/src/pages/docs/golem-js/reference/interfaces/experimental_job_job.JobEventsDict.md similarity index 56% rename from src/pages/docs/golem-js/reference/interfaces/job_job.JobEventsDict.md rename to src/pages/docs/golem-js/reference/interfaces/experimental_job_job.JobEventsDict.md index e6ff00501..37b8ed1ad 100644 --- a/src/pages/docs/golem-js/reference/interfaces/job_job.JobEventsDict.md +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_job_job.JobEventsDict.md @@ -6,18 +6,18 @@ type: "JS API Reference" --- # Interface: JobEventsDict -[job/job](../modules/job_job).JobEventsDict +[experimental/job/job](../modules/experimental_job_job).JobEventsDict ## Table of contents ### Properties -- [created](job_job.JobEventsDict#created) -- [started](job_job.JobEventsDict#started) -- [success](job_job.JobEventsDict#success) -- [error](job_job.JobEventsDict#error) -- [canceled](job_job.JobEventsDict#canceled) -- [ended](job_job.JobEventsDict#ended) +- [created](experimental_job_job.JobEventsDict#created) +- [started](experimental_job_job.JobEventsDict#started) +- [success](experimental_job_job.JobEventsDict#success) +- [error](experimental_job_job.JobEventsDict#error) +- [canceled](experimental_job_job.JobEventsDict#canceled) +- [ended](experimental_job_job.JobEventsDict#ended) ## Properties @@ -31,15 +31,13 @@ Emitted immediately after the job is created and initialization begins. ▸ (): `void` -Emitted immediately after the job is created and initialization begins. - ##### Returns `void` #### Defined in -[src/job/job.ts:31](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L31) +[src/experimental/job/job.ts:32](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L32) ___ @@ -53,15 +51,13 @@ Emitted when the job finishes initialization and work begins. ▸ (): `void` -Emitted when the job finishes initialization and work begins. - ##### Returns `void` #### Defined in -[src/job/job.ts:35](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L35) +[src/experimental/job/job.ts:36](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L36) ___ @@ -75,15 +71,13 @@ Emitted when the job completes successfully and cleanup begins. ▸ (): `void` -Emitted when the job completes successfully and cleanup begins. - ##### Returns `void` #### Defined in -[src/job/job.ts:39](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L39) +[src/experimental/job/job.ts:40](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L40) ___ @@ -97,8 +91,6 @@ Emitted when the job fails and cleanup begins. ▸ (`error`): `void` -Emitted when the job fails and cleanup begins. - ##### Parameters | Name | Type | @@ -111,7 +103,7 @@ Emitted when the job fails and cleanup begins. #### Defined in -[src/job/job.ts:43](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L43) +[src/experimental/job/job.ts:44](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L44) ___ @@ -125,15 +117,13 @@ Emitted when the job is canceled by the user. ▸ (): `void` -Emitted when the job is canceled by the user. - ##### Returns `void` #### Defined in -[src/job/job.ts:47](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L47) +[src/experimental/job/job.ts:48](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L48) ___ @@ -147,12 +137,10 @@ Emitted when the job finishes cleanup after success, error or cancelation. ▸ (): `void` -Emitted when the job finishes cleanup after success, error or cancelation. - ##### Returns `void` #### Defined in -[src/job/job.ts:51](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L51) +[src/experimental/job/job.ts:52](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L52) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ProposalFilterOptions.md b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ProposalFilterOptions.md new file mode 100644 index 000000000..b3dcda63a --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ProposalFilterOptions.md @@ -0,0 +1,46 @@ +--- +title: "Interface ProposalFilterOptions" +pageTitle: "Interface ProposalFilterOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ProposalFilterOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ProposalFilterOptions + +[experimental/reputation/types](../modules/experimental_reputation_types).ProposalFilterOptions + +Options for the proposal filter. + +## Table of contents + +### Properties + +- [acceptUnlisted](experimental_reputation_types.ProposalFilterOptions#acceptunlisted) +- [min](experimental_reputation_types.ProposalFilterOptions#min) + +## Properties + +### acceptUnlisted + +• `Optional` **acceptUnlisted**: `boolean` + +Should providers with no reputation data be accepted. + +Default is false if there are listed providers, true if there are no listed providers. + +#### Defined in + +[src/experimental/reputation/types.ts:85](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L85) + +___ + +### min + +• `Optional` **min**: `number` + +Minimum weighted score a provider on the list needs to have in order to not get rejected. + +Default is `DEFAULT_PROPOSAL_MIN_SCORE`. + +#### Defined in + +[src/experimental/reputation/types.ts:92](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L92) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ProposalSelectorOptions.md b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ProposalSelectorOptions.md new file mode 100644 index 000000000..8f5037e9b --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ProposalSelectorOptions.md @@ -0,0 +1,33 @@ +--- +title: "Interface ProposalSelectorOptions" +pageTitle: "Interface ProposalSelectorOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ProposalSelectorOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ProposalSelectorOptions + +[experimental/reputation/types](../modules/experimental_reputation_types).ProposalSelectorOptions + +Options for the agreement selector. + +## Table of contents + +### Properties + +- [topPoolSize](experimental_reputation_types.ProposalSelectorOptions#toppoolsize) + +## Properties + +### topPoolSize + +• `Optional` **topPoolSize**: `number` + +The size of top provider pool used to pick a random one. + +If you want to just use the best available one, set this to 1. + +Default is `DEFAULT_AGREEMENT_TOP_POOL_SIZE`. + +#### Defined in + +[src/experimental/reputation/types.ts:107](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L107) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationConfig.md b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationConfig.md new file mode 100644 index 000000000..a167c3ea5 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationConfig.md @@ -0,0 +1,70 @@ +--- +title: "Interface ReputationConfig" +pageTitle: "Interface ReputationConfig - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ReputationConfig within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ReputationConfig + +[experimental/reputation/types](../modules/experimental_reputation_types).ReputationConfig + +Configuration for ReputationSystem class. + +## Table of contents + +### Properties + +- [url](experimental_reputation_types.ReputationConfig#url) +- [paymentNetwork](experimental_reputation_types.ReputationConfig#paymentnetwork) +- [logger](experimental_reputation_types.ReputationConfig#logger) +- [preset](experimental_reputation_types.ReputationConfig#preset) + +## Properties + +### url + +• `Optional` **url**: `string` + +Reputation service URL + +#### Defined in + +[src/experimental/reputation/types.ts:160](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L160) + +___ + +### paymentNetwork + +• `Optional` **paymentNetwork**: `string` + +Network to query data for. + +This is the main filter for the data. + +You can leave it empty if you are controlling the payment network through `PAYMENT_NETWORK` environment variable. + +#### Defined in + +[src/experimental/reputation/types.ts:169](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L169) + +___ + +### logger + +• `Optional` **logger**: [`Logger`](shared_utils_logger_logger.Logger) + +Logger to use. + +#### Defined in + +[src/experimental/reputation/types.ts:174](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L174) + +___ + +### preset + +• `Optional` **preset**: keyof ReputationPresets + +#### Defined in + +[src/experimental/reputation/types.ts:176](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L176) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationData.md b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationData.md new file mode 100644 index 000000000..e90febb38 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationData.md @@ -0,0 +1,60 @@ +--- +title: "Interface ReputationData" +pageTitle: "Interface ReputationData - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ReputationData within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ReputationData + +[experimental/reputation/types](../modules/experimental_reputation_types).ReputationData + +Reputation data. + +## Table of contents + +### Properties + +- [testedProviders](experimental_reputation_types.ReputationData#testedproviders) +- [rejectedProviders](experimental_reputation_types.ReputationData#rejectedproviders) +- [rejectedOperators](experimental_reputation_types.ReputationData#rejectedoperators) +- [untestedProviders](experimental_reputation_types.ReputationData#untestedproviders) + +## Properties + +### testedProviders + +• **testedProviders**: [`ReputationProviderEntry`](experimental_reputation_types.ReputationProviderEntry)[] + +#### Defined in + +[src/experimental/reputation/types.ts:69](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L69) + +___ + +### rejectedProviders + +• `Optional` **rejectedProviders**: [`ReputationRejectedProvider`](experimental_reputation_types.ReputationRejectedProvider)[] + +#### Defined in + +[src/experimental/reputation/types.ts:70](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L70) + +___ + +### rejectedOperators + +• `Optional` **rejectedOperators**: [`ReputationRejectedOperator`](experimental_reputation_types.ReputationRejectedOperator)[] + +#### Defined in + +[src/experimental/reputation/types.ts:71](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L71) + +___ + +### untestedProviders + +• `Optional` **untestedProviders**: [`ReputationUntestedProvider`](experimental_reputation_types.ReputationUntestedProvider)[] + +#### Defined in + +[src/experimental/reputation/types.ts:72](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L72) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationPreset.md b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationPreset.md new file mode 100644 index 000000000..b9fec047b --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationPreset.md @@ -0,0 +1,38 @@ +--- +title: "Interface ReputationPreset" +pageTitle: "Interface ReputationPreset - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ReputationPreset within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ReputationPreset + +[experimental/reputation/types](../modules/experimental_reputation_types).ReputationPreset + +Preset configuration for reputation system. + +## Table of contents + +### Properties + +- [proposalFilter](experimental_reputation_types.ReputationPreset#proposalfilter) +- [proposalSelector](experimental_reputation_types.ReputationPreset#proposalselector) + +## Properties + +### proposalFilter + +• `Optional` **proposalFilter**: [`ProposalFilterOptions`](experimental_reputation_types.ProposalFilterOptions) & [`ReputationWeightsMixin`](experimental_reputation_types.ReputationWeightsMixin) + +#### Defined in + +[src/experimental/reputation/types.ts:130](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L130) + +___ + +### proposalSelector + +• `Optional` **proposalSelector**: [`ProposalSelectorOptions`](experimental_reputation_types.ProposalSelectorOptions) & [`ReputationWeightsMixin`](experimental_reputation_types.ReputationWeightsMixin) + +#### Defined in + +[src/experimental/reputation/types.ts:131](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L131) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationPresets.md b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationPresets.md new file mode 100644 index 000000000..f0afb04ac --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationPresets.md @@ -0,0 +1,38 @@ +--- +title: "Interface ReputationPresets" +pageTitle: "Interface ReputationPresets - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ReputationPresets within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ReputationPresets + +[experimental/reputation/types](../modules/experimental_reputation_types).ReputationPresets + +Interface for predefined reputation presets. + +## Table of contents + +### Properties + +- [compute](experimental_reputation_types.ReputationPresets#compute) +- [service](experimental_reputation_types.ReputationPresets#service) + +## Properties + +### compute + +• **compute**: [`ReputationPreset`](experimental_reputation_types.ReputationPreset) + +#### Defined in + +[src/experimental/reputation/types.ts:140](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L140) + +___ + +### service + +• **service**: [`ReputationPreset`](experimental_reputation_types.ReputationPreset) + +#### Defined in + +[src/experimental/reputation/types.ts:141](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L141) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationProviderEntry.md b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationProviderEntry.md new file mode 100644 index 000000000..6cf2d2548 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationProviderEntry.md @@ -0,0 +1,38 @@ +--- +title: "Interface ReputationProviderEntry" +pageTitle: "Interface ReputationProviderEntry - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ReputationProviderEntry within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ReputationProviderEntry + +[experimental/reputation/types](../modules/experimental_reputation_types).ReputationProviderEntry + +Reputation provider entry. + +## Table of contents + +### Properties + +- [provider](experimental_reputation_types.ReputationProviderEntry#provider) +- [scores](experimental_reputation_types.ReputationProviderEntry#scores) + +## Properties + +### provider + +• **provider**: [`ProviderInfo`](market_agreement_agreement.ProviderInfo) + +#### Defined in + +[src/experimental/reputation/types.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L29) + +___ + +### scores + +• **scores**: [`ReputationProviderScores`](experimental_reputation_types.ReputationProviderScores) + +#### Defined in + +[src/experimental/reputation/types.ts:30](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L30) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationProviderScores.md b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationProviderScores.md new file mode 100644 index 000000000..850c173a3 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationProviderScores.md @@ -0,0 +1,72 @@ +--- +title: "Interface ReputationProviderScores" +pageTitle: "Interface ReputationProviderScores - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ReputationProviderScores within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ReputationProviderScores + +[experimental/reputation/types](../modules/experimental_reputation_types).ReputationProviderScores + +Set of normalized scores for a provider. + +All values are between 0 and 1. + +Higher score is better. + +## Table of contents + +### Properties + +- [successRate](experimental_reputation_types.ReputationProviderScores#successrate) +- [uptime](experimental_reputation_types.ReputationProviderScores#uptime) +- [cpuSingleThreadScore](experimental_reputation_types.ReputationProviderScores#cpusinglethreadscore) +- [cpuMultiThreadScore](experimental_reputation_types.ReputationProviderScores#cpumultithreadscore) + +## Properties + +### successRate + +• **successRate**: `number` + +Percentage of successful tasks in the last "period" (last N test runs?) + +#### Defined in + +[src/experimental/reputation/types.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L15) + +___ + +### uptime + +• **uptime**: `number` + +Ping percentage that got responses. + +#### Defined in + +[src/experimental/reputation/types.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L17) + +___ + +### cpuSingleThreadScore + +• **cpuSingleThreadScore**: `number` + +CPU single threaded benchmark score. + +#### Defined in + +[src/experimental/reputation/types.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L19) + +___ + +### cpuMultiThreadScore + +• **cpuMultiThreadScore**: `number` + +CPU multi-thread benchmark score. + +#### Defined in + +[src/experimental/reputation/types.ts:21](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L21) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationRejectedOperator.md b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationRejectedOperator.md new file mode 100644 index 000000000..3c5d183cb --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationRejectedOperator.md @@ -0,0 +1,44 @@ +--- +title: "Interface ReputationRejectedOperator" +pageTitle: "Interface ReputationRejectedOperator - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ReputationRejectedOperator within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ReputationRejectedOperator + +[experimental/reputation/types](../modules/experimental_reputation_types).ReputationRejectedOperator + +Information about a rejected operator. + +## Table of contents + +### Properties + +- [operator](experimental_reputation_types.ReputationRejectedOperator#operator) +- [reason](experimental_reputation_types.ReputationRejectedOperator#reason) + +## Properties + +### operator + +• **operator**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `walletAddress` | `string` | + +#### Defined in + +[src/experimental/reputation/types.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L38) + +___ + +### reason + +• `Optional` **reason**: `string` + +#### Defined in + +[src/experimental/reputation/types.ts:41](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L41) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationRejectedProvider.md b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationRejectedProvider.md new file mode 100644 index 000000000..4ecbe1b35 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationRejectedProvider.md @@ -0,0 +1,38 @@ +--- +title: "Interface ReputationRejectedProvider" +pageTitle: "Interface ReputationRejectedProvider - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ReputationRejectedProvider within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ReputationRejectedProvider + +[experimental/reputation/types](../modules/experimental_reputation_types).ReputationRejectedProvider + +Information about a rejected provider. + +## Table of contents + +### Properties + +- [provider](experimental_reputation_types.ReputationRejectedProvider#provider) +- [reason](experimental_reputation_types.ReputationRejectedProvider#reason) + +## Properties + +### provider + +• **provider**: [`ProviderInfo`](market_agreement_agreement.ProviderInfo) + +#### Defined in + +[src/experimental/reputation/types.ts:49](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L49) + +___ + +### reason + +• `Optional` **reason**: `string` + +#### Defined in + +[src/experimental/reputation/types.ts:50](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L50) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationUntestedProvider.md b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationUntestedProvider.md new file mode 100644 index 000000000..e4ebbc08b --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationUntestedProvider.md @@ -0,0 +1,44 @@ +--- +title: "Interface ReputationUntestedProvider" +pageTitle: "Interface ReputationUntestedProvider - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ReputationUntestedProvider within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ReputationUntestedProvider + +[experimental/reputation/types](../modules/experimental_reputation_types).ReputationUntestedProvider + +Information about untested provider. + +## Table of contents + +### Properties + +- [provider](experimental_reputation_types.ReputationUntestedProvider#provider) +- [scores](experimental_reputation_types.ReputationUntestedProvider#scores) + +## Properties + +### provider + +• **provider**: [`ProviderInfo`](market_agreement_agreement.ProviderInfo) + +#### Defined in + +[src/experimental/reputation/types.ts:58](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L58) + +___ + +### scores + +• **scores**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `uptime` | `number` | + +#### Defined in + +[src/experimental/reputation/types.ts:59](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L59) diff --git a/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationWeightsMixin.md b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationWeightsMixin.md new file mode 100644 index 000000000..4792a175e --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/experimental_reputation_types.ReputationWeightsMixin.md @@ -0,0 +1,27 @@ +--- +title: "Interface ReputationWeightsMixin" +pageTitle: "Interface ReputationWeightsMixin - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ReputationWeightsMixin within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ReputationWeightsMixin + +[experimental/reputation/types](../modules/experimental_reputation_types).ReputationWeightsMixin + +Mixin for objects with reputation weights. + +## Table of contents + +### Properties + +- [weights](experimental_reputation_types.ReputationWeightsMixin#weights) + +## Properties + +### weights + +• `Optional` **weights**: `Partial`\<[`ReputationProviderScores`](experimental_reputation_types.ReputationProviderScores)\> + +#### Defined in + +[src/experimental/reputation/types.ts:121](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L121) diff --git a/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.GolemNetworkEvents.md b/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.GolemNetworkEvents.md new file mode 100644 index 000000000..95f51a6d3 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.GolemNetworkEvents.md @@ -0,0 +1,83 @@ +--- +title: "Interface GolemNetworkEvents" +pageTitle: "Interface GolemNetworkEvents - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface GolemNetworkEvents within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: GolemNetworkEvents + +[golem-network/golem-network](../modules/golem_network_golem_network).GolemNetworkEvents + +## Table of contents + +### Properties + +- [connected](golem_network_golem_network.GolemNetworkEvents#connected) +- [error](golem_network_golem_network.GolemNetworkEvents#error) +- [disconnected](golem_network_golem_network.GolemNetworkEvents#disconnected) + +## Properties + +### connected + +• **connected**: () => `void` + +Fires when all startup operations related to GN are completed + +#### Type declaration + +▸ (): `void` + +##### Returns + +`void` + +#### Defined in + +[src/golem-network/golem-network.ts:135](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L135) + +___ + +### error + +• **error**: (`err`: `Error`) => `void` + +Fires when an error will be encountered + +#### Type declaration + +▸ (`err`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `err` | `Error` | + +##### Returns + +`void` + +#### Defined in + +[src/golem-network/golem-network.ts:138](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L138) + +___ + +### disconnected + +• **disconnected**: () => `void` + +Fires when all shutdown operations related to GN are completed + +#### Type declaration + +▸ (): `void` + +##### Returns + +`void` + +#### Defined in + +[src/golem-network/golem-network.ts:141](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L141) diff --git a/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.GolemNetworkOptions.md b/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.GolemNetworkOptions.md new file mode 100644 index 000000000..cef11ac35 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.GolemNetworkOptions.md @@ -0,0 +1,94 @@ +--- +title: "Interface GolemNetworkOptions" +pageTitle: "Interface GolemNetworkOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface GolemNetworkOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: GolemNetworkOptions + +[golem-network/golem-network](../modules/golem_network_golem_network).GolemNetworkOptions + +## Table of contents + +### Properties + +- [logger](golem_network_golem_network.GolemNetworkOptions#logger) +- [api](golem_network_golem_network.GolemNetworkOptions#api) +- [payment](golem_network_golem_network.GolemNetworkOptions#payment) +- [dataTransferProtocol](golem_network_golem_network.GolemNetworkOptions#datatransferprotocol) +- [override](golem_network_golem_network.GolemNetworkOptions#override) + +## Properties + +### logger + +• `Optional` **logger**: [`Logger`](shared_utils_logger_logger.Logger) + +Logger instance to use for logging. +If no logger is provided you can view debug logs by setting the +`DEBUG` environment variable to `golem-js:*`. + +#### Defined in + +[src/golem-network/golem-network.ts:78](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L78) + +___ + +### api + +• `Optional` **api**: `Object` + +Set the API key and URL for the Yagna API. + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `key?` | `string` | +| `url?` | `string` | + +#### Defined in + +[src/golem-network/golem-network.ts:82](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L82) + +___ + +### payment + +• `Optional` **payment**: `Partial`\<[`PaymentModuleOptions`](payment_payment_module.PaymentModuleOptions)\> + +Set payment-related options. +This is where you can specify the network, payment driver and more. +By default, the network is set to the `holesky` test network. + +#### Defined in + +[src/golem-network/golem-network.ts:91](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L91) + +___ + +### dataTransferProtocol + +• `Optional` **dataTransferProtocol**: [`DataTransferProtocol`](../modules/shared_types#datatransferprotocol) + +Set the data transfer protocol to use for file transfers. +Default is `gftp`. + +#### Defined in + +[src/golem-network/golem-network.ts:96](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L96) + +___ + +### override + +• `Optional` **override**: `Partial`\<[`GolemServices`](../modules/golem_network_golem_network#golemservices) & \{ `market`: [`InstanceOrFactory`](../modules/golem_network_golem_network#instanceorfactory)\<[`MarketModule`](market_market_module.MarketModule), `never`[]\> ; `payment`: [`InstanceOrFactory`](../modules/golem_network_golem_network#instanceorfactory)\<[`PaymentModule`](payment_payment_module.PaymentModule), `never`[]\> ; `activity`: [`InstanceOrFactory`](../modules/golem_network_golem_network#instanceorfactory)\<[`ActivityModule`](activity_activity_module.ActivityModule), `never`[]\> ; `network`: [`InstanceOrFactory`](../modules/golem_network_golem_network#instanceorfactory)\<[`NetworkModule`](network_network_module.NetworkModule), `never`[]\> ; `rental`: [`InstanceOrFactory`](../modules/golem_network_golem_network#instanceorfactory)\<[`RentalModule`](resource_rental_rental_module.RentalModule), `never`[]\> }\> + +Override some of the services used by the GolemNetwork instance. +This is useful for testing or when you want to provide your own implementation of some services. +Only set this if you know what you are doing. +To override a module you can pass either an instance of an object or a factory function (that we can call `new` on). + +#### Defined in + +[src/golem-network/golem-network.ts:103](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L103) diff --git a/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.ManyOfOptions.md b/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.ManyOfOptions.md new file mode 100644 index 000000000..886cfab6b --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.ManyOfOptions.md @@ -0,0 +1,58 @@ +--- +title: "Interface ManyOfOptions" +pageTitle: "Interface ManyOfOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ManyOfOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ManyOfOptions + +[golem-network/golem-network](../modules/golem_network_golem_network).ManyOfOptions + +## Table of contents + +### Properties + +- [order](golem_network_golem_network.ManyOfOptions#order) +- [concurrency](golem_network_golem_network.ManyOfOptions#concurrency) +- [setup](golem_network_golem_network.ManyOfOptions#setup) +- [teardown](golem_network_golem_network.ManyOfOptions#teardown) + +## Properties + +### order + +• **order**: [`MarketOrderSpec`](golem_network_golem_network.MarketOrderSpec) + +#### Defined in + +[src/golem-network/golem-network.ts:152](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L152) + +___ + +### concurrency + +• **concurrency**: [`Concurrency`](../modules/resource_rental_resource_rental_pool#concurrency) + +#### Defined in + +[src/golem-network/golem-network.ts:153](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L153) + +___ + +### setup + +• `Optional` **setup**: [`LifecycleFunction`](../modules/activity_exe_unit_exe_unit#lifecyclefunction) + +#### Defined in + +[src/golem-network/golem-network.ts:154](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L154) + +___ + +### teardown + +• `Optional` **teardown**: [`LifecycleFunction`](../modules/activity_exe_unit_exe_unit#lifecyclefunction) + +#### Defined in + +[src/golem-network/golem-network.ts:155](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L155) diff --git a/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.MarketOrderSpec.md b/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.MarketOrderSpec.md new file mode 100644 index 000000000..f80684978 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.MarketOrderSpec.md @@ -0,0 +1,77 @@ +--- +title: "Interface MarketOrderSpec" +pageTitle: "Interface MarketOrderSpec - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface MarketOrderSpec within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: MarketOrderSpec + +[golem-network/golem-network](../modules/golem_network_golem_network).MarketOrderSpec + +Represents the order specifications which will result in access to ResourceRental. + +## Hierarchy + +- **`MarketOrderSpec`** + + ↳ [`CreateResourceRentalPoolOptions`](experimental_deployment_builder.CreateResourceRentalPoolOptions) + +## Table of contents + +### Properties + +- [demand](golem_network_golem_network.MarketOrderSpec#demand) +- [market](golem_network_golem_network.MarketOrderSpec#market) +- [activity](golem_network_golem_network.MarketOrderSpec#activity) +- [payment](golem_network_golem_network.MarketOrderSpec#payment) +- [network](golem_network_golem_network.MarketOrderSpec#network) + +## Properties + +### demand + +• **demand**: [`BuildDemandOptions`](../modules/market_demand_demand#builddemandoptions) + +#### Defined in + +[src/golem-network/golem-network.ts:126](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L126) + +___ + +### market + +• **market**: [`MarketOptions`](market_market_module.MarketOptions) + +#### Defined in + +[src/golem-network/golem-network.ts:127](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L127) + +___ + +### activity + +• `Optional` **activity**: [`ExecutionOptions`](activity_exe_script_executor.ExecutionOptions) + +#### Defined in + +[src/golem-network/golem-network.ts:128](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L128) + +___ + +### payment + +• `Optional` **payment**: `Partial`\<[`PaymentProcessOptions`](payment_agreement_payment_process.PaymentProcessOptions)\> & `AllocationOptions` + +#### Defined in + +[src/golem-network/golem-network.ts:129](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L129) + +___ + +### network + +• `Optional` **network**: [`Network`](../classes/network_network.Network) + +#### Defined in + +[src/golem-network/golem-network.ts:130](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L130) diff --git a/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.OneOfOptions.md b/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.OneOfOptions.md new file mode 100644 index 000000000..d8760f134 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/golem_network_golem_network.OneOfOptions.md @@ -0,0 +1,58 @@ +--- +title: "Interface OneOfOptions" +pageTitle: "Interface OneOfOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface OneOfOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: OneOfOptions + +[golem-network/golem-network](../modules/golem_network_golem_network).OneOfOptions + +## Table of contents + +### Properties + +- [order](golem_network_golem_network.OneOfOptions#order) +- [signalOrTimeout](golem_network_golem_network.OneOfOptions#signalortimeout) +- [setup](golem_network_golem_network.OneOfOptions#setup) +- [teardown](golem_network_golem_network.OneOfOptions#teardown) + +## Properties + +### order + +• **order**: [`MarketOrderSpec`](golem_network_golem_network.MarketOrderSpec) + +#### Defined in + +[src/golem-network/golem-network.ts:145](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L145) + +___ + +### signalOrTimeout + +• `Optional` **signalOrTimeout**: `number` \| `AbortSignal` + +#### Defined in + +[src/golem-network/golem-network.ts:146](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L146) + +___ + +### setup + +• `Optional` **setup**: [`LifecycleFunction`](../modules/activity_exe_unit_exe_unit#lifecyclefunction) + +#### Defined in + +[src/golem-network/golem-network.ts:147](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L147) + +___ + +### teardown + +• `Optional` **teardown**: [`LifecycleFunction`](../modules/activity_exe_unit_exe_unit#lifecyclefunction) + +#### Defined in + +[src/golem-network/golem-network.ts:148](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L148) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_agreement_agreement.AgreementOptions.md b/src/pages/docs/golem-js/reference/interfaces/market_agreement_agreement.AgreementOptions.md new file mode 100644 index 000000000..72eee010d --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_agreement_agreement.AgreementOptions.md @@ -0,0 +1,36 @@ +--- +title: "Interface AgreementOptions" +pageTitle: "Interface AgreementOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface AgreementOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: AgreementOptions + +[market/agreement/agreement](../modules/market_agreement_agreement).AgreementOptions + +## Table of contents + +### Properties + +- [expirationSec](market_agreement_agreement.AgreementOptions#expirationsec) +- [waitingForApprovalTimeoutSec](market_agreement_agreement.AgreementOptions#waitingforapprovaltimeoutsec) + +## Properties + +### expirationSec + +• `Optional` **expirationSec**: `number` + +#### Defined in + +[src/market/agreement/agreement.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement.ts#L23) + +___ + +### waitingForApprovalTimeoutSec + +• `Optional` **waitingForApprovalTimeoutSec**: `number` + +#### Defined in + +[src/market/agreement/agreement.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement.ts#L24) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_agreement_agreement.IAgreementRepository.md b/src/pages/docs/golem-js/reference/interfaces/market_agreement_agreement.IAgreementRepository.md new file mode 100644 index 000000000..e4d94dfd0 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_agreement_agreement.IAgreementRepository.md @@ -0,0 +1,39 @@ +--- +title: "Interface IAgreementRepository" +pageTitle: "Interface IAgreementRepository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface IAgreementRepository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: IAgreementRepository + +[market/agreement/agreement](../modules/market_agreement_agreement).IAgreementRepository + +## Implemented by + +- [`AgreementRepository`](../classes/shared_yagna_repository_agreement_repository.AgreementRepository) + +## Table of contents + +### Methods + +- [getById](market_agreement_agreement.IAgreementRepository#getbyid) + +## Methods + +### getById + +▸ **getById**(`id`): `Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +#### Defined in + +[src/market/agreement/agreement.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement.ts#L28) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_agreement_agreement.ProviderInfo.md b/src/pages/docs/golem-js/reference/interfaces/market_agreement_agreement.ProviderInfo.md new file mode 100644 index 000000000..5cd75ac94 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_agreement_agreement.ProviderInfo.md @@ -0,0 +1,47 @@ +--- +title: "Interface ProviderInfo" +pageTitle: "Interface ProviderInfo - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ProviderInfo within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ProviderInfo + +[market/agreement/agreement](../modules/market_agreement_agreement).ProviderInfo + +## Table of contents + +### Properties + +- [name](market_agreement_agreement.ProviderInfo#name) +- [id](market_agreement_agreement.ProviderInfo#id) +- [walletAddress](market_agreement_agreement.ProviderInfo#walletaddress) + +## Properties + +### name + +• **name**: `string` + +#### Defined in + +[src/market/agreement/agreement.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement.ts#L17) + +___ + +### id + +• **id**: `string` + +#### Defined in + +[src/market/agreement/agreement.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement.ts#L18) + +___ + +### walletAddress + +• **walletAddress**: `string` + +#### Defined in + +[src/market/agreement/agreement.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement.ts#L19) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_api.IMarketApi.md b/src/pages/docs/golem-js/reference/interfaces/market_api.IMarketApi.md new file mode 100644 index 000000000..031899073 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_api.IMarketApi.md @@ -0,0 +1,340 @@ +--- +title: "Interface IMarketApi" +pageTitle: "Interface IMarketApi - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface IMarketApi within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: IMarketApi + +[market/api](../modules/market_api).IMarketApi + +## Implemented by + +- [`MarketApiAdapter`](../classes/shared_yagna_adapters_market_api_adapter.MarketApiAdapter) + +## Table of contents + +### Methods + +- [publishDemandSpecification](market_api.IMarketApi#publishdemandspecification) +- [unpublishDemand](market_api.IMarketApi#unpublishdemand) +- [collectMarketProposalEvents](market_api.IMarketApi#collectmarketproposalevents) +- [collectAgreementEvents](market_api.IMarketApi#collectagreementevents) +- [counterProposal](market_api.IMarketApi#counterproposal) +- [rejectProposal](market_api.IMarketApi#rejectproposal) +- [getPaymentRelatedDemandDecorations](market_api.IMarketApi#getpaymentrelateddemanddecorations) +- [getAgreement](market_api.IMarketApi#getagreement) +- [createAgreement](market_api.IMarketApi#createagreement) +- [proposeAgreement](market_api.IMarketApi#proposeagreement) +- [confirmAgreement](market_api.IMarketApi#confirmagreement) +- [terminateAgreement](market_api.IMarketApi#terminateagreement) +- [getAgreementState](market_api.IMarketApi#getagreementstate) + +## Methods + +### publishDemandSpecification + +▸ **publishDemandSpecification**(`specification`): `Promise`\<[`Demand`](../classes/market_demand_demand.Demand)\> + +Creates a new demand based on the given specification and publishes +it to the market. +Keep in mind that the demand lasts for a limited time and needs to be +refreshed periodically (see `refreshDemand` method). +Use `unpublishDemand` to remove the demand from the market. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `specification` | [`DemandSpecification`](../classes/market_demand_demand.DemandSpecification) | + +#### Returns + +`Promise`\<[`Demand`](../classes/market_demand_demand.Demand)\> + +#### Defined in + +[src/market/api.ts:58](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L58) + +___ + +### unpublishDemand + +▸ **unpublishDemand**(`demand`): `Promise`\<`void`\> + +Remove the given demand from the market. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demand` | [`Demand`](../classes/market_demand_demand.Demand) | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/market/api.ts:63](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L63) + +___ + +### collectMarketProposalEvents + +▸ **collectMarketProposalEvents**(`demand`): `Observable`\<[`MarketProposalEvent`](../modules/market_proposal_market_proposal_event#marketproposalevent)\> + +"Publishes" the demand on the network and stats to listen (event polling) for the events representing the feedback + +The feedback can fall into four categories: + +- (Initial) We will receive initial offer proposals that were matched by the yagna node which we're using +- (Negotiations) We will receive responses from providers with draft offer proposals if we decided to counter the initial proposal +- (Negotiations) We will receive an event representing rejection of our counter-proposal by the provider +- (Negotiations) We will receive a question from the provider about a certain property as part of the negotiation process (_protocol piece not by yagna 0.15_) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demand` | [`Demand`](../classes/market_demand_demand.Demand) | + +#### Returns + +`Observable`\<[`MarketProposalEvent`](../modules/market_proposal_market_proposal_event#marketproposalevent)\> + +A complex object that allows subscribing to these categories of feedback mentioned above + +#### Defined in + +[src/market/api.ts:79](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L79) + +___ + +### collectAgreementEvents + +▸ **collectAgreementEvents**(): `Observable`\<[`AgreementEvent`](../modules/market_agreement_agreement_event#agreementevent)\> + +Start looking at the Agreement related events + +#### Returns + +`Observable`\<[`AgreementEvent`](../modules/market_agreement_agreement_event#agreementevent)\> + +#### Defined in + +[src/market/api.ts:84](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L84) + +___ + +### counterProposal + +▸ **counterProposal**(`receivedProposal`, `specification`): `Promise`\<[`OfferCounterProposal`](../classes/market_proposal_offer_counter_proposal.OfferCounterProposal)\> + +Sends a counter-proposal to the given proposal. Returns the newly created counter-proposal. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `receivedProposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | +| `specification` | [`DemandSpecification`](../classes/market_demand_demand.DemandSpecification) | + +#### Returns + +`Promise`\<[`OfferCounterProposal`](../classes/market_proposal_offer_counter_proposal.OfferCounterProposal)\> + +#### Defined in + +[src/market/api.ts:89](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L89) + +___ + +### rejectProposal + +▸ **rejectProposal**(`receivedProposal`, `reason`): `Promise`\<`void`\> + +Sends a "reject" response for the proposal that was received from the Provider as part of the negotiation process + +On the protocol level this means that no further counter-proposals will be generated by the Requestor + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `receivedProposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | The proposal from the provider | +| `reason` | `string` | User readable reason that should be presented to the Provider | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/market/api.ts:99](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L99) + +___ + +### getPaymentRelatedDemandDecorations + +▸ **getPaymentRelatedDemandDecorations**(`allocationId`): `Promise`\<[`DemandBodyPrototype`](../modules/market_demand_demand_body_builder#demandbodyprototype)\> + +Fetches payment related decorations, based on the given allocation ID. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `allocationId` | `string` | The ID of the allocation that will be used to pay for computations related to the demand | + +#### Returns + +`Promise`\<[`DemandBodyPrototype`](../modules/market_demand_demand_body_builder#demandbodyprototype)\> + +#### Defined in + +[src/market/api.ts:107](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L107) + +___ + +### getAgreement + +▸ **getAgreement**(`id`): `Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +Retrieves an agreement based on the provided ID. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +#### Defined in + +[src/market/api.ts:112](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L112) + +___ + +### createAgreement + +▸ **createAgreement**(`proposal`, `options?`): `Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +Request creating an agreement from the provided proposal + +Use this method if you want to decide what should happen with the agreement after it is created + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | +| `options?` | [`AgreementOptions`](market_agreement_agreement.AgreementOptions) | + +#### Returns + +`Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +An agreement that's in a "Proposal" state (not yet usable for activity creation) + +#### Defined in + +[src/market/api.ts:121](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L121) + +___ + +### proposeAgreement + +▸ **proposeAgreement**(`proposal`, `options?`): `Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +Request creating an agreement from the provided proposal, send it to the Provider and wait for approval + +Use this method when you want to quickly finalize the deal with the Provider, but be ready for a rejection + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | +| `options?` | [`AgreementOptions`](market_agreement_agreement.AgreementOptions) | + +#### Returns + +`Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +An agreement that's already in an "Approved" state and can be used to create activities on the Provider + +#### Defined in + +[src/market/api.ts:130](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L130) + +___ + +### confirmAgreement + +▸ **confirmAgreement**(`agreement`, `options?`): `Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +Confirms the agreement with the provider + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | +| `options?` | [`AgreementOptions`](market_agreement_agreement.AgreementOptions) | + +#### Returns + +`Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +#### Defined in + +[src/market/api.ts:135](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L135) + +___ + +### terminateAgreement + +▸ **terminateAgreement**(`agreement`, `reason?`): `Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +Terminates an agreement. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | +| `reason?` | `string` | + +#### Returns + +`Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +#### Defined in + +[src/market/api.ts:140](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L140) + +___ + +### getAgreementState + +▸ **getAgreementState**(`id`): `Promise`\<[`AgreementState`](../modules/market_agreement_agreement#agreementstate)\> + +Retrieves the state of an agreement based on the provided agreement ID. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`AgreementState`](../modules/market_agreement_agreement#agreementstate)\> + +#### Defined in + +[src/market/api.ts:145](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L145) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_demand.DemandDetails.md b/src/pages/docs/golem-js/reference/interfaces/market_demand.DemandDetails.md deleted file mode 100644 index 80f7580af..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/market_demand.DemandDetails.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "Interface DemandDetails" -pageTitle: "Interface DemandDetails - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface DemandDetails within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: DemandDetails - -[market/demand](../modules/market_demand).DemandDetails - -## Table of contents - -### Properties - -- [properties](market_demand.DemandDetails#properties) -- [constraints](market_demand.DemandDetails#constraints) - -## Properties - -### properties - -• **properties**: \{ `key`: `string` ; `value`: `string` \| `number` \| `boolean` }[] - -#### Defined in - -[src/market/demand.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L16) - -___ - -### constraints - -• **constraints**: `string`[] - -#### Defined in - -[src/market/demand.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L17) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_demand.DemandOptions.md b/src/pages/docs/golem-js/reference/interfaces/market_demand.DemandOptions.md deleted file mode 100644 index 89c6c24ca..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/market_demand.DemandOptions.md +++ /dev/null @@ -1,192 +0,0 @@ ---- -title: "Interface DemandOptions" -pageTitle: "Interface DemandOptions - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface DemandOptions within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: DemandOptions - -[market/demand](../modules/market_demand).DemandOptions - -## Hierarchy - -- **`DemandOptions`** - - ↳ [`MarketOptions`](market_service.MarketOptions) - -## Table of contents - -### Properties - -- [subnetTag](market_demand.DemandOptions#subnettag) -- [yagnaOptions](market_demand.DemandOptions#yagnaoptions) -- [expirationSec](market_demand.DemandOptions#expirationsec) -- [logger](market_demand.DemandOptions#logger) -- [maxOfferEvents](market_demand.DemandOptions#maxofferevents) -- [offerFetchingIntervalSec](market_demand.DemandOptions#offerfetchingintervalsec) -- [proposalTimeout](market_demand.DemandOptions#proposaltimeout) -- [eventTarget](market_demand.DemandOptions#eventtarget) -- [debitNotesAcceptanceTimeoutSec](market_demand.DemandOptions#debitnotesacceptancetimeoutsec) -- [midAgreementDebitNoteIntervalSec](market_demand.DemandOptions#midagreementdebitnoteintervalsec) -- [midAgreementPaymentTimeoutSec](market_demand.DemandOptions#midagreementpaymenttimeoutsec) - -## Properties - -### subnetTag - -• `Optional` **subnetTag**: `string` - -#### Defined in - -[src/market/demand.ts:21](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L21) - -___ - -### yagnaOptions - -• `Optional` **yagnaOptions**: [`YagnaOptions`](../modules/executor_executor#yagnaoptions) - -#### Defined in - -[src/market/demand.ts:22](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L22) - -___ - -### expirationSec - -• `Optional` **expirationSec**: `number` - -Determines the expiration time of the offer and the resulting activity in milliseconds. - -The value of this field is used to define how long the demand is valid for yagna to match against. -In addition, it will determine how long the resulting activity will be active. - -For example: if `expirationSec` is set to 10 minutes, the demand was created and starting an activity -required 2 minutes, this means that the activity will be running for 8 more minutes, and then will get terminated. - -**IMPORTANT** - -It is possible that a provider will reject engaging with that demand if it's configured without using a deadline. - -**GUIDE** - -If your activity is about to operate for 5-30 min, [expirationSec](market_demand.DemandOptions#expirationsec) is sufficient. - -If your activity is about to operate for 30min-10h, [debitNotesAcceptanceTimeoutSec](market_demand.DemandOptions#debitnotesacceptancetimeoutsec) should be set as well. - -If your activity is about to operate longer than 10h, you need set both [debitNotesAcceptanceTimeoutSec](market_demand.DemandOptions#debitnotesacceptancetimeoutsec) and [midAgreementPaymentTimeoutSec](market_demand.DemandOptions#midagreementpaymenttimeoutsec). - -#### Defined in - -[src/market/demand.ts:45](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L45) - -___ - -### logger - -• `Optional` **logger**: [`Logger`](utils_logger_logger.Logger) - -#### Defined in - -[src/market/demand.ts:47](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L47) - -___ - -### maxOfferEvents - -• `Optional` **maxOfferEvents**: `number` - -#### Defined in - -[src/market/demand.ts:48](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L48) - -___ - -### offerFetchingIntervalSec - -• `Optional` **offerFetchingIntervalSec**: `number` - -#### Defined in - -[src/market/demand.ts:50](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L50) - -___ - -### proposalTimeout - -• `Optional` **proposalTimeout**: `number` - -#### Defined in - -[src/market/demand.ts:52](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L52) - -___ - -### eventTarget - -• `Optional` **eventTarget**: `EventTarget` - -#### Defined in - -[src/market/demand.ts:54](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L54) - -___ - -### debitNotesAcceptanceTimeoutSec - -• `Optional` **debitNotesAcceptanceTimeoutSec**: `number` - -Maximum time for allowed provider-sent debit note acceptance (in seconds) - -Accepting debit notes from the provider is used as a health-check of the agreement between these parties. -Failing to accept several debit notes in a row will be considered as a valida reason to terminate the agreement earlier -than [expirationSec](market_demand.DemandOptions#expirationsec) defines. - -_Accepting debit notes during a long activity is considered a good practice in Golem Network._ -The SDK will accept debit notes each 2 minutes by default. - -#### Defined in - -[src/market/demand.ts:66](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L66) - -___ - -### midAgreementDebitNoteIntervalSec - -• `Optional` **midAgreementDebitNoteIntervalSec**: `number` - -The interval between provider sent debit notes to negotiate. - -If it would not be defined, the activities created for your demand would -probably live only 30 minutes, as that's the default value that the providers use to control engagements -that are not using mid-agreement payments. - -As a requestor, you don't have to specify it, as the provider will propose a value that the SDK will simply -accept without negotiations. - -_Accepting payable debit notes during a long activity is considered a good practice in Golem Network._ -The SDK will accept debit notes each 2 minutes by default. - -#### Defined in - -[src/market/demand.ts:81](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L81) - -___ - -### midAgreementPaymentTimeoutSec - -• `Optional` **midAgreementPaymentTimeoutSec**: `number` - -Maximum time to receive payment for any debit note. At the same time, the minimum interval between mid-agreement payments. - -Setting this is relevant in case activities which are running for a long time (like 10 hours and more). Providers control -the threshold activity duration for which they would like to enforce mid-agreement payments. This value depends on the -provider configuration. Checking proposal rejections from providers in yagna's logs can give you a hint about the -market expectations. - -_Paying in regular intervals for the computation resources is considered a good practice in Golem Network._ -The SDK will issue payments each 12h by default, and you can control this with this setting. - -#### Defined in - -[src/market/demand.ts:94](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L94) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_demand_demand.BasicDemandPropertyConfig.md b/src/pages/docs/golem-js/reference/interfaces/market_demand_demand.BasicDemandPropertyConfig.md new file mode 100644 index 000000000..1e7a557d7 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_demand_demand.BasicDemandPropertyConfig.md @@ -0,0 +1,130 @@ +--- +title: "Interface BasicDemandPropertyConfig" +pageTitle: "Interface BasicDemandPropertyConfig - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface BasicDemandPropertyConfig within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: BasicDemandPropertyConfig + +[market/demand/demand](../modules/market_demand_demand).BasicDemandPropertyConfig + +This type represents a set of *parameters* that the SDK can set to particular *properties* and *constraints* +of the demand that's used to subscribe for offers via Yagna + +## Table of contents + +### Properties + +- [subnetTag](market_demand_demand.BasicDemandPropertyConfig#subnettag) +- [expirationSec](market_demand_demand.BasicDemandPropertyConfig#expirationsec) +- [debitNotesAcceptanceTimeoutSec](market_demand_demand.BasicDemandPropertyConfig#debitnotesacceptancetimeoutsec) +- [midAgreementDebitNoteIntervalSec](market_demand_demand.BasicDemandPropertyConfig#midagreementdebitnoteintervalsec) +- [midAgreementPaymentTimeoutSec](market_demand_demand.BasicDemandPropertyConfig#midagreementpaymenttimeoutsec) + +## Properties + +### subnetTag + +• `Optional` **subnetTag**: `string` + +Specify the name of a subnet of Golem Network that should be considered for offers + +Providers and Requestors can agree to a subnet tag, that they can put on their Offer and Demands +so that they can create "segments" within the network for ease of finding themselves. + +Please note that this subnetTag is public and visible to everyone. + +#### Defined in + +[src/market/demand/demand.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L19) + +___ + +### expirationSec + +• **expirationSec**: `number` + +Determines the expiration time of the offer and the resulting activity in milliseconds. + +The value of this field is used to define how long the demand is valid for yagna to match against. +In addition, it will determine how long the resulting activity will be active. + +For example: if `expirationSec` is set to 10 minutes, the demand was created and starting an activity +required 2 minutes, this means that the activity will be running for 8 more minutes, and then will get terminated. + +**IMPORTANT** + +It is possible that a provider will reject engaging with that demand if it's configured without using a deadline. + +**GUIDE** + +If your activity is about to operate for 5-30 min, [expirationSec](market_demand_demand.BasicDemandPropertyConfig#expirationsec) is sufficient. + +If your activity is about to operate for 30min-10h, [debitNotesAcceptanceTimeoutSec](market_demand_demand.BasicDemandPropertyConfig#debitnotesacceptancetimeoutsec) should be set as well. + +If your activity is about to operate longer than 10h, you need set both [debitNotesAcceptanceTimeoutSec](market_demand_demand.BasicDemandPropertyConfig#debitnotesacceptancetimeoutsec) and [midAgreementPaymentTimeoutSec](market_demand_demand.BasicDemandPropertyConfig#midagreementpaymenttimeoutsec). + +#### Defined in + +[src/market/demand/demand.ts:42](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L42) + +___ + +### debitNotesAcceptanceTimeoutSec + +• **debitNotesAcceptanceTimeoutSec**: `number` + +Maximum time for allowed provider-sent debit note acceptance (in seconds) + +Accepting debit notes from the provider is used as a health-check of the agreement between these parties. +Failing to accept several debit notes in a row will be considered as a valida reason to terminate the agreement earlier +than [expirationSec](market_demand_demand.BasicDemandPropertyConfig#expirationsec) defines. + +_Accepting debit notes during a long activity is considered a good practice in Golem Network._ +The SDK will accept debit notes each 2 minutes by default. + +#### Defined in + +[src/market/demand/demand.ts:54](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L54) + +___ + +### midAgreementDebitNoteIntervalSec + +• **midAgreementDebitNoteIntervalSec**: `number` + +The interval between provider sent debit notes to negotiate. + +If it would not be defined, the activities created for your demand would +probably live only 30 minutes, as that's the default value that the providers use to control engagements +that are not using mid-agreement payments. + +As a requestor, you don't have to specify it, as the provider will propose a value that the SDK will simply +accept without negotiations. + +_Accepting payable debit notes during a long activity is considered a good practice in Golem Network._ +The SDK will accept debit notes each 2 minutes by default. + +#### Defined in + +[src/market/demand/demand.ts:69](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L69) + +___ + +### midAgreementPaymentTimeoutSec + +• **midAgreementPaymentTimeoutSec**: `number` + +Maximum time to receive payment for any debit note. At the same time, the minimum interval between mid-agreement payments. + +Setting this is relevant in case activities which are running for a long time (like 10 hours and more). Providers control +the threshold activity duration for which they would like to enforce mid-agreement payments. This value depends on the +provider configuration. Checking proposal rejections from providers in yagna's logs can give you a hint about the +market expectations. + +_Paying in regular intervals for the computation resources is considered a good practice in Golem Network._ +The SDK will issue payments each 12h by default, and you can control this with this setting. + +#### Defined in + +[src/market/demand/demand.ts:82](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L82) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_demand_demand.IDemandRepository.md b/src/pages/docs/golem-js/reference/interfaces/market_demand_demand.IDemandRepository.md new file mode 100644 index 000000000..cf60e317d --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_demand_demand.IDemandRepository.md @@ -0,0 +1,75 @@ +--- +title: "Interface IDemandRepository" +pageTitle: "Interface IDemandRepository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface IDemandRepository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: IDemandRepository + +[market/demand/demand](../modules/market_demand_demand).IDemandRepository + +## Implemented by + +- [`DemandRepository`](../classes/shared_yagna_repository_demand_repository.DemandRepository) + +## Table of contents + +### Methods + +- [getById](market_demand_demand.IDemandRepository#getbyid) +- [add](market_demand_demand.IDemandRepository#add) +- [getAll](market_demand_demand.IDemandRepository#getall) + +## Methods + +### getById + +▸ **getById**(`id`): `undefined` \| [`Demand`](../classes/market_demand_demand.Demand) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`undefined` \| [`Demand`](../classes/market_demand_demand.Demand) + +#### Defined in + +[src/market/demand/demand.ts:95](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L95) + +___ + +### add + +▸ **add**(`demand`): [`Demand`](../classes/market_demand_demand.Demand) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demand` | [`Demand`](../classes/market_demand_demand.Demand) | + +#### Returns + +[`Demand`](../classes/market_demand_demand.Demand) + +#### Defined in + +[src/market/demand/demand.ts:97](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L97) + +___ + +### getAll + +▸ **getAll**(): [`Demand`](../classes/market_demand_demand.Demand)[] + +#### Returns + +[`Demand`](../classes/market_demand_demand.Demand)[] + +#### Defined in + +[src/market/demand/demand.ts:99](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L99) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions.md b/src/pages/docs/golem-js/reference/interfaces/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions.md new file mode 100644 index 000000000..676f8c77c --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions.md @@ -0,0 +1,40 @@ +--- +title: "Interface BasicDemandDirectorConfigOptions" +pageTitle: "Interface BasicDemandDirectorConfigOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface BasicDemandDirectorConfigOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: BasicDemandDirectorConfigOptions + +[market/demand/directors/basic-demand-director-config](../modules/market_demand_directors_basic_demand_director_config).BasicDemandDirectorConfigOptions + +## Implemented by + +- [`BasicDemandDirectorConfig`](../classes/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig) + +## Table of contents + +### Properties + +- [expirationSec](market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions#expirationsec) +- [subnetTag](market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions#subnettag) + +## Properties + +### expirationSec + +• **expirationSec**: `number` + +#### Defined in + +[src/market/demand/directors/basic-demand-director-config.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/basic-demand-director-config.ts#L6) + +___ + +### subnetTag + +• **subnetTag**: `string` + +#### Defined in + +[src/market/demand/directors/basic-demand-director-config.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/basic-demand-director-config.ts#L7) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions.md b/src/pages/docs/golem-js/reference/interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions.md new file mode 100644 index 000000000..551f7e94d --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions.md @@ -0,0 +1,51 @@ +--- +title: "Interface PaymentDemandDirectorConfigOptions" +pageTitle: "Interface PaymentDemandDirectorConfigOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface PaymentDemandDirectorConfigOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: PaymentDemandDirectorConfigOptions + +[market/demand/directors/payment-demand-director-config](../modules/market_demand_directors_payment_demand_director_config).PaymentDemandDirectorConfigOptions + +## Implemented by + +- [`PaymentDemandDirectorConfig`](../classes/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig) + +## Table of contents + +### Properties + +- [midAgreementDebitNoteIntervalSec](market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions#midagreementdebitnoteintervalsec) +- [midAgreementPaymentTimeoutSec](market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions#midagreementpaymenttimeoutsec) +- [debitNotesAcceptanceTimeoutSec](market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions#debitnotesacceptancetimeoutsec) + +## Properties + +### midAgreementDebitNoteIntervalSec + +• **midAgreementDebitNoteIntervalSec**: `number` + +#### Defined in + +[src/market/demand/directors/payment-demand-director-config.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/payment-demand-director-config.ts#L5) + +___ + +### midAgreementPaymentTimeoutSec + +• **midAgreementPaymentTimeoutSec**: `number` + +#### Defined in + +[src/market/demand/directors/payment-demand-director-config.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/payment-demand-director-config.ts#L6) + +___ + +### debitNotesAcceptanceTimeoutSec + +• **debitNotesAcceptanceTimeoutSec**: `number` + +#### Defined in + +[src/market/demand/directors/payment-demand-director-config.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/directors/payment-demand-director-config.ts#L7) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_draft_offer_proposal_pool.ProposalPoolEvents.md b/src/pages/docs/golem-js/reference/interfaces/market_draft_offer_proposal_pool.ProposalPoolEvents.md new file mode 100644 index 000000000..e62fb5b24 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_draft_offer_proposal_pool.ProposalPoolEvents.md @@ -0,0 +1,133 @@ +--- +title: "Interface ProposalPoolEvents" +pageTitle: "Interface ProposalPoolEvents - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ProposalPoolEvents within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ProposalPoolEvents + +[market/draft-offer-proposal-pool](../modules/market_draft_offer_proposal_pool).ProposalPoolEvents + +## Table of contents + +### Properties + +- [added](market_draft_offer_proposal_pool.ProposalPoolEvents#added) +- [removed](market_draft_offer_proposal_pool.ProposalPoolEvents#removed) +- [acquired](market_draft_offer_proposal_pool.ProposalPoolEvents#acquired) +- [released](market_draft_offer_proposal_pool.ProposalPoolEvents#released) +- [cleared](market_draft_offer_proposal_pool.ProposalPoolEvents#cleared) + +## Properties + +### added + +• **added**: (`proposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)) => `void` + +#### Type declaration + +▸ (`proposal`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | + +##### Returns + +`void` + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:35](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L35) + +___ + +### removed + +• **removed**: (`proposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)) => `void` + +#### Type declaration + +▸ (`proposal`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | + +##### Returns + +`void` + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:36](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L36) + +___ + +### acquired + +• **acquired**: (`proposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)) => `void` + +#### Type declaration + +▸ (`proposal`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | + +##### Returns + +`void` + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L37) + +___ + +### released + +• **released**: (`proposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)) => `void` + +#### Type declaration + +▸ (`proposal`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | + +##### Returns + +`void` + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L38) + +___ + +### cleared + +• **cleared**: () => `void` + +#### Type declaration + +▸ (): `void` + +##### Returns + +`void` + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:39](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L39) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_draft_offer_proposal_pool.ProposalPoolOptions.md b/src/pages/docs/golem-js/reference/interfaces/market_draft_offer_proposal_pool.ProposalPoolOptions.md new file mode 100644 index 000000000..be28c329c --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_draft_offer_proposal_pool.ProposalPoolOptions.md @@ -0,0 +1,72 @@ +--- +title: "Interface ProposalPoolOptions" +pageTitle: "Interface ProposalPoolOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ProposalPoolOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ProposalPoolOptions + +[market/draft-offer-proposal-pool](../modules/market_draft_offer_proposal_pool).ProposalPoolOptions + +## Table of contents + +### Properties + +- [selectProposal](market_draft_offer_proposal_pool.ProposalPoolOptions#selectproposal) +- [validateProposal](market_draft_offer_proposal_pool.ProposalPoolOptions#validateproposal) +- [minCount](market_draft_offer_proposal_pool.ProposalPoolOptions#mincount) +- [logger](market_draft_offer_proposal_pool.ProposalPoolOptions#logger) + +## Properties + +### selectProposal + +• `Optional` **selectProposal**: [`ProposalSelector`](../modules/market_draft_offer_proposal_pool#proposalselector) + +A user-defined function that will be used by [DraftOfferProposalPool.acquire](../classes/market_draft_offer_proposal_pool.DraftOfferProposalPool#acquire) to pick the best fitting proposal from available ones + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L15) + +___ + +### validateProposal + +• `Optional` **validateProposal**: [`ProposalFilter`](../modules/market_proposal_offer_proposal#proposalfilter) + +User defined filter function which will determine if the proposal is valid for use. + +Proposals are validated before being handled to the caller of [DraftOfferProposalPool.acquire](../classes/market_draft_offer_proposal_pool.DraftOfferProposalPool#acquire) + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L22) + +___ + +### minCount + +• `Optional` **minCount**: `number` + +Min number of proposals in pool so that it can be considered as ready to use + +**`Default`** + +```ts +0 +``` + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L29) + +___ + +### logger + +• `Optional` **logger**: [`Logger`](shared_utils_logger_logger.Logger) + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L31) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_market_module.IDemandDirector.md b/src/pages/docs/golem-js/reference/interfaces/market_market_module.IDemandDirector.md new file mode 100644 index 000000000..147ed18b7 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_market_module.IDemandDirector.md @@ -0,0 +1,50 @@ +--- +title: "Interface IDemandDirector" +pageTitle: "Interface IDemandDirector - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface IDemandDirector within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: IDemandDirector + +[market/market.module](../modules/market_market_module).IDemandDirector + +Represents a director that can instruct DemandDetailsBuilder + +Demand is a complex concept in Golem. Requestors can place arbitrary properties and constraints on such +market entity. While the demand request on the Golem Protocol level is a flat list of properties (key, value) and constraints, +from the Requestor side they form logical groups that make sense together. + +The idea behind Directors is that you can encapsulate this grouping knowledge along with validation logic etc to prepare +all the final demand request body properties in a more controlled and organized manner. + +## Implemented by + +- [`BasicDemandDirector`](../classes/market_demand_directors_basic_demand_director.BasicDemandDirector) +- [`PaymentDemandDirector`](../classes/market_demand_directors_payment_demand_director.PaymentDemandDirector) +- [`WorkloadDemandDirector`](../classes/market_demand_directors_workload_demand_director.WorkloadDemandDirector) + +## Table of contents + +### Methods + +- [apply](market_market_module.IDemandDirector#apply) + +## Methods + +### apply + +▸ **apply**(`builder`): `void` \| `Promise`\<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `builder` | [`DemandBodyBuilder`](../classes/market_demand_demand_body_builder.DemandBodyBuilder) | + +#### Returns + +`void` \| `Promise`\<`void`\> + +#### Defined in + +[src/market/market.module.ts:205](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L205) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_market_module.MarketModule.md b/src/pages/docs/golem-js/reference/interfaces/market_market_module.MarketModule.md new file mode 100644 index 000000000..dbf23602d --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_market_module.MarketModule.md @@ -0,0 +1,344 @@ +--- +title: "Interface MarketModule" +pageTitle: "Interface MarketModule - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface MarketModule within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: MarketModule + +[market/market.module](../modules/market_market_module).MarketModule + +## Implemented by + +- [`MarketModuleImpl`](../classes/market_market_module.MarketModuleImpl) + +## Table of contents + +### Properties + +- [events](market_market_module.MarketModule#events) + +### Methods + +- [buildDemandDetails](market_market_module.MarketModule#builddemanddetails) +- [publishAndRefreshDemand](market_market_module.MarketModule#publishandrefreshdemand) +- [collectMarketProposalEvents](market_market_module.MarketModule#collectmarketproposalevents) +- [collectAllOfferProposals](market_market_module.MarketModule#collectallofferproposals) +- [negotiateProposal](market_market_module.MarketModule#negotiateproposal) +- [proposeAgreement](market_market_module.MarketModule#proposeagreement) +- [terminateAgreement](market_market_module.MarketModule#terminateagreement) +- [signAgreementFromPool](market_market_module.MarketModule#signagreementfrompool) +- [collectDraftOfferProposals](market_market_module.MarketModule#collectdraftofferproposals) +- [estimateBudget](market_market_module.MarketModule#estimatebudget) +- [fetchAgreement](market_market_module.MarketModule#fetchagreement) + +## Properties + +### events + +• **events**: `EventEmitter`\<[`MarketEvents`](../modules/market_api#marketevents), `any`\> + +#### Defined in + +[src/market/market.module.ts:74](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L74) + +## Methods + +### buildDemandDetails + +▸ **buildDemandDetails**(`options`, `allocation`): `Promise`\<[`DemandSpecification`](../classes/market_demand_demand.DemandSpecification)\> + +Build a DemandSpecification based on the given options and allocation. +You can obtain an allocation using the payment module. +The method returns a DemandSpecification that can be used to publish the demand to the market, +for example using the `publishDemand` method. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options` | [`BuildDemandOptions`](../modules/market_demand_demand#builddemandoptions) | +| `allocation` | [`Allocation`](../classes/payment_allocation.Allocation) | + +#### Returns + +`Promise`\<[`DemandSpecification`](../classes/market_demand_demand.DemandSpecification)\> + +#### Defined in + +[src/market/market.module.ts:82](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L82) + +___ + +### publishAndRefreshDemand + +▸ **publishAndRefreshDemand**(`demandSpec`): `Observable`\<[`Demand`](../classes/market_demand_demand.Demand)\> + +Publishes the demand to the market and handles refreshing it when needed. +Each time the demand is refreshed, a new demand is emitted by the observable. +Keep in mind that since this method returns an observable, nothing will happen until you subscribe to it. +Unsubscribing will remove the demand from the market. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demandSpec` | [`DemandSpecification`](../classes/market_demand_demand.DemandSpecification) | + +#### Returns + +`Observable`\<[`Demand`](../classes/market_demand_demand.Demand)\> + +#### Defined in + +[src/market/market.module.ts:90](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L90) + +___ + +### collectMarketProposalEvents + +▸ **collectMarketProposalEvents**(`demand`): `Observable`\<[`MarketProposalEvent`](../modules/market_proposal_market_proposal_event#marketproposalevent)\> + +Return an observable that will emit values representing various events related to this demand + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demand` | [`Demand`](../classes/market_demand_demand.Demand) | + +#### Returns + +`Observable`\<[`MarketProposalEvent`](../modules/market_proposal_market_proposal_event#marketproposalevent)\> + +#### Defined in + +[src/market/market.module.ts:95](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L95) + +___ + +### collectAllOfferProposals + +▸ **collectAllOfferProposals**(`demand`): `Observable`\<[`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)\> + +Subscribes to the proposals for the given demand. +If an error occurs, the observable will emit an error and complete. +Keep in mind that since this method returns an observable, nothing will happen until you subscribe to it. + +This method will just yield all the proposals that will be found for that demand without any additional logic. + +The [collectDraftOfferProposals](market_market_module.MarketModule#collectdraftofferproposals) is a more specialized variant of offer collection, which includes negotiations + and demand re-subscription logic + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demand` | [`Demand`](../classes/market_demand_demand.Demand) | + +#### Returns + +`Observable`\<[`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)\> + +#### Defined in + +[src/market/market.module.ts:107](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L107) + +___ + +### negotiateProposal + +▸ **negotiateProposal**(`receivedProposal`, `counterDemandSpec`): `Promise`\<[`OfferCounterProposal`](../classes/market_proposal_offer_counter_proposal.OfferCounterProposal)\> + +Sends a counter-offer to the provider. Note that to get the provider's response to your +counter you should listen to events returned by `collectDemandOfferEvents`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `receivedProposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | +| `counterDemandSpec` | [`DemandSpecification`](../classes/market_demand_demand.DemandSpecification) | + +#### Returns + +`Promise`\<[`OfferCounterProposal`](../classes/market_proposal_offer_counter_proposal.OfferCounterProposal)\> + +The counter-proposal that the requestor made to the Provider + +#### Defined in + +[src/market/market.module.ts:115](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L115) + +___ + +### proposeAgreement + +▸ **proposeAgreement**(`proposal`): `Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +Internally + +- ya-ts-client createAgreement +- ya-ts-client approveAgreement +- ya-ts-client "wait for approval" + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | + +#### Returns + +`Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +Returns when the provider accepts the agreement, rejects otherwise. The resulting agreement is ready to create activities from. + +#### Defined in + +[src/market/market.module.ts:131](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L131) + +___ + +### terminateAgreement + +▸ **terminateAgreement**(`agreement`, `reason?`): `Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | +| `reason?` | `string` | + +#### Returns + +`Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +The Agreement that has been terminated via Yagna + +#### Defined in + +[src/market/market.module.ts:136](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L136) + +___ + +### signAgreementFromPool + +▸ **signAgreementFromPool**(`draftProposalPool`, `agreementOptions?`, `signalOrTimeout?`): `Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +Acquire a proposal from the pool and sign an agreement with the provider. If signing the agreement fails, +destroy the proposal and try again with another one. The method returns an agreement that's ready to be used. +Optionally, you can provide a timeout in milliseconds or an AbortSignal that can be used to cancel the operation +early. If the operation is cancelled, the method will throw an error. +Note that this method will respect the acquire timeout set in the pool and will throw an error if no proposal +is available within the specified time. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `draftProposalPool` | [`DraftOfferProposalPool`](../classes/market_draft_offer_proposal_pool.DraftOfferProposalPool) | The pool of draft proposals to acquire from | +| `agreementOptions?` | [`AgreementOptions`](market_agreement_agreement.AgreementOptions) | options used to sign the agreement such as expiration or waitingForApprovalTimeout | +| `signalOrTimeout?` | `number` \| `AbortSignal` | The timeout in milliseconds or an AbortSignal that will be used to cancel the operation | + +#### Returns + +`Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +**`Example`** + +```ts +const agreement = await marketModule.signAgreementFromPool(draftProposalPool, 10_000); // throws TimeoutError if the operation takes longer than 10 seconds +``` + +**`Example`** + +```ts +const signal = AbortSignal.timeout(10_000); +const agreement = await marketModule.signAgreementFromPool(draftProposalPool, signal); // throws TimeoutError if the operation takes longer than 10 seconds +``` + +#### Defined in + +[src/market/market.module.ts:159](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L159) + +___ + +### collectDraftOfferProposals + +▸ **collectDraftOfferProposals**(`options`): `Observable`\<[`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)\> + +Creates a demand for the given package and allocation and starts collecting, filtering and negotiating proposals. +The method returns an observable that emits a batch of draft proposals every time the buffer is full. +The method will automatically negotiate the proposals until they are moved to the `Draft` state. +Keep in mind that since this method returns an observable, nothing will happen until you subscribe to it. +Unsubscribing from the observable will stop the process and remove the demand from the market. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options` | `Object` | +| `options.demandSpecification` | [`DemandSpecification`](../classes/market_demand_demand.DemandSpecification) | +| `options.pricing` | [`PricingOptions`](../modules/market_market_module#pricingoptions) | +| `options.filter?` | [`ProposalFilter`](../modules/market_proposal_offer_proposal#proposalfilter) | +| `options.minProposalsBatchSize?` | `number` | +| `options.proposalsBatchReleaseTimeoutMs?` | `number` | + +#### Returns + +`Observable`\<[`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)\> + +#### Defined in + +[src/market/market.module.ts:172](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L172) + +___ + +### estimateBudget + +▸ **estimateBudget**(`params`): `number` + +Estimate the budget for the given order and concurrency level. +Keep in mind that this is just an estimate and the actual cost may vary. +To get a more accurate estimate, make sure to specify an exact or maximum concurrency level. +The method returns the estimated budget in GLM. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | `Object` | +| `params.concurrency` | [`Concurrency`](../modules/resource_rental_resource_rental_pool#concurrency) | +| `params.order` | [`MarketOrderSpec`](golem_network_golem_network.MarketOrderSpec) | + +#### Returns + +`number` + +#### Defined in + +[src/market/market.module.ts:187](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L187) + +___ + +### fetchAgreement + +▸ **fetchAgreement**(`agreementId`): `Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +Fetch the most up-to-date agreement details from the yagna + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreementId` | `string` | + +#### Returns + +`Promise`\<[`Agreement`](../classes/market_agreement_agreement.Agreement)\> + +#### Defined in + +[src/market/market.module.ts:191](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L191) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_market_module.MarketOptions.md b/src/pages/docs/golem-js/reference/interfaces/market_market_module.MarketOptions.md new file mode 100644 index 000000000..1b8a12bf2 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_market_module.MarketOptions.md @@ -0,0 +1,66 @@ +--- +title: "Interface MarketOptions" +pageTitle: "Interface MarketOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface MarketOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: MarketOptions + +[market/market.module](../modules/market_market_module).MarketOptions + +## Table of contents + +### Properties + +- [rentHours](market_market_module.MarketOptions#renthours) +- [pricing](market_market_module.MarketOptions#pricing) +- [proposalFilter](market_market_module.MarketOptions#proposalfilter) +- [proposalSelector](market_market_module.MarketOptions#proposalselector) + +## Properties + +### rentHours + +• **rentHours**: `number` + +How long you want to rent the resources in hours + +#### Defined in + +[src/market/market.module.ts:61](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L61) + +___ + +### pricing + +• **pricing**: [`PricingOptions`](../modules/market_market_module#pricingoptions) + +Pricing strategy that will be used to filter the offers from the market + +#### Defined in + +[src/market/market.module.ts:64](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L64) + +___ + +### proposalFilter + +• `Optional` **proposalFilter**: [`ProposalFilter`](../modules/market_proposal_offer_proposal#proposalfilter) + +A user-defined filter function which will determine if the proposal is valid for use. + +#### Defined in + +[src/market/market.module.ts:67](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L67) + +___ + +### proposalSelector + +• `Optional` **proposalSelector**: [`ProposalSelector`](../modules/market_draft_offer_proposal_pool#proposalselector) + +A user-defined function that will be used to pick the best fitting proposal from available ones + +#### Defined in + +[src/market/market.module.ts:70](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L70) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_proposal.ProposalDetails.md b/src/pages/docs/golem-js/reference/interfaces/market_proposal.ProposalDetails.md deleted file mode 100644 index 058b25672..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/market_proposal.ProposalDetails.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: "Interface ProposalDetails" -pageTitle: "Interface ProposalDetails - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface ProposalDetails within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: ProposalDetails - -[market/proposal](../modules/market_proposal).ProposalDetails - -## Table of contents - -### Properties - -- [transferProtocol](market_proposal.ProposalDetails#transferprotocol) -- [cpuBrand](market_proposal.ProposalDetails#cpubrand) -- [cpuCapabilities](market_proposal.ProposalDetails#cpucapabilities) -- [cpuCores](market_proposal.ProposalDetails#cpucores) -- [cpuThreads](market_proposal.ProposalDetails#cputhreads) -- [memory](market_proposal.ProposalDetails#memory) -- [storage](market_proposal.ProposalDetails#storage) -- [publicNet](market_proposal.ProposalDetails#publicnet) -- [runtimeCapabilities](market_proposal.ProposalDetails#runtimecapabilities) -- [runtimeName](market_proposal.ProposalDetails#runtimename) -- [state](market_proposal.ProposalDetails#state) - -## Properties - -### transferProtocol - -• **transferProtocol**: `string`[] - -#### Defined in - -[src/market/proposal.ts:47](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L47) - -___ - -### cpuBrand - -• **cpuBrand**: `string` - -#### Defined in - -[src/market/proposal.ts:48](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L48) - -___ - -### cpuCapabilities - -• **cpuCapabilities**: `string`[] - -#### Defined in - -[src/market/proposal.ts:49](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L49) - -___ - -### cpuCores - -• **cpuCores**: `number` - -#### Defined in - -[src/market/proposal.ts:50](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L50) - -___ - -### cpuThreads - -• **cpuThreads**: `number` - -#### Defined in - -[src/market/proposal.ts:51](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L51) - -___ - -### memory - -• **memory**: `number` - -#### Defined in - -[src/market/proposal.ts:52](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L52) - -___ - -### storage - -• **storage**: `number` - -#### Defined in - -[src/market/proposal.ts:53](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L53) - -___ - -### publicNet - -• **publicNet**: `boolean` - -#### Defined in - -[src/market/proposal.ts:54](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L54) - -___ - -### runtimeCapabilities - -• **runtimeCapabilities**: `string`[] - -#### Defined in - -[src/market/proposal.ts:55](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L55) - -___ - -### runtimeName - -• **runtimeName**: `string` - -#### Defined in - -[src/market/proposal.ts:56](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L56) - -___ - -### state - -• **state**: `ProposalAllOfStateEnum` - -#### Defined in - -[src/market/proposal.ts:57](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L57) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_proposal_market_proposal.IProposalRepository.md b/src/pages/docs/golem-js/reference/interfaces/market_proposal_market_proposal.IProposalRepository.md new file mode 100644 index 000000000..27eb35bd4 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/market_proposal_market_proposal.IProposalRepository.md @@ -0,0 +1,82 @@ +--- +title: "Interface IProposalRepository" +pageTitle: "Interface IProposalRepository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface IProposalRepository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: IProposalRepository + +[market/proposal/market-proposal](../modules/market_proposal_market_proposal).IProposalRepository + +## Implemented by + +- [`ProposalRepository`](../classes/shared_yagna_repository_proposal_repository.ProposalRepository) + +## Table of contents + +### Methods + +- [add](market_proposal_market_proposal.IProposalRepository#add) +- [getById](market_proposal_market_proposal.IProposalRepository#getbyid) +- [getByDemandAndId](market_proposal_market_proposal.IProposalRepository#getbydemandandid) + +## Methods + +### add + +▸ **add**(`proposal`): [`MarketProposal`](../classes/market_proposal_market_proposal.MarketProposal) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`MarketProposal`](../classes/market_proposal_market_proposal.MarketProposal) | + +#### Returns + +[`MarketProposal`](../classes/market_proposal_market_proposal.MarketProposal) + +#### Defined in + +[src/market/proposal/market-proposal.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L7) + +___ + +### getById + +▸ **getById**(`id`): `undefined` \| [`MarketProposal`](../classes/market_proposal_market_proposal.MarketProposal) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`undefined` \| [`MarketProposal`](../classes/market_proposal_market_proposal.MarketProposal) + +#### Defined in + +[src/market/proposal/market-proposal.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L9) + +___ + +### getByDemandAndId + +▸ **getByDemandAndId**(`demand`, `id`): `Promise`\<[`MarketProposal`](../classes/market_proposal_market_proposal.MarketProposal)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `demand` | [`Demand`](../classes/market_demand_demand.Demand) | +| `id` | `string` | + +#### Returns + +`Promise`\<[`MarketProposal`](../classes/market_proposal_market_proposal.MarketProposal)\> + +#### Defined in + +[src/market/proposal/market-proposal.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal.ts#L11) diff --git a/src/pages/docs/golem-js/reference/interfaces/market_service.MarketOptions.md b/src/pages/docs/golem-js/reference/interfaces/market_service.MarketOptions.md deleted file mode 100644 index f70ea1e96..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/market_service.MarketOptions.md +++ /dev/null @@ -1,276 +0,0 @@ ---- -title: "Interface MarketOptions" -pageTitle: "Interface MarketOptions - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface MarketOptions within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: MarketOptions - -[market/service](../modules/market_service).MarketOptions - -## Hierarchy - -- [`DemandOptions`](market_demand.DemandOptions) - - ↳ **`MarketOptions`** - -## Table of contents - -### Properties - -- [proposalFilter](market_service.MarketOptions#proposalfilter) -- [minProposalsBatchSize](market_service.MarketOptions#minproposalsbatchsize) -- [proposalsBatchReleaseTimeoutMs](market_service.MarketOptions#proposalsbatchreleasetimeoutms) -- [subnetTag](market_service.MarketOptions#subnettag) -- [yagnaOptions](market_service.MarketOptions#yagnaoptions) -- [expirationSec](market_service.MarketOptions#expirationsec) -- [logger](market_service.MarketOptions#logger) -- [maxOfferEvents](market_service.MarketOptions#maxofferevents) -- [offerFetchingIntervalSec](market_service.MarketOptions#offerfetchingintervalsec) -- [proposalTimeout](market_service.MarketOptions#proposaltimeout) -- [eventTarget](market_service.MarketOptions#eventtarget) -- [debitNotesAcceptanceTimeoutSec](market_service.MarketOptions#debitnotesacceptancetimeoutsec) -- [midAgreementDebitNoteIntervalSec](market_service.MarketOptions#midagreementdebitnoteintervalsec) -- [midAgreementPaymentTimeoutSec](market_service.MarketOptions#midagreementpaymenttimeoutsec) - -## Properties - -### proposalFilter - -• `Optional` **proposalFilter**: [`ProposalFilter`](../modules/market_service#proposalfilter) - -A custom filter checking the proposal from the market for each provider and its hardware configuration. -Duplicate proposals from one provider are reduced to the cheapest one. - -#### Defined in - -[src/market/service.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/service.ts#L18) - -___ - -### minProposalsBatchSize - -• `Optional` **minProposalsBatchSize**: `number` - -The minimum number of proposals after which the batch of proposal will be processed in order to avoid duplicates - -#### Defined in - -[src/market/service.ts:20](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/service.ts#L20) - -___ - -### proposalsBatchReleaseTimeoutMs - -• `Optional` **proposalsBatchReleaseTimeoutMs**: `number` - -The maximum waiting time for proposals to be batched in order to avoid duplicates - -#### Defined in - -[src/market/service.ts:22](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/service.ts#L22) - -___ - -### subnetTag - -• `Optional` **subnetTag**: `string` - -#### Inherited from - -[DemandOptions](market_demand.DemandOptions).[subnetTag](market_demand.DemandOptions#subnettag) - -#### Defined in - -[src/market/demand.ts:21](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L21) - -___ - -### yagnaOptions - -• `Optional` **yagnaOptions**: [`YagnaOptions`](../modules/executor_executor#yagnaoptions) - -#### Inherited from - -[DemandOptions](market_demand.DemandOptions).[yagnaOptions](market_demand.DemandOptions#yagnaoptions) - -#### Defined in - -[src/market/demand.ts:22](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L22) - -___ - -### expirationSec - -• `Optional` **expirationSec**: `number` - -Determines the expiration time of the offer and the resulting activity in milliseconds. - -The value of this field is used to define how long the demand is valid for yagna to match against. -In addition, it will determine how long the resulting activity will be active. - -For example: if `expirationSec` is set to 10 minutes, the demand was created and starting an activity -required 2 minutes, this means that the activity will be running for 8 more minutes, and then will get terminated. - -**IMPORTANT** - -It is possible that a provider will reject engaging with that demand if it's configured without using a deadline. - -**GUIDE** - -If your activity is about to operate for 5-30 min, [expirationSec](market_demand.DemandOptions#expirationsec) is sufficient. - -If your activity is about to operate for 30min-10h, [debitNotesAcceptanceTimeoutSec](market_demand.DemandOptions#debitnotesacceptancetimeoutsec) should be set as well. - -If your activity is about to operate longer than 10h, you need set both [debitNotesAcceptanceTimeoutSec](market_demand.DemandOptions#debitnotesacceptancetimeoutsec) and [midAgreementPaymentTimeoutSec](market_demand.DemandOptions#midagreementpaymenttimeoutsec). - -#### Inherited from - -[DemandOptions](market_demand.DemandOptions).[expirationSec](market_demand.DemandOptions#expirationsec) - -#### Defined in - -[src/market/demand.ts:45](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L45) - -___ - -### logger - -• `Optional` **logger**: [`Logger`](utils_logger_logger.Logger) - -#### Inherited from - -[DemandOptions](market_demand.DemandOptions).[logger](market_demand.DemandOptions#logger) - -#### Defined in - -[src/market/demand.ts:47](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L47) - -___ - -### maxOfferEvents - -• `Optional` **maxOfferEvents**: `number` - -#### Inherited from - -[DemandOptions](market_demand.DemandOptions).[maxOfferEvents](market_demand.DemandOptions#maxofferevents) - -#### Defined in - -[src/market/demand.ts:48](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L48) - -___ - -### offerFetchingIntervalSec - -• `Optional` **offerFetchingIntervalSec**: `number` - -#### Inherited from - -[DemandOptions](market_demand.DemandOptions).[offerFetchingIntervalSec](market_demand.DemandOptions#offerfetchingintervalsec) - -#### Defined in - -[src/market/demand.ts:50](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L50) - -___ - -### proposalTimeout - -• `Optional` **proposalTimeout**: `number` - -#### Inherited from - -[DemandOptions](market_demand.DemandOptions).[proposalTimeout](market_demand.DemandOptions#proposaltimeout) - -#### Defined in - -[src/market/demand.ts:52](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L52) - -___ - -### eventTarget - -• `Optional` **eventTarget**: `EventTarget` - -#### Inherited from - -[DemandOptions](market_demand.DemandOptions).[eventTarget](market_demand.DemandOptions#eventtarget) - -#### Defined in - -[src/market/demand.ts:54](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L54) - -___ - -### debitNotesAcceptanceTimeoutSec - -• `Optional` **debitNotesAcceptanceTimeoutSec**: `number` - -Maximum time for allowed provider-sent debit note acceptance (in seconds) - -Accepting debit notes from the provider is used as a health-check of the agreement between these parties. -Failing to accept several debit notes in a row will be considered as a valida reason to terminate the agreement earlier -than [expirationSec](market_demand.DemandOptions#expirationsec) defines. - -_Accepting debit notes during a long activity is considered a good practice in Golem Network._ -The SDK will accept debit notes each 2 minutes by default. - -#### Inherited from - -[DemandOptions](market_demand.DemandOptions).[debitNotesAcceptanceTimeoutSec](market_demand.DemandOptions#debitnotesacceptancetimeoutsec) - -#### Defined in - -[src/market/demand.ts:66](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L66) - -___ - -### midAgreementDebitNoteIntervalSec - -• `Optional` **midAgreementDebitNoteIntervalSec**: `number` - -The interval between provider sent debit notes to negotiate. - -If it would not be defined, the activities created for your demand would -probably live only 30 minutes, as that's the default value that the providers use to control engagements -that are not using mid-agreement payments. - -As a requestor, you don't have to specify it, as the provider will propose a value that the SDK will simply -accept without negotiations. - -_Accepting payable debit notes during a long activity is considered a good practice in Golem Network._ -The SDK will accept debit notes each 2 minutes by default. - -#### Inherited from - -[DemandOptions](market_demand.DemandOptions).[midAgreementDebitNoteIntervalSec](market_demand.DemandOptions#midagreementdebitnoteintervalsec) - -#### Defined in - -[src/market/demand.ts:81](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L81) - -___ - -### midAgreementPaymentTimeoutSec - -• `Optional` **midAgreementPaymentTimeoutSec**: `number` - -Maximum time to receive payment for any debit note. At the same time, the minimum interval between mid-agreement payments. - -Setting this is relevant in case activities which are running for a long time (like 10 hours and more). Providers control -the threshold activity duration for which they would like to enforce mid-agreement payments. This value depends on the -provider configuration. Checking proposal rejections from providers in yagna's logs can give you a hint about the -market expectations. - -_Paying in regular intervals for the computation resources is considered a good practice in Golem Network._ -The SDK will issue payments each 12h by default, and you can control this with this setting. - -#### Inherited from - -[DemandOptions](market_demand.DemandOptions).[midAgreementPaymentTimeoutSec](market_demand.DemandOptions#midagreementpaymenttimeoutsec) - -#### Defined in - -[src/market/demand.ts:94](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/demand.ts#L94) diff --git a/src/pages/docs/golem-js/reference/interfaces/network_api.INetworkApi.md b/src/pages/docs/golem-js/reference/interfaces/network_api.INetworkApi.md new file mode 100644 index 000000000..198330e32 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/network_api.INetworkApi.md @@ -0,0 +1,130 @@ +--- +title: "Interface INetworkApi" +pageTitle: "Interface INetworkApi - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface INetworkApi within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: INetworkApi + +[network/api](../modules/network_api).INetworkApi + +## Implemented by + +- [`NetworkApiAdapter`](../classes/shared_yagna_adapters_network_api_adapter.NetworkApiAdapter) + +## Table of contents + +### Methods + +- [createNetwork](network_api.INetworkApi#createnetwork) +- [removeNetwork](network_api.INetworkApi#removenetwork) +- [createNetworkNode](network_api.INetworkApi#createnetworknode) +- [removeNetworkNode](network_api.INetworkApi#removenetworknode) +- [getIdentity](network_api.INetworkApi#getidentity) + +## Methods + +### createNetwork + +▸ **createNetwork**(`options`): `Promise`\<[`Network`](../classes/network_network.Network)\> + +Creates a new network with the specified options. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `options` | [`NetworkOptions`](network_network_module.NetworkOptions) | NetworkOptions | + +#### Returns + +`Promise`\<[`Network`](../classes/network_network.Network)\> + +#### Defined in + +[src/network/api.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/api.ts#L24) + +___ + +### removeNetwork + +▸ **removeNetwork**(`network`): `Promise`\<`void`\> + +Removes an existing network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `network` | [`Network`](../classes/network_network.Network) | The network to be removed. | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/network/api.ts:30](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/api.ts#L30) + +___ + +### createNetworkNode + +▸ **createNetworkNode**(`network`, `nodeId`, `nodeIp?`): `Promise`\<[`NetworkNode`](../classes/network_node.NetworkNode)\> + +Creates a new node within a specified network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `network` | [`Network`](../classes/network_network.Network) | The network to which the node will be added. | +| `nodeId` | `string` | The ID of the node to be created. | +| `nodeIp?` | `string` | Optional IP address for the node. If not provided, the first available IP address will be assigned. | + +#### Returns + +`Promise`\<[`NetworkNode`](../classes/network_node.NetworkNode)\> + +#### Defined in + +[src/network/api.ts:39](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/api.ts#L39) + +___ + +### removeNetworkNode + +▸ **removeNetworkNode**(`network`, `node`): `Promise`\<`void`\> + +Removes an existing node from a specified network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `network` | [`Network`](../classes/network_network.Network) | The network from which the node will be removed. | +| `node` | [`NetworkNode`](../classes/network_node.NetworkNode) | The node to be removed. | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/network/api.ts:46](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/api.ts#L46) + +___ + +### getIdentity + +▸ **getIdentity**(): `Promise`\<`string`\> + +Returns the identifier of the requesor + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[src/network/api.ts:51](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/api.ts#L51) diff --git a/src/pages/docs/golem-js/reference/interfaces/network_api.NetworkEvents.md b/src/pages/docs/golem-js/reference/interfaces/network_api.NetworkEvents.md new file mode 100644 index 000000000..2bf4be385 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/network_api.NetworkEvents.md @@ -0,0 +1,220 @@ +--- +title: "Interface NetworkEvents" +pageTitle: "Interface NetworkEvents - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface NetworkEvents within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: NetworkEvents + +[network/api](../modules/network_api).NetworkEvents + +## Table of contents + +### Properties + +- [networkCreated](network_api.NetworkEvents#networkcreated) +- [errorCreatingNetwork](network_api.NetworkEvents#errorcreatingnetwork) +- [networkRemoved](network_api.NetworkEvents#networkremoved) +- [errorRemovingNetwork](network_api.NetworkEvents#errorremovingnetwork) +- [nodeCreated](network_api.NetworkEvents#nodecreated) +- [errorCreatingNode](network_api.NetworkEvents#errorcreatingnode) +- [nodeRemoved](network_api.NetworkEvents#noderemoved) +- [errorRemovingNode](network_api.NetworkEvents#errorremovingnode) + +## Properties + +### networkCreated + +• **networkCreated**: (`network`: [`Network`](../classes/network_network.Network)) => `void` + +#### Type declaration + +▸ (`network`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `network` | [`Network`](../classes/network_network.Network) | + +##### Returns + +`void` + +#### Defined in + +[src/network/api.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/api.ts#L6) + +___ + +### errorCreatingNetwork + +• **errorCreatingNetwork**: (`error`: `Error`) => `void` + +#### Type declaration + +▸ (`error`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `Error` | + +##### Returns + +`void` + +#### Defined in + +[src/network/api.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/api.ts#L7) + +___ + +### networkRemoved + +• **networkRemoved**: (`network`: [`Network`](../classes/network_network.Network)) => `void` + +#### Type declaration + +▸ (`network`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `network` | [`Network`](../classes/network_network.Network) | + +##### Returns + +`void` + +#### Defined in + +[src/network/api.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/api.ts#L9) + +___ + +### errorRemovingNetwork + +• **errorRemovingNetwork**: (`network`: [`Network`](../classes/network_network.Network), `error`: `Error`) => `void` + +#### Type declaration + +▸ (`network`, `error`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `network` | [`Network`](../classes/network_network.Network) | +| `error` | `Error` | + +##### Returns + +`void` + +#### Defined in + +[src/network/api.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/api.ts#L10) + +___ + +### nodeCreated + +• **nodeCreated**: (`network`: [`Network`](../classes/network_network.Network), `node`: [`NetworkNode`](../classes/network_node.NetworkNode)) => `void` + +#### Type declaration + +▸ (`network`, `node`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `network` | [`Network`](../classes/network_network.Network) | +| `node` | [`NetworkNode`](../classes/network_node.NetworkNode) | + +##### Returns + +`void` + +#### Defined in + +[src/network/api.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/api.ts#L12) + +___ + +### errorCreatingNode + +• **errorCreatingNode**: (`network`: [`Network`](../classes/network_network.Network), `error`: `Error`) => `void` + +#### Type declaration + +▸ (`network`, `error`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `network` | [`Network`](../classes/network_network.Network) | +| `error` | `Error` | + +##### Returns + +`void` + +#### Defined in + +[src/network/api.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/api.ts#L13) + +___ + +### nodeRemoved + +• **nodeRemoved**: (`network`: [`Network`](../classes/network_network.Network), `node`: [`NetworkNode`](../classes/network_node.NetworkNode)) => `void` + +#### Type declaration + +▸ (`network`, `node`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `network` | [`Network`](../classes/network_network.Network) | +| `node` | [`NetworkNode`](../classes/network_node.NetworkNode) | + +##### Returns + +`void` + +#### Defined in + +[src/network/api.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/api.ts#L15) + +___ + +### errorRemovingNode + +• **errorRemovingNode**: (`network`: [`Network`](../classes/network_network.Network), `node`: [`NetworkNode`](../classes/network_node.NetworkNode), `error`: `Error`) => `void` + +#### Type declaration + +▸ (`network`, `node`, `error`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `network` | [`Network`](../classes/network_network.Network) | +| `node` | [`NetworkNode`](../classes/network_node.NetworkNode) | +| `error` | `Error` | + +##### Returns + +`void` + +#### Defined in + +[src/network/api.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/api.ts#L16) diff --git a/src/pages/docs/golem-js/reference/interfaces/network_network.NetworkInfo.md b/src/pages/docs/golem-js/reference/interfaces/network_network.NetworkInfo.md index 1aaaa42c5..9940b285b 100644 --- a/src/pages/docs/golem-js/reference/interfaces/network_network.NetworkInfo.md +++ b/src/pages/docs/golem-js/reference/interfaces/network_network.NetworkInfo.md @@ -15,6 +15,7 @@ type: "JS API Reference" - [id](network_network.NetworkInfo#id) - [ip](network_network.NetworkInfo#ip) - [mask](network_network.NetworkInfo#mask) +- [gateway](network_network.NetworkInfo#gateway) - [nodes](network_network.NetworkInfo#nodes) ## Properties @@ -25,7 +26,7 @@ type: "JS API Reference" #### Defined in -[src/network/network.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/network.ts#L29) +[src/network/network.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L6) ___ @@ -35,7 +36,7 @@ ___ #### Defined in -[src/network/network.ts:30](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/network.ts#L30) +[src/network/network.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L7) ___ @@ -45,7 +46,17 @@ ___ #### Defined in -[src/network/network.ts:31](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/network.ts#L31) +[src/network/network.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L8) + +___ + +### gateway + +• `Optional` **gateway**: `string` + +#### Defined in + +[src/network/network.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L9) ___ @@ -59,4 +70,4 @@ ___ #### Defined in -[src/network/network.ts:32](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/network.ts#L32) +[src/network/network.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.ts#L10) diff --git a/src/pages/docs/golem-js/reference/interfaces/network_network_module.NetworkModule.md b/src/pages/docs/golem-js/reference/interfaces/network_network_module.NetworkModule.md new file mode 100644 index 000000000..f3cb6bd50 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/network_network_module.NetworkModule.md @@ -0,0 +1,127 @@ +--- +title: "Interface NetworkModule" +pageTitle: "Interface NetworkModule - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface NetworkModule within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: NetworkModule + +[network/network.module](../modules/network_network_module).NetworkModule + +## Implemented by + +- [`NetworkModuleImpl`](../classes/network_network_module.NetworkModuleImpl) + +## Table of contents + +### Properties + +- [events](network_network_module.NetworkModule#events) + +### Methods + +- [createNetwork](network_network_module.NetworkModule#createnetwork) +- [removeNetwork](network_network_module.NetworkModule#removenetwork) +- [createNetworkNode](network_network_module.NetworkModule#createnetworknode) +- [removeNetworkNode](network_network_module.NetworkModule#removenetworknode) + +## Properties + +### events + +• **events**: `EventEmitter`\<[`NetworkEvents`](network_api.NetworkEvents), `any`\> + +#### Defined in + +[src/network/network.module.ts:39](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L39) + +## Methods + +### createNetwork + +▸ **createNetwork**(`options?`): `Promise`\<[`Network`](../classes/network_network.Network)\> + +Creates a new network with the specified options. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `options?` | [`NetworkOptions`](network_network_module.NetworkOptions) | NetworkOptions | + +#### Returns + +`Promise`\<[`Network`](../classes/network_network.Network)\> + +#### Defined in + +[src/network/network.module.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L45) + +___ + +### removeNetwork + +▸ **removeNetwork**(`network`): `Promise`\<`void`\> + +Removes an existing network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `network` | [`Network`](../classes/network_network.Network) | The network to be removed. | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/network/network.module.ts:51](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L51) + +___ + +### createNetworkNode + +▸ **createNetworkNode**(`network`, `nodeId`, `nodeIp?`): `Promise`\<[`NetworkNode`](../classes/network_node.NetworkNode)\> + +Creates a new node within a specified network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `network` | [`Network`](../classes/network_network.Network) | The network to which the node will be added. | +| `nodeId` | `string` | The ID of the node to be created. | +| `nodeIp?` | `string` | Optional IP address for the node. If not provided, the first available IP address will be assigned. | + +#### Returns + +`Promise`\<[`NetworkNode`](../classes/network_node.NetworkNode)\> + +#### Defined in + +[src/network/network.module.ts:59](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L59) + +___ + +### removeNetworkNode + +▸ **removeNetworkNode**(`network`, `node`): `Promise`\<`void`\> + +Removes an existing node from a specified network. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `network` | [`Network`](../classes/network_network.Network) | The network from which the node will be removed. | +| `node` | [`NetworkNode`](../classes/network_node.NetworkNode) | The node to be removed. | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/network/network.module.ts:66](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L66) diff --git a/src/pages/docs/golem-js/reference/interfaces/network_network_module.NetworkOptions.md b/src/pages/docs/golem-js/reference/interfaces/network_network_module.NetworkOptions.md new file mode 100644 index 000000000..911b30b30 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/network_network_module.NetworkOptions.md @@ -0,0 +1,76 @@ +--- +title: "Interface NetworkOptions" +pageTitle: "Interface NetworkOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface NetworkOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: NetworkOptions + +[network/network.module](../modules/network_network_module).NetworkOptions + +## Table of contents + +### Properties + +- [ip](network_network_module.NetworkOptions#ip) +- [ownerIp](network_network_module.NetworkOptions#ownerip) +- [mask](network_network_module.NetworkOptions#mask) +- [gateway](network_network_module.NetworkOptions#gateway) + +## Properties + +### ip + +• `Optional` **ip**: `string` + +The IP address of the network. May contain netmask, e.g. "192.168.0.0/24". +This field can include the netmask directly in CIDR notation. + +**`Default`** + +```ts +"192.168.0.0" +``` + +#### Defined in + +[src/network/network.module.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L17) + +___ + +### ownerIp + +• `Optional` **ownerIp**: `string` + +The desired IP address of the requestor node within the newly-created network. +This field is optional and if not provided, the first available IP address will be assigned. + +#### Defined in + +[src/network/network.module.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L23) + +___ + +### mask + +• `Optional` **mask**: `string` + +Optional network mask given in dotted decimal notation. +If the ip address was provided in Cidr notation this mask will override the mask from the Cidr notation + +#### Defined in + +[src/network/network.module.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L29) + +___ + +### gateway + +• `Optional` **gateway**: `string` + +Optional gateway address for the network. +This field can be used to specify a gateway IP address for the network. + +#### Defined in + +[src/network/network.module.ts:35](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/network.module.ts#L35) diff --git a/src/pages/docs/golem-js/reference/interfaces/network_tcpProxy.TcpProxyEvents.md b/src/pages/docs/golem-js/reference/interfaces/network_tcpProxy.TcpProxyEvents.md new file mode 100644 index 000000000..c13d84b45 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/network_tcpProxy.TcpProxyEvents.md @@ -0,0 +1,41 @@ +--- +title: "Interface TcpProxyEvents" +pageTitle: "Interface TcpProxyEvents - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface TcpProxyEvents within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: TcpProxyEvents + +[network/tcpProxy](../modules/network_tcpProxy).TcpProxyEvents + +## Table of contents + +### Properties + +- [error](network_tcpProxy.TcpProxyEvents#error) + +## Properties + +### error + +• **error**: (`err`: `unknown`) => `void` + +Raised when the proxy encounters any sort of error + +#### Type declaration + +▸ (`err`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `err` | `unknown` | + +##### Returns + +`void` + +#### Defined in + +[src/network/tcpProxy.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/tcpProxy.ts#L8) diff --git a/src/pages/docs/golem-js/reference/interfaces/network_tcpProxy.TcpProxyOptions.md b/src/pages/docs/golem-js/reference/interfaces/network_tcpProxy.TcpProxyOptions.md new file mode 100644 index 000000000..a3d82f768 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/network_tcpProxy.TcpProxyOptions.md @@ -0,0 +1,48 @@ +--- +title: "Interface TcpProxyOptions" +pageTitle: "Interface TcpProxyOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface TcpProxyOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: TcpProxyOptions + +[network/tcpProxy](../modules/network_tcpProxy).TcpProxyOptions + +Configuration required by the TcpProxy to work properly + +## Table of contents + +### Properties + +- [logger](network_tcpProxy.TcpProxyOptions#logger) +- [heartBeatSec](network_tcpProxy.TcpProxyOptions#heartbeatsec) + +## Properties + +### logger + +• **logger**: [`Logger`](shared_utils_logger_logger.Logger) + +The logger instance to use for logging + +#### Defined in + +[src/network/tcpProxy.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/tcpProxy.ts#L18) + +___ + +### heartBeatSec + +• **heartBeatSec**: `number` + +Number of seconds to wait between heart-beating the WS connection ot yagna + +**`Default`** + +```ts +10 +``` + +#### Defined in + +[src/network/tcpProxy.ts:25](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/network/tcpProxy.ts#L25) diff --git a/src/pages/docs/golem-js/reference/interfaces/package_package.PackageDetails.md b/src/pages/docs/golem-js/reference/interfaces/package_package.PackageDetails.md deleted file mode 100644 index b8f009756..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/package_package.PackageDetails.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "Interface PackageDetails" -pageTitle: "Interface PackageDetails - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface PackageDetails within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: PackageDetails - -[package/package](../modules/package_package).PackageDetails - -## Table of contents - -### Properties - -- [minMemGib](package_package.PackageDetails#minmemgib) -- [minStorageGib](package_package.PackageDetails#minstoragegib) -- [minCpuThreads](package_package.PackageDetails#mincputhreads) -- [minCpuCores](package_package.PackageDetails#mincpucores) -- [engine](package_package.PackageDetails#engine) -- [capabilities](package_package.PackageDetails#capabilities) -- [imageHash](package_package.PackageDetails#imagehash) - -## Properties - -### minMemGib - -• **minMemGib**: `number` - -#### Defined in - -[src/package/package.ts:37](https://github.com/golemfactory/golem-js/blob/7cee55b/src/package/package.ts#L37) - -___ - -### minStorageGib - -• **minStorageGib**: `number` - -#### Defined in - -[src/package/package.ts:38](https://github.com/golemfactory/golem-js/blob/7cee55b/src/package/package.ts#L38) - -___ - -### minCpuThreads - -• **minCpuThreads**: `number` - -#### Defined in - -[src/package/package.ts:39](https://github.com/golemfactory/golem-js/blob/7cee55b/src/package/package.ts#L39) - -___ - -### minCpuCores - -• **minCpuCores**: `number` - -#### Defined in - -[src/package/package.ts:40](https://github.com/golemfactory/golem-js/blob/7cee55b/src/package/package.ts#L40) - -___ - -### engine - -• **engine**: `string` - -#### Defined in - -[src/package/package.ts:41](https://github.com/golemfactory/golem-js/blob/7cee55b/src/package/package.ts#L41) - -___ - -### capabilities - -• **capabilities**: `string`[] - -#### Defined in - -[src/package/package.ts:42](https://github.com/golemfactory/golem-js/blob/7cee55b/src/package/package.ts#L42) - -___ - -### imageHash - -• `Optional` **imageHash**: `string` - -#### Defined in - -[src/package/package.ts:43](https://github.com/golemfactory/golem-js/blob/7cee55b/src/package/package.ts#L43) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_BaseDocument.BaseModel.md b/src/pages/docs/golem-js/reference/interfaces/payment_BaseDocument.BaseModel.md new file mode 100644 index 000000000..cdc85bd7f --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/payment_BaseDocument.BaseModel.md @@ -0,0 +1,102 @@ +--- +title: "Interface BaseModel" +pageTitle: "Interface BaseModel - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface BaseModel within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: BaseModel + +[payment/BaseDocument](../modules/payment_BaseDocument).BaseModel + +## Table of contents + +### Properties + +- [issuerId](payment_BaseDocument.BaseModel#issuerid) +- [recipientId](payment_BaseDocument.BaseModel#recipientid) +- [payeeAddr](payment_BaseDocument.BaseModel#payeeaddr) +- [payerAddr](payment_BaseDocument.BaseModel#payeraddr) +- [paymentPlatform](payment_BaseDocument.BaseModel#paymentplatform) +- [agreementId](payment_BaseDocument.BaseModel#agreementid) +- [paymentDueDate](payment_BaseDocument.BaseModel#paymentduedate) +- [status](payment_BaseDocument.BaseModel#status) + +## Properties + +### issuerId + +• **issuerId**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L5) + +___ + +### recipientId + +• **recipientId**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L6) + +___ + +### payeeAddr + +• **payeeAddr**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L7) + +___ + +### payerAddr + +• **payerAddr**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L8) + +___ + +### paymentPlatform + +• **paymentPlatform**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L9) + +___ + +### agreementId + +• **agreementId**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L10) + +___ + +### paymentDueDate + +• `Optional` **paymentDueDate**: `string` + +#### Defined in + +[src/payment/BaseDocument.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L11) + +___ + +### status + +• **status**: ``"ISSUED"`` \| ``"RECEIVED"`` \| ``"ACCEPTED"`` \| ``"REJECTED"`` \| ``"FAILED"`` \| ``"SETTLED"`` \| ``"CANCELLED"`` + +#### Defined in + +[src/payment/BaseDocument.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/BaseDocument.ts#L12) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_agreement_payment_process.PaymentProcessOptions.md b/src/pages/docs/golem-js/reference/interfaces/payment_agreement_payment_process.PaymentProcessOptions.md new file mode 100644 index 000000000..190ae6c17 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/payment_agreement_payment_process.PaymentProcessOptions.md @@ -0,0 +1,36 @@ +--- +title: "Interface PaymentProcessOptions" +pageTitle: "Interface PaymentProcessOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface PaymentProcessOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: PaymentProcessOptions + +[payment/agreement\_payment\_process](../modules/payment_agreement_payment_process).PaymentProcessOptions + +## Table of contents + +### Properties + +- [invoiceFilter](payment_agreement_payment_process.PaymentProcessOptions#invoicefilter) +- [debitNoteFilter](payment_agreement_payment_process.PaymentProcessOptions#debitnotefilter) + +## Properties + +### invoiceFilter + +• **invoiceFilter**: [`InvoiceFilter`](../modules/payment_agreement_payment_process#invoicefilter) + +#### Defined in + +[src/payment/agreement_payment_process.ts:34](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L34) + +___ + +### debitNoteFilter + +• **debitNoteFilter**: [`DebitNoteFilter`](../modules/payment_agreement_payment_process#debitnotefilter) + +#### Defined in + +[src/payment/agreement_payment_process.ts:35](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L35) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_allocation.AllocationOptions.md b/src/pages/docs/golem-js/reference/interfaces/payment_allocation.AllocationOptions.md new file mode 100644 index 000000000..890a21016 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/payment_allocation.AllocationOptions.md @@ -0,0 +1,161 @@ +--- +title: "Interface AllocationOptions" +pageTitle: "Interface AllocationOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface AllocationOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: AllocationOptions + +[payment/allocation](../modules/payment_allocation).AllocationOptions + +## Hierarchy + +- [`BasePaymentOptions`](payment_config.BasePaymentOptions) + + ↳ **`AllocationOptions`** + +## Table of contents + +### Properties + +- [account](payment_allocation.AllocationOptions#account) +- [expirationSec](payment_allocation.AllocationOptions#expirationsec) +- [yagnaOptions](payment_allocation.AllocationOptions#yagnaoptions) +- [budget](payment_allocation.AllocationOptions#budget) +- [payment](payment_allocation.AllocationOptions#payment) +- [paymentTimeout](payment_allocation.AllocationOptions#paymenttimeout) +- [paymentRequestTimeout](payment_allocation.AllocationOptions#paymentrequesttimeout) +- [unsubscribeTimeoutMs](payment_allocation.AllocationOptions#unsubscribetimeoutms) +- [logger](payment_allocation.AllocationOptions#logger) + +## Properties + +### account + +• **account**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `address` | `string` | +| `platform` | `string` | + +#### Defined in + +[src/payment/allocation.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/allocation.ts#L6) + +___ + +### expirationSec + +• `Optional` **expirationSec**: `number` + +#### Defined in + +[src/payment/allocation.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/allocation.ts#L10) + +___ + +### yagnaOptions + +• `Optional` **yagnaOptions**: [`YagnaOptions`](../modules/shared_yagna_yagnaApi#yagnaoptions) + +#### Inherited from + +[BasePaymentOptions](payment_config.BasePaymentOptions).[yagnaOptions](payment_config.BasePaymentOptions#yagnaoptions) + +#### Defined in + +[src/payment/config.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L4) + +___ + +### budget + +• `Optional` **budget**: `number` + +#### Inherited from + +[BasePaymentOptions](payment_config.BasePaymentOptions).[budget](payment_config.BasePaymentOptions#budget) + +#### Defined in + +[src/payment/config.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L5) + +___ + +### payment + +• `Optional` **payment**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `driver?` | `string` | +| `network?` | `string` | + +#### Inherited from + +[BasePaymentOptions](payment_config.BasePaymentOptions).[payment](payment_config.BasePaymentOptions#payment) + +#### Defined in + +[src/payment/config.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L6) + +___ + +### paymentTimeout + +• `Optional` **paymentTimeout**: `number` + +#### Inherited from + +[BasePaymentOptions](payment_config.BasePaymentOptions).[paymentTimeout](payment_config.BasePaymentOptions#paymenttimeout) + +#### Defined in + +[src/payment/config.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L7) + +___ + +### paymentRequestTimeout + +• `Optional` **paymentRequestTimeout**: `number` + +#### Inherited from + +[BasePaymentOptions](payment_config.BasePaymentOptions).[paymentRequestTimeout](payment_config.BasePaymentOptions#paymentrequesttimeout) + +#### Defined in + +[src/payment/config.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L8) + +___ + +### unsubscribeTimeoutMs + +• `Optional` **unsubscribeTimeoutMs**: `number` + +#### Inherited from + +[BasePaymentOptions](payment_config.BasePaymentOptions).[unsubscribeTimeoutMs](payment_config.BasePaymentOptions#unsubscribetimeoutms) + +#### Defined in + +[src/payment/config.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L9) + +___ + +### logger + +• `Optional` **logger**: [`Logger`](shared_utils_logger_logger.Logger) + +#### Inherited from + +[BasePaymentOptions](payment_config.BasePaymentOptions).[logger](payment_config.BasePaymentOptions#logger) + +#### Defined in + +[src/payment/config.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L10) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_api.IPaymentApi.md b/src/pages/docs/golem-js/reference/interfaces/payment_api.IPaymentApi.md new file mode 100644 index 000000000..c3097b96c --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/payment_api.IPaymentApi.md @@ -0,0 +1,272 @@ +--- +title: "Interface IPaymentApi" +pageTitle: "Interface IPaymentApi - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface IPaymentApi within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: IPaymentApi + +[payment/api](../modules/payment_api).IPaymentApi + +## Implemented by + +- [`PaymentApiAdapter`](../classes/shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter) + +## Table of contents + +### Properties + +- [receivedInvoices$](payment_api.IPaymentApi#receivedinvoices$) +- [receivedDebitNotes$](payment_api.IPaymentApi#receiveddebitnotes$) + +### Methods + +- [connect](payment_api.IPaymentApi#connect) +- [disconnect](payment_api.IPaymentApi#disconnect) +- [getInvoice](payment_api.IPaymentApi#getinvoice) +- [acceptInvoice](payment_api.IPaymentApi#acceptinvoice) +- [rejectInvoice](payment_api.IPaymentApi#rejectinvoice) +- [getDebitNote](payment_api.IPaymentApi#getdebitnote) +- [acceptDebitNote](payment_api.IPaymentApi#acceptdebitnote) +- [rejectDebitNote](payment_api.IPaymentApi#rejectdebitnote) +- [getAllocation](payment_api.IPaymentApi#getallocation) +- [createAllocation](payment_api.IPaymentApi#createallocation) +- [releaseAllocation](payment_api.IPaymentApi#releaseallocation) + +## Properties + +### receivedInvoices$ + +• **receivedInvoices$**: `Subject`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Defined in + +[src/payment/api.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L31) + +___ + +### receivedDebitNotes$ + +• **receivedDebitNotes$**: `Subject`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Defined in + +[src/payment/api.ts:32](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L32) + +## Methods + +### connect + +▸ **connect**(): `Promise`\<`void`\> + +Starts the reader logic + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/payment/api.ts:35](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L35) + +___ + +### disconnect + +▸ **disconnect**(): `Promise`\<`void`\> + +Terminates the reader logic + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/payment/api.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L38) + +___ + +### getInvoice + +▸ **getInvoice**(`id`): `Promise`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Defined in + +[src/payment/api.ts:40](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L40) + +___ + +### acceptInvoice + +▸ **acceptInvoice**(`invoice`, `allocation`, `amount`): `Promise`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `invoice` | [`Invoice`](../classes/payment_invoice.Invoice) | +| `allocation` | [`Allocation`](../classes/payment_allocation.Allocation) | +| `amount` | `string` | + +#### Returns + +`Promise`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Defined in + +[src/payment/api.ts:42](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L42) + +___ + +### rejectInvoice + +▸ **rejectInvoice**(`invoice`, `reason`): `Promise`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `invoice` | [`Invoice`](../classes/payment_invoice.Invoice) | +| `reason` | `string` | + +#### Returns + +`Promise`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Defined in + +[src/payment/api.ts:44](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L44) + +___ + +### getDebitNote + +▸ **getDebitNote**(`id`): `Promise`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Defined in + +[src/payment/api.ts:46](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L46) + +___ + +### acceptDebitNote + +▸ **acceptDebitNote**(`debitNote`, `allocation`, `amount`): `Promise`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `debitNote` | [`DebitNote`](../classes/payment_debit_note.DebitNote) | +| `allocation` | [`Allocation`](../classes/payment_allocation.Allocation) | +| `amount` | `string` | + +#### Returns + +`Promise`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Defined in + +[src/payment/api.ts:48](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L48) + +___ + +### rejectDebitNote + +▸ **rejectDebitNote**(`debitNote`, `reason`): `Promise`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `debitNote` | [`DebitNote`](../classes/payment_debit_note.DebitNote) | +| `reason` | `string` | + +#### Returns + +`Promise`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Defined in + +[src/payment/api.ts:50](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L50) + +___ + +### getAllocation + +▸ **getAllocation**(`id`): `Promise`\<[`Allocation`](../classes/payment_allocation.Allocation)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Allocation`](../classes/payment_allocation.Allocation)\> + +#### Defined in + +[src/payment/api.ts:52](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L52) + +___ + +### createAllocation + +▸ **createAllocation**(`params`): `Promise`\<[`Allocation`](../classes/payment_allocation.Allocation)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`CreateAllocationParams`](../modules/payment_api#createallocationparams) | + +#### Returns + +`Promise`\<[`Allocation`](../classes/payment_allocation.Allocation)\> + +#### Defined in + +[src/payment/api.ts:54](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L54) + +___ + +### releaseAllocation + +▸ **releaseAllocation**(`allocation`): `Promise`\<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `allocation` | [`Allocation`](../classes/payment_allocation.Allocation) | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/payment/api.ts:56](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L56) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_config.BasePaymentOptions.md b/src/pages/docs/golem-js/reference/interfaces/payment_config.BasePaymentOptions.md index 9e5e02578..e0d8bdc41 100644 --- a/src/pages/docs/golem-js/reference/interfaces/payment_config.BasePaymentOptions.md +++ b/src/pages/docs/golem-js/reference/interfaces/payment_config.BasePaymentOptions.md @@ -12,7 +12,7 @@ type: "JS API Reference" - **`BasePaymentOptions`** - ↳ [`PaymentOptions`](payment_payments.PaymentOptions) + ↳ [`AllocationOptions`](payment_allocation.AllocationOptions) ↳ [`PaymentOptions`](payment_service.PaymentOptions) @@ -27,17 +27,16 @@ type: "JS API Reference" - [paymentRequestTimeout](payment_config.BasePaymentOptions#paymentrequesttimeout) - [unsubscribeTimeoutMs](payment_config.BasePaymentOptions#unsubscribetimeoutms) - [logger](payment_config.BasePaymentOptions#logger) -- [eventTarget](payment_config.BasePaymentOptions#eventtarget) ## Properties ### yagnaOptions -• `Optional` **yagnaOptions**: [`YagnaOptions`](../modules/executor_executor#yagnaoptions) +• `Optional` **yagnaOptions**: [`YagnaOptions`](../modules/shared_yagna_yagnaApi#yagnaoptions) #### Defined in -[src/payment/config.ts:25](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L25) +[src/payment/config.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L4) ___ @@ -47,7 +46,7 @@ ___ #### Defined in -[src/payment/config.ts:26](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L26) +[src/payment/config.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L5) ___ @@ -64,7 +63,7 @@ ___ #### Defined in -[src/payment/config.ts:27](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L27) +[src/payment/config.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L6) ___ @@ -74,7 +73,7 @@ ___ #### Defined in -[src/payment/config.ts:28](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L28) +[src/payment/config.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L7) ___ @@ -84,7 +83,7 @@ ___ #### Defined in -[src/payment/config.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L29) +[src/payment/config.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L8) ___ @@ -94,24 +93,14 @@ ___ #### Defined in -[src/payment/config.ts:30](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L30) +[src/payment/config.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L9) ___ ### logger -• `Optional` **logger**: [`Logger`](utils_logger_logger.Logger) +• `Optional` **logger**: [`Logger`](shared_utils_logger_logger.Logger) #### Defined in -[src/payment/config.ts:31](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L31) - -___ - -### eventTarget - -• `Optional` **eventTarget**: `EventTarget` - -#### Defined in - -[src/payment/config.ts:32](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L32) +[src/payment/config.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L10) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_debit_note.DebitNoteDTO.md b/src/pages/docs/golem-js/reference/interfaces/payment_debit_note.DebitNoteDTO.md deleted file mode 100644 index 0cee8dfdd..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/payment_debit_note.DebitNoteDTO.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: "Interface DebitNoteDTO" -pageTitle: "Interface DebitNoteDTO - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface DebitNoteDTO within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: DebitNoteDTO - -[payment/debit\_note](../modules/payment_debit_note).DebitNoteDTO - -## Table of contents - -### Properties - -- [id](payment_debit_note.DebitNoteDTO#id) -- [timestamp](payment_debit_note.DebitNoteDTO#timestamp) -- [activityId](payment_debit_note.DebitNoteDTO#activityid) -- [agreementId](payment_debit_note.DebitNoteDTO#agreementid) -- [totalAmountDue](payment_debit_note.DebitNoteDTO#totalamountdue) -- [usageCounterVector](payment_debit_note.DebitNoteDTO#usagecountervector) - -## Properties - -### id - -• **id**: `string` - -#### Defined in - -[src/payment/debit_note.ts:14](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/debit_note.ts#L14) - -___ - -### timestamp - -• **timestamp**: `string` - -#### Defined in - -[src/payment/debit_note.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/debit_note.ts#L15) - -___ - -### activityId - -• **activityId**: `string` - -#### Defined in - -[src/payment/debit_note.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/debit_note.ts#L16) - -___ - -### agreementId - -• **agreementId**: `string` - -#### Defined in - -[src/payment/debit_note.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/debit_note.ts#L17) - -___ - -### totalAmountDue - -• **totalAmountDue**: `number` - -#### Defined in - -[src/payment/debit_note.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/debit_note.ts#L18) - -___ - -### usageCounterVector - -• `Optional` **usageCounterVector**: `object` - -#### Defined in - -[src/payment/debit_note.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/debit_note.ts#L19) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_debit_note.IDebitNoteRepository.md b/src/pages/docs/golem-js/reference/interfaces/payment_debit_note.IDebitNoteRepository.md new file mode 100644 index 000000000..75e125be2 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/payment_debit_note.IDebitNoteRepository.md @@ -0,0 +1,39 @@ +--- +title: "Interface IDebitNoteRepository" +pageTitle: "Interface IDebitNoteRepository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface IDebitNoteRepository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: IDebitNoteRepository + +[payment/debit\_note](../modules/payment_debit_note).IDebitNoteRepository + +## Implemented by + +- [`DebitNoteRepository`](../classes/shared_yagna_repository_debit_note_repository.DebitNoteRepository) + +## Table of contents + +### Methods + +- [getById](payment_debit_note.IDebitNoteRepository#getbyid) + +## Methods + +### getById + +▸ **getById**(`id`): `Promise`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Defined in + +[src/payment/debit_note.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/debit_note.ts#L7) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_invoice.IInvoiceRepository.md b/src/pages/docs/golem-js/reference/interfaces/payment_invoice.IInvoiceRepository.md new file mode 100644 index 000000000..2e539e5b8 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/payment_invoice.IInvoiceRepository.md @@ -0,0 +1,39 @@ +--- +title: "Interface IInvoiceRepository" +pageTitle: "Interface IInvoiceRepository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface IInvoiceRepository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: IInvoiceRepository + +[payment/invoice](../modules/payment_invoice).IInvoiceRepository + +## Implemented by + +- [`InvoiceRepository`](../classes/shared_yagna_repository_invoice_repository.InvoiceRepository) + +## Table of contents + +### Methods + +- [getById](payment_invoice.IInvoiceRepository#getbyid) + +## Methods + +### getById + +▸ **getById**(`id`): `Promise`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Defined in + +[src/payment/invoice.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/invoice.ts#L10) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_invoice.InvoiceDTO.md b/src/pages/docs/golem-js/reference/interfaces/payment_invoice.InvoiceDTO.md deleted file mode 100644 index 9515063b9..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/payment_invoice.InvoiceDTO.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: "Interface InvoiceDTO" -pageTitle: "Interface InvoiceDTO - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface InvoiceDTO within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: InvoiceDTO - -[payment/invoice](../modules/payment_invoice).InvoiceDTO - -## Table of contents - -### Properties - -- [id](payment_invoice.InvoiceDTO#id) -- [timestamp](payment_invoice.InvoiceDTO#timestamp) -- [activityIds](payment_invoice.InvoiceDTO#activityids) -- [agreementId](payment_invoice.InvoiceDTO#agreementid) -- [paymentDueDate](payment_invoice.InvoiceDTO#paymentduedate) -- [status](payment_invoice.InvoiceDTO#status) -- [requestorWalletAddress](payment_invoice.InvoiceDTO#requestorwalletaddress) -- [provider](payment_invoice.InvoiceDTO#provider) -- [paymentPlatform](payment_invoice.InvoiceDTO#paymentplatform) -- [amount](payment_invoice.InvoiceDTO#amount) - -## Properties - -### id - -• **id**: `string` - -#### Defined in - -[src/payment/invoice.ts:13](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/invoice.ts#L13) - -___ - -### timestamp - -• **timestamp**: `string` - -#### Defined in - -[src/payment/invoice.ts:14](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/invoice.ts#L14) - -___ - -### activityIds - -• `Optional` **activityIds**: `string`[] - -#### Defined in - -[src/payment/invoice.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/invoice.ts#L15) - -___ - -### agreementId - -• **agreementId**: `string` - -#### Defined in - -[src/payment/invoice.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/invoice.ts#L16) - -___ - -### paymentDueDate - -• `Optional` **paymentDueDate**: `string` - -#### Defined in - -[src/payment/invoice.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/invoice.ts#L17) - -___ - -### status - -• **status**: `string` - -#### Defined in - -[src/payment/invoice.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/invoice.ts#L18) - -___ - -### requestorWalletAddress - -• **requestorWalletAddress**: `string` - -#### Defined in - -[src/payment/invoice.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/invoice.ts#L19) - -___ - -### provider - -• **provider**: [`ProviderInfo`](agreement_agreement.ProviderInfo) - -#### Defined in - -[src/payment/invoice.ts:20](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/invoice.ts#L20) - -___ - -### paymentPlatform - -• **paymentPlatform**: `string` - -#### Defined in - -[src/payment/invoice.ts:21](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/invoice.ts#L21) - -___ - -### amount - -• **amount**: `number` - -#### Defined in - -[src/payment/invoice.ts:22](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/invoice.ts#L22) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_payment_module.PaymentModule.md b/src/pages/docs/golem-js/reference/interfaces/payment_payment_module.PaymentModule.md new file mode 100644 index 000000000..492c2774a --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/payment_payment_module.PaymentModule.md @@ -0,0 +1,292 @@ +--- +title: "Interface PaymentModule" +pageTitle: "Interface PaymentModule - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface PaymentModule within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: PaymentModule + +[payment/payment.module](../modules/payment_payment_module).PaymentModule + +## Implemented by + +- [`PaymentModuleImpl`](../classes/payment_payment_module.PaymentModuleImpl) + +## Table of contents + +### Properties + +- [events](payment_payment_module.PaymentModule#events) + +### Methods + +- [observeDebitNotes](payment_payment_module.PaymentModule#observedebitnotes) +- [observeInvoices](payment_payment_module.PaymentModule#observeinvoices) +- [createAllocation](payment_payment_module.PaymentModule#createallocation) +- [releaseAllocation](payment_payment_module.PaymentModule#releaseallocation) +- [amendAllocation](payment_payment_module.PaymentModule#amendallocation) +- [getAllocation](payment_payment_module.PaymentModule#getallocation) +- [acceptInvoice](payment_payment_module.PaymentModule#acceptinvoice) +- [rejectInvoice](payment_payment_module.PaymentModule#rejectinvoice) +- [acceptDebitNote](payment_payment_module.PaymentModule#acceptdebitnote) +- [rejectDebitNote](payment_payment_module.PaymentModule#rejectdebitnote) +- [createInvoiceProcessor](payment_payment_module.PaymentModule#createinvoiceprocessor) +- [createAgreementPaymentProcess](payment_payment_module.PaymentModule#createagreementpaymentprocess) +- [getPayerDetails](payment_payment_module.PaymentModule#getpayerdetails) + +## Properties + +### events + +• **events**: `EventEmitter`\<[`PaymentEvents`](../modules/payment_api#paymentevents), `any`\> + +#### Defined in + +[src/payment/payment.module.ts:44](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L44) + +## Methods + +### observeDebitNotes + +▸ **observeDebitNotes**(): `Observable`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Returns + +`Observable`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Defined in + +[src/payment/payment.module.ts:46](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L46) + +___ + +### observeInvoices + +▸ **observeInvoices**(): `Observable`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Returns + +`Observable`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Defined in + +[src/payment/payment.module.ts:48](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L48) + +___ + +### createAllocation + +▸ **createAllocation**(`params`): `Promise`\<[`Allocation`](../classes/payment_allocation.Allocation)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`CreateAllocationParams`](../modules/payment_api#createallocationparams) | + +#### Returns + +`Promise`\<[`Allocation`](../classes/payment_allocation.Allocation)\> + +#### Defined in + +[src/payment/payment.module.ts:50](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L50) + +___ + +### releaseAllocation + +▸ **releaseAllocation**(`allocation`): `Promise`\<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `allocation` | [`Allocation`](../classes/payment_allocation.Allocation) | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/payment/payment.module.ts:52](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L52) + +___ + +### amendAllocation + +▸ **amendAllocation**(`allocation`, `params`): `Promise`\<[`Allocation`](../classes/payment_allocation.Allocation)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `allocation` | [`Allocation`](../classes/payment_allocation.Allocation) | +| `params` | [`CreateAllocationParams`](../modules/payment_api#createallocationparams) | + +#### Returns + +`Promise`\<[`Allocation`](../classes/payment_allocation.Allocation)\> + +#### Defined in + +[src/payment/payment.module.ts:54](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L54) + +___ + +### getAllocation + +▸ **getAllocation**(`id`): `Promise`\<[`Allocation`](../classes/payment_allocation.Allocation)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`Allocation`](../classes/payment_allocation.Allocation)\> + +#### Defined in + +[src/payment/payment.module.ts:56](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L56) + +___ + +### acceptInvoice + +▸ **acceptInvoice**(`invoice`, `allocation`, `amount`): `Promise`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `invoice` | [`Invoice`](../classes/payment_invoice.Invoice) | +| `allocation` | [`Allocation`](../classes/payment_allocation.Allocation) | +| `amount` | `string` | + +#### Returns + +`Promise`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Defined in + +[src/payment/payment.module.ts:58](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L58) + +___ + +### rejectInvoice + +▸ **rejectInvoice**(`invoice`, `reason`): `Promise`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `invoice` | [`Invoice`](../classes/payment_invoice.Invoice) | +| `reason` | `string` | + +#### Returns + +`Promise`\<[`Invoice`](../classes/payment_invoice.Invoice)\> + +#### Defined in + +[src/payment/payment.module.ts:60](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L60) + +___ + +### acceptDebitNote + +▸ **acceptDebitNote**(`debitNote`, `allocation`, `amount`): `Promise`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `debitNote` | [`DebitNote`](../classes/payment_debit_note.DebitNote) | +| `allocation` | [`Allocation`](../classes/payment_allocation.Allocation) | +| `amount` | `string` | + +#### Returns + +`Promise`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Defined in + +[src/payment/payment.module.ts:62](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L62) + +___ + +### rejectDebitNote + +▸ **rejectDebitNote**(`debitNote`, `reason`): `Promise`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `debitNote` | [`DebitNote`](../classes/payment_debit_note.DebitNote) | +| `reason` | `string` | + +#### Returns + +`Promise`\<[`DebitNote`](../classes/payment_debit_note.DebitNote)\> + +#### Defined in + +[src/payment/payment.module.ts:64](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L64) + +___ + +### createInvoiceProcessor + +▸ **createInvoiceProcessor**(): [`InvoiceProcessor`](../classes/payment_InvoiceProcessor.InvoiceProcessor) + +#### Returns + +[`InvoiceProcessor`](../classes/payment_InvoiceProcessor.InvoiceProcessor) + +#### Defined in + +[src/payment/payment.module.ts:66](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L66) + +___ + +### createAgreementPaymentProcess + +▸ **createAgreementPaymentProcess**(`agreement`, `allocation`, `options?`): [`AgreementPaymentProcess`](../classes/payment_agreement_payment_process.AgreementPaymentProcess) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | +| `allocation` | [`Allocation`](../classes/payment_allocation.Allocation) | +| `options?` | `Partial`\<[`PaymentProcessOptions`](payment_agreement_payment_process.PaymentProcessOptions)\> | + +#### Returns + +[`AgreementPaymentProcess`](../classes/payment_agreement_payment_process.AgreementPaymentProcess) + +#### Defined in + +[src/payment/payment.module.ts:68](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L68) + +___ + +### getPayerDetails + +▸ **getPayerDetails**(): `Promise`\<[`PayerDetails`](../classes/payment_PayerDetails.PayerDetails)\> + +Get the payment platform and wallet address of the payer. + +#### Returns + +`Promise`\<[`PayerDetails`](../classes/payment_PayerDetails.PayerDetails)\> + +#### Defined in + +[src/payment/payment.module.ts:77](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L77) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_payment_module.PaymentModuleOptions.md b/src/pages/docs/golem-js/reference/interfaces/payment_payment_module.PaymentModuleOptions.md new file mode 100644 index 000000000..131a82b22 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/payment_payment_module.PaymentModuleOptions.md @@ -0,0 +1,69 @@ +--- +title: "Interface PaymentModuleOptions" +pageTitle: "Interface PaymentModuleOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface PaymentModuleOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: PaymentModuleOptions + +[payment/payment.module](../modules/payment_payment_module).PaymentModuleOptions + +## Table of contents + +### Properties + +- [network](payment_payment_module.PaymentModuleOptions#network) +- [driver](payment_payment_module.PaymentModuleOptions#driver) +- [token](payment_payment_module.PaymentModuleOptions#token) + +## Properties + +### network + +• `Optional` **network**: `string` + +Network used to facilitate the payment. +(for example: "mainnet", "holesky") + +**`Default`** + +```ts +holesky +``` + +#### Defined in + +[src/payment/payment.module.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L26) + +___ + +### driver + +• `Optional` **driver**: `string` & {} \| ``"erc20"`` + +Payment driver used to facilitate the payment. +(for example: "erc20") + +**`Default`** + +```ts +erc20 +``` + +#### Defined in + +[src/payment/payment.module.ts:33](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L33) + +___ + +### token + +• `Optional` **token**: `string` & {} \| ``"glm"`` \| ``"tglm"`` + +Token used to facilitate the payment. +If unset, it will be inferred from the network. +(for example: "glm", "tglm") + +#### Defined in + +[src/payment/payment.module.ts:40](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/payment.module.ts#L40) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_payments.PaymentOptions.md b/src/pages/docs/golem-js/reference/interfaces/payment_payments.PaymentOptions.md deleted file mode 100644 index 8c9974a14..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/payment_payments.PaymentOptions.md +++ /dev/null @@ -1,191 +0,0 @@ ---- -title: "Interface PaymentOptions" -pageTitle: "Interface PaymentOptions - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface PaymentOptions within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: PaymentOptions - -[payment/payments](../modules/payment_payments).PaymentOptions - -## Hierarchy - -- [`BasePaymentOptions`](payment_config.BasePaymentOptions) - - ↳ **`PaymentOptions`** - -## Table of contents - -### Properties - -- [invoiceFetchingInterval](payment_payments.PaymentOptions#invoicefetchinginterval) -- [debitNotesFetchingInterval](payment_payments.PaymentOptions#debitnotesfetchinginterval) -- [maxInvoiceEvents](payment_payments.PaymentOptions#maxinvoiceevents) -- [maxDebitNotesEvents](payment_payments.PaymentOptions#maxdebitnotesevents) -- [yagnaOptions](payment_payments.PaymentOptions#yagnaoptions) -- [budget](payment_payments.PaymentOptions#budget) -- [payment](payment_payments.PaymentOptions#payment) -- [paymentTimeout](payment_payments.PaymentOptions#paymenttimeout) -- [paymentRequestTimeout](payment_payments.PaymentOptions#paymentrequesttimeout) -- [unsubscribeTimeoutMs](payment_payments.PaymentOptions#unsubscribetimeoutms) -- [logger](payment_payments.PaymentOptions#logger) -- [eventTarget](payment_payments.PaymentOptions#eventtarget) - -## Properties - -### invoiceFetchingInterval - -• `Optional` **invoiceFetchingInterval**: `number` - -#### Defined in - -[src/payment/payments.ts:9](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/payments.ts#L9) - -___ - -### debitNotesFetchingInterval - -• `Optional` **debitNotesFetchingInterval**: `number` - -#### Defined in - -[src/payment/payments.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/payments.ts#L10) - -___ - -### maxInvoiceEvents - -• `Optional` **maxInvoiceEvents**: `number` - -#### Defined in - -[src/payment/payments.ts:11](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/payments.ts#L11) - -___ - -### maxDebitNotesEvents - -• `Optional` **maxDebitNotesEvents**: `number` - -#### Defined in - -[src/payment/payments.ts:12](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/payments.ts#L12) - -___ - -### yagnaOptions - -• `Optional` **yagnaOptions**: [`YagnaOptions`](../modules/executor_executor#yagnaoptions) - -#### Inherited from - -[BasePaymentOptions](payment_config.BasePaymentOptions).[yagnaOptions](payment_config.BasePaymentOptions#yagnaoptions) - -#### Defined in - -[src/payment/config.ts:25](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L25) - -___ - -### budget - -• `Optional` **budget**: `number` - -#### Inherited from - -[BasePaymentOptions](payment_config.BasePaymentOptions).[budget](payment_config.BasePaymentOptions#budget) - -#### Defined in - -[src/payment/config.ts:26](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L26) - -___ - -### payment - -• `Optional` **payment**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `driver?` | `string` | -| `network?` | `string` | - -#### Inherited from - -[BasePaymentOptions](payment_config.BasePaymentOptions).[payment](payment_config.BasePaymentOptions#payment) - -#### Defined in - -[src/payment/config.ts:27](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L27) - -___ - -### paymentTimeout - -• `Optional` **paymentTimeout**: `number` - -#### Inherited from - -[BasePaymentOptions](payment_config.BasePaymentOptions).[paymentTimeout](payment_config.BasePaymentOptions#paymenttimeout) - -#### Defined in - -[src/payment/config.ts:28](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L28) - -___ - -### paymentRequestTimeout - -• `Optional` **paymentRequestTimeout**: `number` - -#### Inherited from - -[BasePaymentOptions](payment_config.BasePaymentOptions).[paymentRequestTimeout](payment_config.BasePaymentOptions#paymentrequesttimeout) - -#### Defined in - -[src/payment/config.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L29) - -___ - -### unsubscribeTimeoutMs - -• `Optional` **unsubscribeTimeoutMs**: `number` - -#### Inherited from - -[BasePaymentOptions](payment_config.BasePaymentOptions).[unsubscribeTimeoutMs](payment_config.BasePaymentOptions#unsubscribetimeoutms) - -#### Defined in - -[src/payment/config.ts:30](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L30) - -___ - -### logger - -• `Optional` **logger**: [`Logger`](utils_logger_logger.Logger) - -#### Inherited from - -[BasePaymentOptions](payment_config.BasePaymentOptions).[logger](payment_config.BasePaymentOptions#logger) - -#### Defined in - -[src/payment/config.ts:31](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L31) - -___ - -### eventTarget - -• `Optional` **eventTarget**: `EventTarget` - -#### Inherited from - -[BasePaymentOptions](payment_config.BasePaymentOptions).[eventTarget](payment_config.BasePaymentOptions#eventtarget) - -#### Defined in - -[src/payment/config.ts:32](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L32) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_rejection.Rejection.md b/src/pages/docs/golem-js/reference/interfaces/payment_rejection.Rejection.md new file mode 100644 index 000000000..365dd4f76 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/payment_rejection.Rejection.md @@ -0,0 +1,47 @@ +--- +title: "Interface Rejection" +pageTitle: "Interface Rejection - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface Rejection within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: Rejection + +[payment/rejection](../modules/payment_rejection).Rejection + +## Table of contents + +### Properties + +- [rejectionReason](payment_rejection.Rejection#rejectionreason) +- [totalAmountAccepted](payment_rejection.Rejection#totalamountaccepted) +- [message](payment_rejection.Rejection#message) + +## Properties + +### rejectionReason + +• **rejectionReason**: [`RejectionReason`](../enums/payment_rejection.RejectionReason) + +#### Defined in + +[src/payment/rejection.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/rejection.ts#L16) + +___ + +### totalAmountAccepted + +• **totalAmountAccepted**: `string` + +#### Defined in + +[src/payment/rejection.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/rejection.ts#L17) + +___ + +### message + +• `Optional` **message**: `string` + +#### Defined in + +[src/payment/rejection.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/rejection.ts#L18) diff --git a/src/pages/docs/golem-js/reference/interfaces/payment_service.PaymentOptions.md b/src/pages/docs/golem-js/reference/interfaces/payment_service.PaymentOptions.md index e02d3557b..bb9df7597 100644 --- a/src/pages/docs/golem-js/reference/interfaces/payment_service.PaymentOptions.md +++ b/src/pages/docs/golem-js/reference/interfaces/payment_service.PaymentOptions.md @@ -31,7 +31,6 @@ type: "JS API Reference" - [paymentRequestTimeout](payment_service.PaymentOptions#paymentrequesttimeout) - [unsubscribeTimeoutMs](payment_service.PaymentOptions#unsubscribetimeoutms) - [logger](payment_service.PaymentOptions#logger) -- [eventTarget](payment_service.PaymentOptions#eventtarget) ## Properties @@ -43,7 +42,7 @@ Interval for checking new invoices #### Defined in -[src/payment/service.ts:24](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/service.ts#L24) +[src/payment/service.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/service.ts#L6) ___ @@ -55,7 +54,7 @@ Interval for checking new debit notes #### Defined in -[src/payment/service.ts:26](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/service.ts#L26) +[src/payment/service.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/service.ts#L8) ___ @@ -67,7 +66,7 @@ Maximum number of invoice events per one fetching #### Defined in -[src/payment/service.ts:28](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/service.ts#L28) +[src/payment/service.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/service.ts#L10) ___ @@ -79,37 +78,37 @@ Maximum number of debit notes events per one fetching #### Defined in -[src/payment/service.ts:30](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/service.ts#L30) +[src/payment/service.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/service.ts#L12) ___ ### debitNotesFilter -• `Optional` **debitNotesFilter**: [`DebitNoteFilter`](../modules/payment_service#debitnotefilter) +• `Optional` **debitNotesFilter**: [`DebitNoteFilter`](../modules/payment_agreement_payment_process#debitnotefilter) A custom filter that checks every debit notes coming from providers #### Defined in -[src/payment/service.ts:32](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/service.ts#L32) +[src/payment/service.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/service.ts#L14) ___ ### invoiceFilter -• `Optional` **invoiceFilter**: [`InvoiceFilter`](../modules/payment_service#invoicefilter) +• `Optional` **invoiceFilter**: [`InvoiceFilter`](../modules/payment_agreement_payment_process#invoicefilter) A custom filter that checks every invoices coming from providers #### Defined in -[src/payment/service.ts:34](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/service.ts#L34) +[src/payment/service.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/service.ts#L16) ___ ### yagnaOptions -• `Optional` **yagnaOptions**: [`YagnaOptions`](../modules/executor_executor#yagnaoptions) +• `Optional` **yagnaOptions**: [`YagnaOptions`](../modules/shared_yagna_yagnaApi#yagnaoptions) #### Inherited from @@ -117,7 +116,7 @@ ___ #### Defined in -[src/payment/config.ts:25](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L25) +[src/payment/config.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L4) ___ @@ -131,7 +130,7 @@ ___ #### Defined in -[src/payment/config.ts:26](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L26) +[src/payment/config.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L5) ___ @@ -152,7 +151,7 @@ ___ #### Defined in -[src/payment/config.ts:27](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L27) +[src/payment/config.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L6) ___ @@ -166,7 +165,7 @@ ___ #### Defined in -[src/payment/config.ts:28](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L28) +[src/payment/config.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L7) ___ @@ -180,7 +179,7 @@ ___ #### Defined in -[src/payment/config.ts:29](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L29) +[src/payment/config.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L8) ___ @@ -194,13 +193,13 @@ ___ #### Defined in -[src/payment/config.ts:30](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L30) +[src/payment/config.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L9) ___ ### logger -• `Optional` **logger**: [`Logger`](utils_logger_logger.Logger) +• `Optional` **logger**: [`Logger`](shared_utils_logger_logger.Logger) #### Inherited from @@ -208,18 +207,4 @@ ___ #### Defined in -[src/payment/config.ts:31](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L31) - -___ - -### eventTarget - -• `Optional` **eventTarget**: `EventTarget` - -#### Inherited from - -[BasePaymentOptions](payment_config.BasePaymentOptions).[eventTarget](payment_config.BasePaymentOptions#eventtarget) - -#### Defined in - -[src/payment/config.ts:32](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/config.ts#L32) +[src/payment/config.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/config.ts#L10) diff --git a/src/pages/docs/golem-js/reference/interfaces/resource_rental_rental_module.RentalModule.md b/src/pages/docs/golem-js/reference/interfaces/resource_rental_rental_module.RentalModule.md new file mode 100644 index 000000000..9ce62a5a0 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/resource_rental_rental_module.RentalModule.md @@ -0,0 +1,69 @@ +--- +title: "Interface RentalModule" +pageTitle: "Interface RentalModule - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface RentalModule within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: RentalModule + +[resource-rental/rental.module](../modules/resource_rental_rental_module).RentalModule + +## Implemented by + +- [`RentalModuleImpl`](../classes/resource_rental_rental_module.RentalModuleImpl) + +## Table of contents + +### Methods + +- [createResourceRental](resource_rental_rental_module.RentalModule#createresourcerental) +- [createResourceRentalPool](resource_rental_rental_module.RentalModule#createresourcerentalpool) + +## Methods + +### createResourceRental + +▸ **createResourceRental**(`agreement`, `allocation`, `options?`): [`ResourceRental`](../classes/resource_rental_resource_rental.ResourceRental) + +Factory that creates a new resource rental that's fully configured. +This method will also create the payment process for the agreement. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | +| `allocation` | [`Allocation`](../classes/payment_allocation.Allocation) | +| `options?` | [`ResourceRentalOptions`](resource_rental_resource_rental.ResourceRentalOptions) | + +#### Returns + +[`ResourceRental`](../classes/resource_rental_resource_rental.ResourceRental) + +#### Defined in + +[src/resource-rental/rental.module.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/rental.module.ts#L16) + +___ + +### createResourceRentalPool + +▸ **createResourceRentalPool**(`draftPool`, `allocation`, `options?`): [`ResourceRentalPool`](../classes/resource_rental_resource_rental_pool.ResourceRentalPool) + +Factory that creates new resource rental pool that's fully configured + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `draftPool` | [`DraftOfferProposalPool`](../classes/market_draft_offer_proposal_pool.DraftOfferProposalPool) | +| `allocation` | [`Allocation`](../classes/payment_allocation.Allocation) | +| `options?` | [`ResourceRentalPoolOptions`](resource_rental_resource_rental_pool.ResourceRentalPoolOptions) | + +#### Returns + +[`ResourceRentalPool`](../classes/resource_rental_resource_rental_pool.ResourceRentalPool) + +#### Defined in + +[src/resource-rental/rental.module.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/rental.module.ts#L20) diff --git a/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental.ResourceRentalEvents.md b/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental.ResourceRentalEvents.md new file mode 100644 index 000000000..f0371c395 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental.ResourceRentalEvents.md @@ -0,0 +1,35 @@ +--- +title: "Interface ResourceRentalEvents" +pageTitle: "Interface ResourceRentalEvents - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ResourceRentalEvents within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ResourceRentalEvents + +[resource-rental/resource-rental](../modules/resource_rental_resource_rental).ResourceRentalEvents + +## Table of contents + +### Properties + +- [finalized](resource_rental_resource_rental.ResourceRentalEvents#finalized) + +## Properties + +### finalized + +• **finalized**: () => `void` + +Raised when the rental process is fully finalized + +#### Type declaration + +▸ (): `void` + +##### Returns + +`void` + +#### Defined in + +[src/resource-rental/resource-rental.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L17) diff --git a/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental.ResourceRentalOptions.md b/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental.ResourceRentalOptions.md new file mode 100644 index 000000000..34735f9e5 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental.ResourceRentalOptions.md @@ -0,0 +1,58 @@ +--- +title: "Interface ResourceRentalOptions" +pageTitle: "Interface ResourceRentalOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ResourceRentalOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ResourceRentalOptions + +[resource-rental/resource-rental](../modules/resource_rental_resource_rental).ResourceRentalOptions + +## Table of contents + +### Properties + +- [exeUnit](resource_rental_resource_rental.ResourceRentalOptions#exeunit) +- [activity](resource_rental_resource_rental.ResourceRentalOptions#activity) +- [payment](resource_rental_resource_rental.ResourceRentalOptions#payment) +- [networkNode](resource_rental_resource_rental.ResourceRentalOptions#networknode) + +## Properties + +### exeUnit + +• `Optional` **exeUnit**: `Pick`\<[`ExeUnitOptions`](activity_exe_unit_exe_unit.ExeUnitOptions), ``"activityDeployingTimeout"`` \| ``"teardown"`` \| ``"setup"``\> + +#### Defined in + +[src/resource-rental/resource-rental.ts:21](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L21) + +___ + +### activity + +• `Optional` **activity**: [`ExecutionOptions`](activity_exe_script_executor.ExecutionOptions) + +#### Defined in + +[src/resource-rental/resource-rental.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L22) + +___ + +### payment + +• `Optional` **payment**: `Partial`\<[`PaymentProcessOptions`](payment_agreement_payment_process.PaymentProcessOptions)\> + +#### Defined in + +[src/resource-rental/resource-rental.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L23) + +___ + +### networkNode + +• `Optional` **networkNode**: [`NetworkNode`](../classes/network_node.NetworkNode) + +#### Defined in + +[src/resource-rental/resource-rental.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental.ts#L24) diff --git a/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolDependencies.md b/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolDependencies.md new file mode 100644 index 000000000..fb8734d9a --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolDependencies.md @@ -0,0 +1,80 @@ +--- +title: "Interface ResourceRentalPoolDependencies" +pageTitle: "Interface ResourceRentalPoolDependencies - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ResourceRentalPoolDependencies within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ResourceRentalPoolDependencies + +[resource-rental/resource-rental-pool](../modules/resource_rental_resource_rental_pool).ResourceRentalPoolDependencies + +## Table of contents + +### Properties + +- [allocation](resource_rental_resource_rental_pool.ResourceRentalPoolDependencies#allocation) +- [proposalPool](resource_rental_resource_rental_pool.ResourceRentalPoolDependencies#proposalpool) +- [marketModule](resource_rental_resource_rental_pool.ResourceRentalPoolDependencies#marketmodule) +- [networkModule](resource_rental_resource_rental_pool.ResourceRentalPoolDependencies#networkmodule) +- [rentalModule](resource_rental_resource_rental_pool.ResourceRentalPoolDependencies#rentalmodule) +- [logger](resource_rental_resource_rental_pool.ResourceRentalPoolDependencies#logger) + +## Properties + +### allocation + +• **allocation**: [`Allocation`](../classes/payment_allocation.Allocation) + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L14) + +___ + +### proposalPool + +• **proposalPool**: [`DraftOfferProposalPool`](../classes/market_draft_offer_proposal_pool.DraftOfferProposalPool) + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L15) + +___ + +### marketModule + +• **marketModule**: [`MarketModule`](market_market_module.MarketModule) + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L16) + +___ + +### networkModule + +• **networkModule**: [`NetworkModule`](network_network_module.NetworkModule) + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L17) + +___ + +### rentalModule + +• **rentalModule**: [`RentalModule`](resource_rental_rental_module.RentalModule) + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L18) + +___ + +### logger + +• **logger**: [`Logger`](shared_utils_logger_logger.Logger) + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L19) diff --git a/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolEvents.md b/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolEvents.md new file mode 100644 index 000000000..0899bb864 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolEvents.md @@ -0,0 +1,177 @@ +--- +title: "Interface ResourceRentalPoolEvents" +pageTitle: "Interface ResourceRentalPoolEvents - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ResourceRentalPoolEvents within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ResourceRentalPoolEvents + +[resource-rental/resource-rental-pool](../modules/resource_rental_resource_rental_pool).ResourceRentalPoolEvents + +## Table of contents + +### Properties + +- [ready](resource_rental_resource_rental_pool.ResourceRentalPoolEvents#ready) +- [end](resource_rental_resource_rental_pool.ResourceRentalPoolEvents#end) +- [acquired](resource_rental_resource_rental_pool.ResourceRentalPoolEvents#acquired) +- [released](resource_rental_resource_rental_pool.ResourceRentalPoolEvents#released) +- [created](resource_rental_resource_rental_pool.ResourceRentalPoolEvents#created) +- [destroyed](resource_rental_resource_rental_pool.ResourceRentalPoolEvents#destroyed) +- [error](resource_rental_resource_rental_pool.ResourceRentalPoolEvents#error) + +## Properties + +### ready + +• **ready**: () => `void` + +#### Type declaration + +▸ (): `void` + +##### Returns + +`void` + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:32](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L32) + +___ + +### end + +• **end**: () => `void` + +#### Type declaration + +▸ (): `void` + +##### Returns + +`void` + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:33](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L33) + +___ + +### acquired + +• **acquired**: (`agreement`: [`Agreement`](../classes/market_agreement_agreement.Agreement)) => `void` + +#### Type declaration + +▸ (`agreement`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | + +##### Returns + +`void` + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:34](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L34) + +___ + +### released + +• **released**: (`agreement`: [`Agreement`](../classes/market_agreement_agreement.Agreement)) => `void` + +#### Type declaration + +▸ (`agreement`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | + +##### Returns + +`void` + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:35](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L35) + +___ + +### created + +• **created**: (`agreement`: [`Agreement`](../classes/market_agreement_agreement.Agreement)) => `void` + +#### Type declaration + +▸ (`agreement`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | + +##### Returns + +`void` + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:36](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L36) + +___ + +### destroyed + +• **destroyed**: (`agreement`: [`Agreement`](../classes/market_agreement_agreement.Agreement)) => `void` + +#### Type declaration + +▸ (`agreement`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | + +##### Returns + +`void` + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L37) + +___ + +### error + +• **error**: (`error`: [`GolemMarketError`](../classes/market_error.GolemMarketError)) => `void` + +#### Type declaration + +▸ (`error`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`GolemMarketError`](../classes/market_error.GolemMarketError) | + +##### Returns + +`void` + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L38) diff --git a/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolOptions.md b/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolOptions.md new file mode 100644 index 000000000..574f406f3 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolOptions.md @@ -0,0 +1,58 @@ +--- +title: "Interface ResourceRentalPoolOptions" +pageTitle: "Interface ResourceRentalPoolOptions - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface ResourceRentalPoolOptions within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: ResourceRentalPoolOptions + +[resource-rental/resource-rental-pool](../modules/resource_rental_resource_rental_pool).ResourceRentalPoolOptions + +## Table of contents + +### Properties + +- [replicas](resource_rental_resource_rental_pool.ResourceRentalPoolOptions#replicas) +- [network](resource_rental_resource_rental_pool.ResourceRentalPoolOptions#network) +- [resourceRentalOptions](resource_rental_resource_rental_pool.ResourceRentalPoolOptions#resourcerentaloptions) +- [agreementOptions](resource_rental_resource_rental_pool.ResourceRentalPoolOptions#agreementoptions) + +## Properties + +### replicas + +• `Optional` **replicas**: [`Concurrency`](../modules/resource_rental_resource_rental_pool#concurrency) + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:25](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L25) + +___ + +### network + +• `Optional` **network**: [`Network`](../classes/network_network.Network) + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L26) + +___ + +### resourceRentalOptions + +• `Optional` **resourceRentalOptions**: [`ResourceRentalOptions`](resource_rental_resource_rental.ResourceRentalOptions) + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:27](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L27) + +___ + +### agreementOptions + +• `Optional` **agreementOptions**: [`AgreementOptions`](market_agreement_agreement.AgreementOptions) + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:28](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L28) diff --git a/src/pages/docs/golem-js/reference/interfaces/shared_storage_provider.StorageProvider.md b/src/pages/docs/golem-js/reference/interfaces/shared_storage_provider.StorageProvider.md new file mode 100644 index 000000000..8978f1e7f --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/shared_storage_provider.StorageProvider.md @@ -0,0 +1,186 @@ +--- +title: "Interface StorageProvider" +pageTitle: "Interface StorageProvider - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface StorageProvider within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: StorageProvider + +[shared/storage/provider](../modules/shared_storage_provider).StorageProvider + +## Implemented by + +- [`GftpStorageProvider`](../classes/shared_storage_gftp.GftpStorageProvider) +- [`NullStorageProvider`](../classes/shared_storage_null.NullStorageProvider) +- [`WebSocketBrowserStorageProvider`](../classes/shared_storage_ws_browser.WebSocketBrowserStorageProvider) + +## Table of contents + +### Methods + +- [init](shared_storage_provider.StorageProvider#init) +- [isReady](shared_storage_provider.StorageProvider#isready) +- [close](shared_storage_provider.StorageProvider#close) +- [receiveFile](shared_storage_provider.StorageProvider#receivefile) +- [receiveData](shared_storage_provider.StorageProvider#receivedata) +- [publishFile](shared_storage_provider.StorageProvider#publishfile) +- [publishData](shared_storage_provider.StorageProvider#publishdata) +- [release](shared_storage_provider.StorageProvider#release) + +## Methods + +### init + +▸ **init**(): `Promise`\<`void`\> + +Initialize storage provider. + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/shared/storage/provider.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/provider.ts#L7) + +___ + +### isReady + +▸ **isReady**(): `boolean` + +Tells if the storage provider is ready for use + +#### Returns + +`boolean` + +#### Defined in + +[src/shared/storage/provider.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/provider.ts#L12) + +___ + +### close + +▸ **close**(): `Promise`\<`void`\> + +Close storage provider and release all resources. + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/shared/storage/provider.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/provider.ts#L17) + +___ + +### receiveFile + +▸ **receiveFile**(`destPath`): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of a file to be downloaded. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `destPath` | `string` | + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[src/shared/storage/provider.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/provider.ts#L22) + +___ + +### receiveData + +▸ **receiveData**(`callback`): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of a file to be downloaded. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `callback` | [`StorageProviderDataCallback`](../modules/shared_storage_provider#storageproviderdatacallback) | + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[src/shared/storage/provider.ts:27](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/provider.ts#L27) + +___ + +### publishFile + +▸ **publishFile**(`srcPath`): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of a file to be uploaded. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `srcPath` | `string` | + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[src/shared/storage/provider.ts:33](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/provider.ts#L33) + +___ + +### publishData + +▸ **publishData**(`data`): `Promise`\<`string`\> + +Return allocated resource URL from Yagna of data to be uploaded. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `Uint8Array` | + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[src/shared/storage/provider.ts:39](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/provider.ts#L39) + +___ + +### release + +▸ **release**(`urls`): `Promise`\<`void`\> + +Release previously allocated resource URL from Yagna. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `urls` | `string`[] | + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/shared/storage/provider.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/provider.ts#L45) diff --git a/src/pages/docs/golem-js/reference/interfaces/storage_ws_browser.WebSocketStorageProviderOptions.md b/src/pages/docs/golem-js/reference/interfaces/shared_storage_ws_browser.WebSocketStorageProviderOptions.md similarity index 54% rename from src/pages/docs/golem-js/reference/interfaces/storage_ws_browser.WebSocketStorageProviderOptions.md rename to src/pages/docs/golem-js/reference/interfaces/shared_storage_ws_browser.WebSocketStorageProviderOptions.md index a3a61c255..9e31eb26d 100644 --- a/src/pages/docs/golem-js/reference/interfaces/storage_ws_browser.WebSocketStorageProviderOptions.md +++ b/src/pages/docs/golem-js/reference/interfaces/shared_storage_ws_browser.WebSocketStorageProviderOptions.md @@ -6,20 +6,20 @@ type: "JS API Reference" --- # Interface: WebSocketStorageProviderOptions -[storage/ws-browser](../modules/storage_ws_browser).WebSocketStorageProviderOptions +[shared/storage/ws-browser](../modules/shared_storage_ws_browser).WebSocketStorageProviderOptions ## Table of contents ### Properties -- [logger](storage_ws_browser.WebSocketStorageProviderOptions#logger) +- [logger](shared_storage_ws_browser.WebSocketStorageProviderOptions#logger) ## Properties ### logger -• `Optional` **logger**: [`Logger`](utils_logger_logger.Logger) +• `Optional` **logger**: [`Logger`](shared_utils_logger_logger.Logger) #### Defined in -[src/storage/ws-browser.ts:9](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/ws-browser.ts#L9) +[src/shared/storage/ws-browser.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/ws-browser.ts#L10) diff --git a/src/pages/docs/golem-js/reference/interfaces/shared_utils_logger_logger.Logger.md b/src/pages/docs/golem-js/reference/interfaces/shared_utils_logger_logger.Logger.md new file mode 100644 index 000000000..cf28235f2 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/shared_utils_logger_logger.Logger.md @@ -0,0 +1,187 @@ +--- +title: "Interface Logger" +pageTitle: "Interface Logger - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface Logger within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: Logger + +[shared/utils/logger/logger](../modules/shared_utils_logger_logger).Logger + +## Table of contents + +### Methods + +- [child](shared_utils_logger_logger.Logger#child) +- [debug](shared_utils_logger_logger.Logger#debug) +- [info](shared_utils_logger_logger.Logger#info) +- [warn](shared_utils_logger_logger.Logger#warn) +- [error](shared_utils_logger_logger.Logger#error) + +## Methods + +### child + +▸ **child**(`namespace`): [`Logger`](shared_utils_logger_logger.Logger) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `namespace` | `string` | + +#### Returns + +[`Logger`](shared_utils_logger_logger.Logger) + +#### Defined in + +[src/shared/utils/logger/logger.ts:2](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/logger/logger.ts#L2) + +___ + +### debug + +▸ **debug**(`msg`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `msg` | `string` | + +#### Returns + +`void` + +#### Defined in + +[src/shared/utils/logger/logger.ts:3](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/logger/logger.ts#L3) + +▸ **debug**(`msg`, `ctx`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `msg` | `string` | +| `ctx` | `unknown` | + +#### Returns + +`void` + +#### Defined in + +[src/shared/utils/logger/logger.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/logger/logger.ts#L4) + +___ + +### info + +▸ **info**(`msg`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `msg` | `string` | + +#### Returns + +`void` + +#### Defined in + +[src/shared/utils/logger/logger.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/logger/logger.ts#L5) + +▸ **info**(`msg`, `ctx`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `msg` | `string` | +| `ctx` | `unknown` | + +#### Returns + +`void` + +#### Defined in + +[src/shared/utils/logger/logger.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/logger/logger.ts#L6) + +___ + +### warn + +▸ **warn**(`msg`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `msg` | `string` | + +#### Returns + +`void` + +#### Defined in + +[src/shared/utils/logger/logger.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/logger/logger.ts#L7) + +▸ **warn**(`msg`, `ctx`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `msg` | `string` | +| `ctx` | `unknown` | + +#### Returns + +`void` + +#### Defined in + +[src/shared/utils/logger/logger.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/logger/logger.ts#L8) + +___ + +### error + +▸ **error**(`msg`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `msg` | `string` | + +#### Returns + +`void` + +#### Defined in + +[src/shared/utils/logger/logger.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/logger/logger.ts#L9) + +▸ **error**(`msg`, `ctx`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `msg` | `string` | +| `ctx` | `unknown` | + +#### Returns + +`void` + +#### Defined in + +[src/shared/utils/logger/logger.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/logger/logger.ts#L10) diff --git a/src/pages/docs/golem-js/reference/interfaces/shared_yagna_yagnaApi.YagnaExeScriptObserver.md b/src/pages/docs/golem-js/reference/interfaces/shared_yagna_yagnaApi.YagnaExeScriptObserver.md new file mode 100644 index 000000000..3f0376123 --- /dev/null +++ b/src/pages/docs/golem-js/reference/interfaces/shared_yagna_yagnaApi.YagnaExeScriptObserver.md @@ -0,0 +1,36 @@ +--- +title: "Interface YagnaExeScriptObserver" +pageTitle: "Interface YagnaExeScriptObserver - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Interface YagnaExeScriptObserver within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Interface: YagnaExeScriptObserver + +[shared/yagna/yagnaApi](../modules/shared_yagna_yagnaApi).YagnaExeScriptObserver + +## Table of contents + +### Methods + +- [observeBatchExecResults](shared_yagna_yagnaApi.YagnaExeScriptObserver#observebatchexecresults) + +## Methods + +### observeBatchExecResults + +▸ **observeBatchExecResults**(`activityId`, `batchId`): `Observable`\<[`StreamingBatchEvent`](activity_results.StreamingBatchEvent)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `activityId` | `string` | +| `batchId` | `string` | + +#### Returns + +`Observable`\<[`StreamingBatchEvent`](activity_results.StreamingBatchEvent)\> + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:35](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L35) diff --git a/src/pages/docs/golem-js/reference/interfaces/storage_provider.StorageProvider.md b/src/pages/docs/golem-js/reference/interfaces/storage_provider.StorageProvider.md deleted file mode 100644 index 0dc0a8b2b..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/storage_provider.StorageProvider.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: "Interface StorageProvider" -pageTitle: "Interface StorageProvider - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface StorageProvider within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: StorageProvider - -[storage/provider](../modules/storage_provider).StorageProvider - -## Implemented by - -- [`GftpStorageProvider`](../classes/storage_gftp.GftpStorageProvider) -- [`NullStorageProvider`](../classes/storage_null.NullStorageProvider) -- [`WebSocketBrowserStorageProvider`](../classes/storage_ws_browser.WebSocketBrowserStorageProvider) - -## Table of contents - -### Methods - -- [init](storage_provider.StorageProvider#init) -- [close](storage_provider.StorageProvider#close) -- [receiveFile](storage_provider.StorageProvider#receivefile) -- [receiveData](storage_provider.StorageProvider#receivedata) -- [publishFile](storage_provider.StorageProvider#publishfile) -- [publishData](storage_provider.StorageProvider#publishdata) -- [release](storage_provider.StorageProvider#release) - -## Methods - -### init - -▸ **init**(): `Promise`\<`void`\> - -Initialize storage provider. - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[src/storage/provider.ts:7](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/provider.ts#L7) - -___ - -### close - -▸ **close**(): `Promise`\<`void`\> - -Close storage provider and release all resources. - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[src/storage/provider.ts:12](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/provider.ts#L12) - -___ - -### receiveFile - -▸ **receiveFile**(`destPath`): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of a file to be downloaded. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `destPath` | `string` | - -#### Returns - -`Promise`\<`string`\> - -#### Defined in - -[src/storage/provider.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/provider.ts#L17) - -___ - -### receiveData - -▸ **receiveData**(`callback`): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of a file to be downloaded. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `callback` | [`StorageProviderDataCallback`](../modules/storage_provider#storageproviderdatacallback) | - -#### Returns - -`Promise`\<`string`\> - -#### Defined in - -[src/storage/provider.ts:22](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/provider.ts#L22) - -___ - -### publishFile - -▸ **publishFile**(`srcPath`): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of a file to be uploaded. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `srcPath` | `string` | - -#### Returns - -`Promise`\<`string`\> - -#### Defined in - -[src/storage/provider.ts:28](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/provider.ts#L28) - -___ - -### publishData - -▸ **publishData**(`data`): `Promise`\<`string`\> - -Return allocated resource URL from Yagna of data to be uploaded. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Uint8Array` | - -#### Returns - -`Promise`\<`string`\> - -#### Defined in - -[src/storage/provider.ts:34](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/provider.ts#L34) - -___ - -### release - -▸ **release**(`urls`): `Promise`\<`void`\> - -Release previously allocated resource URL from Yagna. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `urls` | `string`[] | - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[src/storage/provider.ts:40](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/provider.ts#L40) diff --git a/src/pages/docs/golem-js/reference/interfaces/task_service.TaskServiceOptions.md b/src/pages/docs/golem-js/reference/interfaces/task_service.TaskServiceOptions.md deleted file mode 100644 index 5c6f6f597..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/task_service.TaskServiceOptions.md +++ /dev/null @@ -1,173 +0,0 @@ ---- -title: "Interface TaskServiceOptions" -pageTitle: "Interface TaskServiceOptions - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface TaskServiceOptions within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: TaskServiceOptions - -[task/service](../modules/task_service).TaskServiceOptions - -## Hierarchy - -- [`ActivityOptions`](activity_activity.ActivityOptions) - - ↳ **`TaskServiceOptions`** - -## Table of contents - -### Properties - -- [maxParallelTasks](task_service.TaskServiceOptions#maxparalleltasks) -- [taskRunningInterval](task_service.TaskServiceOptions#taskrunninginterval) -- [activityStateCheckingInterval](task_service.TaskServiceOptions#activitystatecheckinginterval) -- [activityPreparingTimeout](task_service.TaskServiceOptions#activitypreparingtimeout) -- [taskTimeout](task_service.TaskServiceOptions#tasktimeout) -- [logger](task_service.TaskServiceOptions#logger) -- [storageProvider](task_service.TaskServiceOptions#storageprovider) -- [activityRequestTimeout](task_service.TaskServiceOptions#activityrequesttimeout) -- [activityExecuteTimeout](task_service.TaskServiceOptions#activityexecutetimeout) -- [activityExeBatchResultPollIntervalSeconds](task_service.TaskServiceOptions#activityexebatchresultpollintervalseconds) -- [eventTarget](task_service.TaskServiceOptions#eventtarget) - -## Properties - -### maxParallelTasks - -• `Optional` **maxParallelTasks**: `number` - -Number of maximum parallel running task on one TaskExecutor instance - -#### Defined in - -[src/task/service.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/service.ts#L15) - -___ - -### taskRunningInterval - -• `Optional` **taskRunningInterval**: `number` - -#### Defined in - -[src/task/service.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/service.ts#L16) - -___ - -### activityStateCheckingInterval - -• `Optional` **activityStateCheckingInterval**: `number` - -#### Defined in - -[src/task/service.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/service.ts#L17) - -___ - -### activityPreparingTimeout - -• `Optional` **activityPreparingTimeout**: `number` - -#### Defined in - -[src/task/service.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/service.ts#L18) - -___ - -### taskTimeout - -• `Optional` **taskTimeout**: `number` - -#### Defined in - -[src/task/service.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/service.ts#L19) - -___ - -### logger - -• `Optional` **logger**: [`Logger`](utils_logger_logger.Logger) - -Logger module - -#### Overrides - -[ActivityOptions](activity_activity.ActivityOptions).[logger](activity_activity.ActivityOptions#logger) - -#### Defined in - -[src/task/service.ts:20](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/service.ts#L20) - -___ - -### storageProvider - -• `Optional` **storageProvider**: [`StorageProvider`](storage_provider.StorageProvider) - -#### Defined in - -[src/task/service.ts:21](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/service.ts#L21) - -___ - -### activityRequestTimeout - -• `Optional` **activityRequestTimeout**: `number` - -timeout for sending and creating batch - -#### Inherited from - -[ActivityOptions](activity_activity.ActivityOptions).[activityRequestTimeout](activity_activity.ActivityOptions#activityrequesttimeout) - -#### Defined in - -[src/activity/activity.ts:28](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L28) - -___ - -### activityExecuteTimeout - -• `Optional` **activityExecuteTimeout**: `number` - -timeout for executing batch - -#### Inherited from - -[ActivityOptions](activity_activity.ActivityOptions).[activityExecuteTimeout](activity_activity.ActivityOptions#activityexecutetimeout) - -#### Defined in - -[src/activity/activity.ts:30](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L30) - -___ - -### activityExeBatchResultPollIntervalSeconds - -• `Optional` **activityExeBatchResultPollIntervalSeconds**: `number` - -interval for fetching batch results while polling - -#### Inherited from - -[ActivityOptions](activity_activity.ActivityOptions).[activityExeBatchResultPollIntervalSeconds](activity_activity.ActivityOptions#activityexebatchresultpollintervalseconds) - -#### Defined in - -[src/activity/activity.ts:32](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L32) - -___ - -### eventTarget - -• `Optional` **eventTarget**: `EventTarget` - -Event Bus implements EventTarget - -#### Inherited from - -[ActivityOptions](activity_activity.ActivityOptions).[eventTarget](activity_activity.ActivityOptions#eventtarget) - -#### Defined in - -[src/activity/activity.ts:36](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L36) diff --git a/src/pages/docs/golem-js/reference/interfaces/task_work.CommandOptions.md b/src/pages/docs/golem-js/reference/interfaces/task_work.CommandOptions.md deleted file mode 100644 index 61fc71959..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/task_work.CommandOptions.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "Interface CommandOptions" -pageTitle: "Interface CommandOptions - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface CommandOptions within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: CommandOptions - -[task/work](../modules/task_work).CommandOptions - -## Table of contents - -### Properties - -- [timeout](task_work.CommandOptions#timeout) -- [env](task_work.CommandOptions#env) -- [capture](task_work.CommandOptions#capture) - -## Properties - -### timeout - -• `Optional` **timeout**: `number` - -#### Defined in - -[src/task/work.ts:41](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L41) - -___ - -### env - -• `Optional` **env**: `object` - -#### Defined in - -[src/task/work.ts:42](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L42) - -___ - -### capture - -• `Optional` **capture**: [`Capture`](../modules/script_command#capture) - -#### Defined in - -[src/task/work.ts:43](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L43) diff --git a/src/pages/docs/golem-js/reference/interfaces/task_work.WorkOptions.md b/src/pages/docs/golem-js/reference/interfaces/task_work.WorkOptions.md deleted file mode 100644 index 2a09a2835..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/task_work.WorkOptions.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: "Interface WorkOptions" -pageTitle: "Interface WorkOptions - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface WorkOptions within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: WorkOptions - -[task/work](../modules/task_work).WorkOptions - -## Table of contents - -### Properties - -- [activityPreparingTimeout](task_work.WorkOptions#activitypreparingtimeout) -- [activityStateCheckingInterval](task_work.WorkOptions#activitystatecheckinginterval) -- [storageProvider](task_work.WorkOptions#storageprovider) -- [networkNode](task_work.WorkOptions#networknode) -- [logger](task_work.WorkOptions#logger) -- [activityReadySetupFunctions](task_work.WorkOptions#activityreadysetupfunctions) - -## Properties - -### activityPreparingTimeout - -• `Optional` **activityPreparingTimeout**: `number` - -#### Defined in - -[src/task/work.ts:32](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L32) - -___ - -### activityStateCheckingInterval - -• `Optional` **activityStateCheckingInterval**: `number` - -#### Defined in - -[src/task/work.ts:33](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L33) - -___ - -### storageProvider - -• `Optional` **storageProvider**: [`StorageProvider`](storage_provider.StorageProvider) - -#### Defined in - -[src/task/work.ts:34](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L34) - -___ - -### networkNode - -• `Optional` **networkNode**: [`NetworkNode`](../classes/network_node.NetworkNode) - -#### Defined in - -[src/task/work.ts:35](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L35) - -___ - -### logger - -• `Optional` **logger**: [`Logger`](utils_logger_logger.Logger) - -#### Defined in - -[src/task/work.ts:36](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L36) - -___ - -### activityReadySetupFunctions - -• `Optional` **activityReadySetupFunctions**: [`Worker`](../modules/task_work#worker)\<`unknown`\>[] - -#### Defined in - -[src/task/work.ts:37](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L37) diff --git a/src/pages/docs/golem-js/reference/interfaces/utils_logger_logger.Logger.md b/src/pages/docs/golem-js/reference/interfaces/utils_logger_logger.Logger.md deleted file mode 100644 index baab24111..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/utils_logger_logger.Logger.md +++ /dev/null @@ -1,187 +0,0 @@ ---- -title: "Interface Logger" -pageTitle: "Interface Logger - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface Logger within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: Logger - -[utils/logger/logger](../modules/utils_logger_logger).Logger - -## Table of contents - -### Methods - -- [child](utils_logger_logger.Logger#child) -- [debug](utils_logger_logger.Logger#debug) -- [info](utils_logger_logger.Logger#info) -- [warn](utils_logger_logger.Logger#warn) -- [error](utils_logger_logger.Logger#error) - -## Methods - -### child - -▸ **child**(`namespace`): [`Logger`](utils_logger_logger.Logger) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `namespace` | `string` | - -#### Returns - -[`Logger`](utils_logger_logger.Logger) - -#### Defined in - -[src/utils/logger/logger.ts:2](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/logger/logger.ts#L2) - -___ - -### debug - -▸ **debug**(`msg`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `msg` | `string` | - -#### Returns - -`void` - -#### Defined in - -[src/utils/logger/logger.ts:3](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/logger/logger.ts#L3) - -▸ **debug**(`msg`, `ctx`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `msg` | `string` | -| `ctx` | `Error` \| `Record`\<`string`, `unknown`\> | - -#### Returns - -`void` - -#### Defined in - -[src/utils/logger/logger.ts:4](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/logger/logger.ts#L4) - -___ - -### info - -▸ **info**(`msg`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `msg` | `string` | - -#### Returns - -`void` - -#### Defined in - -[src/utils/logger/logger.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/logger/logger.ts#L5) - -▸ **info**(`msg`, `ctx`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `msg` | `string` | -| `ctx` | `Error` \| `Record`\<`string`, `unknown`\> | - -#### Returns - -`void` - -#### Defined in - -[src/utils/logger/logger.ts:6](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/logger/logger.ts#L6) - -___ - -### warn - -▸ **warn**(`msg`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `msg` | `string` | - -#### Returns - -`void` - -#### Defined in - -[src/utils/logger/logger.ts:7](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/logger/logger.ts#L7) - -▸ **warn**(`msg`, `ctx`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `msg` | `string` | -| `ctx` | `Error` \| `Record`\<`string`, `unknown`\> | - -#### Returns - -`void` - -#### Defined in - -[src/utils/logger/logger.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/logger/logger.ts#L8) - -___ - -### error - -▸ **error**(`msg`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `msg` | `string` | - -#### Returns - -`void` - -#### Defined in - -[src/utils/logger/logger.ts:9](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/logger/logger.ts#L9) - -▸ **error**(`msg`, `ctx`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `msg` | `string` | -| `ctx` | `Error` \| `Record`\<`string`, `unknown`\> | - -#### Returns - -`void` - -#### Defined in - -[src/utils/logger/logger.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/logger/logger.ts#L10) diff --git a/src/pages/docs/golem-js/reference/interfaces/utils_yagna_identity.IdentityModel.md b/src/pages/docs/golem-js/reference/interfaces/utils_yagna_identity.IdentityModel.md deleted file mode 100644 index d3ed10868..000000000 --- a/src/pages/docs/golem-js/reference/interfaces/utils_yagna_identity.IdentityModel.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "Interface IdentityModel" -pageTitle: "Interface IdentityModel - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Interface IdentityModel within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Interface: IdentityModel - -[utils/yagna/identity](../modules/utils_yagna_identity).IdentityModel - -## Table of contents - -### Properties - -- [identity](utils_yagna_identity.IdentityModel#identity) -- [name](utils_yagna_identity.IdentityModel#name) -- [role](utils_yagna_identity.IdentityModel#role) - -## Properties - -### identity - -• **identity**: `string` - -#### Defined in - -[src/utils/yagna/identity.ts:7](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/identity.ts#L7) - -___ - -### name - -• **name**: `string` - -#### Defined in - -[src/utils/yagna/identity.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/identity.ts#L8) - -___ - -### role - -• **role**: `string` - -#### Defined in - -[src/utils/yagna/identity.ts:9](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/identity.ts#L9) diff --git a/src/pages/docs/golem-js/reference/modules.md b/src/pages/docs/golem-js/reference/modules.md index 63c95f938..6a5c1d6d6 100644 --- a/src/pages/docs/golem-js/reference/modules.md +++ b/src/pages/docs/golem-js/reference/modules.md @@ -1,68 +1,111 @@ --- -title: "Project JavaScript API reference" -pageTitle: "Project JavaScript API reference - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Project JavaScript API reference within the golem-js SDK for the Golem Network." +title: "Project Golem-JS API reference" +pageTitle: "Project Golem-JS API reference - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Project Golem-JS API reference within the golem-js SDK for the Golem Network." type: "JS API Reference" --- -# JavaScript API reference +# Golem-JS API reference ## Table of contents ### Modules +- [activity/activity.module](modules/activity_activity_module) - [activity/activity](modules/activity_activity) +- [activity/api](modules/activity_api) +- [activity/exe-script-executor](modules/activity_exe_script_executor) +- [activity/exe-unit/batch](modules/activity_exe_unit_batch) +- [activity/exe-unit/error](modules/activity_exe_unit_error) +- [activity/exe-unit/exe-unit](modules/activity_exe_unit_exe_unit) +- [activity/exe-unit/process](modules/activity_exe_unit_process) - [activity/results](modules/activity_results) -- [agreement/agreement](modules/agreement_agreement) -- [agreement/service](modules/agreement_service) -- [agreement/strategy](modules/agreement_strategy) -- [error/golem-error](modules/error_golem_error) -- [events/events](modules/events_events) -- [executor/events](modules/executor_events) -- [executor/executor](modules/executor_executor) -- [golem\_network/golem\_network](modules/golem_network_golem_network) -- [job/job](modules/job_job) -- [market/builder](modules/market_builder) -- [market/demand](modules/market_demand) +- [activity/script/command](modules/activity_script_command) +- [activity/script/script](modules/activity_script_script) +- [experimental/deployment/builder](modules/experimental_deployment_builder) +- [experimental/deployment/deployment](modules/experimental_deployment_deployment) +- [experimental/deployment/validate-deployment](modules/experimental_deployment_validate_deployment) +- [experimental/job/job](modules/experimental_job_job) +- [experimental/job/job\_manager](modules/experimental_job_job_manager) +- [experimental/reputation/error](modules/experimental_reputation_error) +- [experimental/reputation/system](modules/experimental_reputation_system) +- [experimental/reputation/types](modules/experimental_reputation_types) +- [golem-network/golem-network](modules/golem_network_golem_network) +- [market/agreement/agreement-event](modules/market_agreement_agreement_event) +- [market/agreement/agreement](modules/market_agreement_agreement) +- [market/api](modules/market_api) +- [market/demand/demand-body-builder](modules/market_demand_demand_body_builder) +- [market/demand/demand](modules/market_demand_demand) +- [market/demand/directors/base-config](modules/market_demand_directors_base_config) +- [market/demand/directors/basic-demand-director-config](modules/market_demand_directors_basic_demand_director_config) +- [market/demand/directors/basic-demand-director](modules/market_demand_directors_basic_demand_director) +- [market/demand/directors/payment-demand-director-config](modules/market_demand_directors_payment_demand_director_config) +- [market/demand/directors/payment-demand-director](modules/market_demand_directors_payment_demand_director) +- [market/demand/directors/workload-demand-director-config](modules/market_demand_directors_workload_demand_director_config) +- [market/demand/directors/workload-demand-director](modules/market_demand_directors_workload_demand_director) +- [market/demand/options](modules/market_demand_options) +- [market/draft-offer-proposal-pool](modules/market_draft_offer_proposal_pool) - [market/error](modules/market_error) - [market/helpers](modules/market_helpers) -- [market/proposal](modules/market_proposal) -- [market/proposals\_batch](modules/market_proposals_batch) -- [market/service](modules/market_service) +- [market/market.module](modules/market_market_module) +- [market/proposal/market-proposal-event](modules/market_proposal_market_proposal_event) +- [market/proposal/market-proposal](modules/market_proposal_market_proposal) +- [market/proposal/offer-counter-proposal](modules/market_proposal_offer_counter_proposal) +- [market/proposal/offer-proposal](modules/market_proposal_offer_proposal) +- [market/proposal/proposal-properties](modules/market_proposal_proposal_properties) +- [market/proposal/proposals\_batch](modules/market_proposal_proposals_batch) - [market/strategy](modules/market_strategy) +- [network/api](modules/network_api) - [network/error](modules/network_error) +- [network/network.module](modules/network_network_module) - [network/network](modules/network_network) - [network/node](modules/network_node) -- [network/service](modules/network_service) -- [package/package](modules/package_package) +- [network/tcpProxy](modules/network_tcpProxy) +- [payment/BaseDocument](modules/payment_BaseDocument) - [payment/InvoiceProcessor](modules/payment_InvoiceProcessor) +- [payment/PayerDetails](modules/payment_PayerDetails) - [payment/agreement\_payment\_process](modules/payment_agreement_payment_process) +- [payment/allocation](modules/payment_allocation) +- [payment/api](modules/payment_api) - [payment/config](modules/payment_config) - [payment/debit\_note](modules/payment_debit_note) - [payment/error](modules/payment_error) - [payment/invoice](modules/payment_invoice) -- [payment/payments](modules/payment_payments) +- [payment/payment.module](modules/payment_payment_module) +- [payment/rejection](modules/payment_rejection) - [payment/service](modules/payment_service) - [payment/strategy](modules/payment_strategy) -- [script/command](modules/script_command) -- [storage/gftp](modules/storage_gftp) -- [storage/null](modules/storage_null) -- [storage/provider](modules/storage_provider) -- [storage/ws-browser](modules/storage_ws_browser) -- [task/batch](modules/task_batch) -- [task/error](modules/task_error) -- [task/process](modules/task_process) -- [task/service](modules/task_service) -- [task/task](modules/task_task) -- [task/work](modules/task_work) -- [utils/env](modules/utils_env) -- [utils/logger/defaultLogger](modules/utils_logger_defaultLogger) -- [utils/logger/jsonLogger](modules/utils_logger_jsonLogger) -- [utils/logger/logger](modules/utils_logger_logger) -- [utils/logger/nullLogger](modules/utils_logger_nullLogger) -- [utils/logger/pinoLogger](modules/utils_logger_pinoLogger) -- [utils/runtimeContextChecker](modules/utils_runtimeContextChecker) -- [utils/types](modules/utils_types) -- [utils/yagna/activity](modules/utils_yagna_activity) -- [utils/yagna/gsb](modules/utils_yagna_gsb) -- [utils/yagna/identity](modules/utils_yagna_identity) -- [utils/yagna/yagna](modules/utils_yagna_yagna) +- [resource-rental/rental.module](modules/resource_rental_rental_module) +- [resource-rental/resource-rental-pool](modules/resource_rental_resource_rental_pool) +- [resource-rental/resource-rental](modules/resource_rental_resource_rental) +- [shared/cache/CacheService](modules/shared_cache_CacheService) +- [shared/error/golem-error](modules/shared_error_golem_error) +- [shared/storage/GftpServerAdapter](modules/shared_storage_GftpServerAdapter) +- [shared/storage/default](modules/shared_storage_default) +- [shared/storage/gftp](modules/shared_storage_gftp) +- [shared/storage/null](modules/shared_storage_null) +- [shared/storage/provider](modules/shared_storage_provider) +- [shared/storage/ws-browser](modules/shared_storage_ws_browser) +- [shared/types](modules/shared_types) +- [shared/utils/abortSignal](modules/shared_utils_abortSignal) +- [shared/utils/apiErrorMessage](modules/shared_utils_apiErrorMessage) +- [shared/utils/env](modules/shared_utils_env) +- [shared/utils/eventLoop](modules/shared_utils_eventLoop) +- [shared/utils/logger/defaultLogger](modules/shared_utils_logger_defaultLogger) +- [shared/utils/logger/logger](modules/shared_utils_logger_logger) +- [shared/utils/logger/nullLogger](modules/shared_utils_logger_nullLogger) +- [shared/utils/runtimeContextChecker](modules/shared_utils_runtimeContextChecker) +- [shared/utils/timeout](modules/shared_utils_timeout) +- [shared/utils/types](modules/shared_utils_types) +- [shared/utils/wait](modules/shared_utils_wait) +- [shared/yagna/adapters/activity-api-adapter](modules/shared_yagna_adapters_activity_api_adapter) +- [shared/yagna/adapters/market-api-adapter](modules/shared_yagna_adapters_market_api_adapter) +- [shared/yagna/adapters/network-api-adapter](modules/shared_yagna_adapters_network_api_adapter) +- [shared/yagna/adapters/payment-api-adapter](modules/shared_yagna_adapters_payment_api_adapter) +- [shared/yagna/event-reader](modules/shared_yagna_event_reader) +- [shared/yagna/repository/activity-repository](modules/shared_yagna_repository_activity_repository) +- [shared/yagna/repository/agreement-repository](modules/shared_yagna_repository_agreement_repository) +- [shared/yagna/repository/debit-note-repository](modules/shared_yagna_repository_debit_note_repository) +- [shared/yagna/repository/demand-repository](modules/shared_yagna_repository_demand_repository) +- [shared/yagna/repository/invoice-repository](modules/shared_yagna_repository_invoice_repository) +- [shared/yagna/repository/proposal-repository](modules/shared_yagna_repository_proposal_repository) +- [shared/yagna/yagnaApi](modules/shared_yagna_yagnaApi) diff --git a/src/pages/docs/golem-js/reference/modules/activity_activity.md b/src/pages/docs/golem-js/reference/modules/activity_activity.md index 06d1ade60..227483cdc 100644 --- a/src/pages/docs/golem-js/reference/modules/activity_activity.md +++ b/src/pages/docs/golem-js/reference/modules/activity_activity.md @@ -18,5 +18,25 @@ type: "JS API Reference" ### Interfaces -- [ExeScriptRequest](../interfaces/activity_activity.ExeScriptRequest) -- [ActivityOptions](../interfaces/activity_activity.ActivityOptions) +- [IActivityRepository](../interfaces/activity_activity.IActivityRepository) + +### Type Aliases + +- [ActivityUsageInfo](activity_activity#activityusageinfo) + +## Type Aliases + +### ActivityUsageInfo + +Ƭ **ActivityUsageInfo**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `currentUsage?` | `number`[] | +| `timestamp` | `number` | + +#### Defined in + +[src/activity/activity.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.ts#L14) diff --git a/src/pages/docs/golem-js/reference/modules/activity_activity_module.md b/src/pages/docs/golem-js/reference/modules/activity_activity_module.md new file mode 100644 index 000000000..531ba2f6b --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/activity_activity_module.md @@ -0,0 +1,42 @@ +--- +title: "Module activity/activity.module" +pageTitle: "Module activity/activity.module - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module activity/activity.module within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: activity/activity.module + +## Table of contents + +### Classes + +- [ActivityModuleImpl](../classes/activity_activity_module.ActivityModuleImpl) + +### Interfaces + +- [ActivityModule](../interfaces/activity_activity_module.ActivityModule) +- [IFileServer](../interfaces/activity_activity_module.IFileServer) +- [ActivityModuleOptions](../interfaces/activity_activity_module.ActivityModuleOptions) + +### Type Aliases + +- [FileServerEntry](activity_activity_module#fileserverentry) + +## Type Aliases + +### FileServerEntry + +Ƭ **FileServerEntry**: `Object` + +Information about a file that has been published via the FileServer + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `fileUrl` | `string` | The URL of the file, that the clients can use to reach and download the file | +| `fileHash` | `string` | The checksum that can be used by clients to validate integrity of the downloaded file | + +#### Defined in + +[src/activity/activity.module.ts:75](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/activity.module.ts#L75) diff --git a/src/pages/docs/golem-js/reference/modules/activity_api.md b/src/pages/docs/golem-js/reference/modules/activity_api.md new file mode 100644 index 000000000..07af95fde --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/activity_api.md @@ -0,0 +1,47 @@ +--- +title: "Module activity/api" +pageTitle: "Module activity/api - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module activity/api within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: activity/api + +## Table of contents + +### Interfaces + +- [IActivityApi](../interfaces/activity_api.IActivityApi) + +### Type Aliases + +- [ActivityEvents](activity_api#activityevents) + +## Type Aliases + +### ActivityEvents + +Ƭ **ActivityEvents**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `activityCreated` | (`activity`: [`Activity`](../classes/activity_activity.Activity)) => `void` | +| `errorCreatingActivity` | (`error`: `Error`) => `void` | +| `activityDestroyed` | (`activity`: [`Activity`](../classes/activity_activity.Activity)) => `void` | +| `errorDestroyingActivity` | (`activity`: [`Activity`](../classes/activity_activity.Activity), `error`: `Error`) => `void` | +| `exeUnitInitialized` | (`activity`: [`Activity`](../classes/activity_activity.Activity)) => `void` | +| `errorInitializingExeUnit` | (`activity`: [`Activity`](../classes/activity_activity.Activity), `error`: `Error`) => `void` | +| `activityStateChanged` | (`activity`: [`Activity`](../classes/activity_activity.Activity), `previousState`: [`ActivityStateEnum`](../enums/activity_activity.ActivityStateEnum)) => `void` | +| `errorRefreshingActivity` | (`activity`: [`Activity`](../classes/activity_activity.Activity), `error`: `Error`) => `void` | +| `scriptSent` | (`activity`: [`Activity`](../classes/activity_activity.Activity), `script`: [`ExeScriptRequest`](../interfaces/activity_exe_script_executor.ExeScriptRequest)) => `void` | +| `scriptExecuted` | (`activity`: [`Activity`](../classes/activity_activity.Activity), `script`: [`ExeScriptRequest`](../interfaces/activity_exe_script_executor.ExeScriptRequest), `result`: `string`) => `void` | +| `errorExecutingScript` | (`activity`: [`Activity`](../classes/activity_activity.Activity), `script`: [`ExeScriptRequest`](../interfaces/activity_exe_script_executor.ExeScriptRequest), `error`: `Error`) => `void` | +| `batchResultsReceived` | (`activity`: [`Activity`](../classes/activity_activity.Activity), `batchId`: `string`, `results`: [`Result`](../classes/activity_results.Result)[]) => `void` | +| `errorGettingBatchResults` | (`activity`: [`Activity`](../classes/activity_activity.Activity), `batchId`: `string`, `error`: `Error`) => `void` | +| `batchEventsReceived` | (`activity`: [`Activity`](../classes/activity_activity.Activity), `batchId`: `string`, `event`: [`StreamingBatchEvent`](../interfaces/activity_results.StreamingBatchEvent)) => `void` | +| `errorGettingBatchEvents` | (`activity`: [`Activity`](../classes/activity_activity.Activity), `batchId`: `string`, `error`: `Error`) => `void` | + +#### Defined in + +[src/activity/api.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/api.ts#L7) diff --git a/src/pages/docs/golem-js/reference/modules/activity_exe_script_executor.md b/src/pages/docs/golem-js/reference/modules/activity_exe_script_executor.md new file mode 100644 index 000000000..6f2cbc3e3 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/activity_exe_script_executor.md @@ -0,0 +1,18 @@ +--- +title: "Module activity/exe-script-executor" +pageTitle: "Module activity/exe-script-executor - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module activity/exe-script-executor within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: activity/exe-script-executor + +## Table of contents + +### Classes + +- [ExeScriptExecutor](../classes/activity_exe_script_executor.ExeScriptExecutor) + +### Interfaces + +- [ExeScriptRequest](../interfaces/activity_exe_script_executor.ExeScriptRequest) +- [ExecutionOptions](../interfaces/activity_exe_script_executor.ExecutionOptions) diff --git a/src/pages/docs/golem-js/reference/modules/activity_exe_unit_batch.md b/src/pages/docs/golem-js/reference/modules/activity_exe_unit_batch.md new file mode 100644 index 000000000..6022ffb9b --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/activity_exe_unit_batch.md @@ -0,0 +1,13 @@ +--- +title: "Module activity/exe-unit/batch" +pageTitle: "Module activity/exe-unit/batch - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module activity/exe-unit/batch within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: activity/exe-unit/batch + +## Table of contents + +### Classes + +- [Batch](../classes/activity_exe_unit_batch.Batch) diff --git a/src/pages/docs/golem-js/reference/modules/activity_exe_unit_error.md b/src/pages/docs/golem-js/reference/modules/activity_exe_unit_error.md new file mode 100644 index 000000000..9bc23eb5c --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/activity_exe_unit_error.md @@ -0,0 +1,17 @@ +--- +title: "Module activity/exe-unit/error" +pageTitle: "Module activity/exe-unit/error - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module activity/exe-unit/error within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: activity/exe-unit/error + +## Table of contents + +### Enumerations + +- [WorkErrorCode](../enums/activity_exe_unit_error.WorkErrorCode) + +### Classes + +- [GolemWorkError](../classes/activity_exe_unit_error.GolemWorkError) diff --git a/src/pages/docs/golem-js/reference/modules/activity_exe_unit_exe_unit.md b/src/pages/docs/golem-js/reference/modules/activity_exe_unit_exe_unit.md new file mode 100644 index 000000000..2eb8720dd --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/activity_exe_unit_exe_unit.md @@ -0,0 +1,47 @@ +--- +title: "Module activity/exe-unit/exe-unit" +pageTitle: "Module activity/exe-unit/exe-unit - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module activity/exe-unit/exe-unit within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: activity/exe-unit/exe-unit + +## Table of contents + +### Classes + +- [ExeUnit](../classes/activity_exe_unit_exe_unit.ExeUnit) + +### Interfaces + +- [ExeUnitOptions](../interfaces/activity_exe_unit_exe_unit.ExeUnitOptions) +- [CommandOptions](../interfaces/activity_exe_unit_exe_unit.CommandOptions) +- [ActivityDTO](../interfaces/activity_exe_unit_exe_unit.ActivityDTO) + +### Type Aliases + +- [LifecycleFunction](activity_exe_unit_exe_unit#lifecyclefunction) + +## Type Aliases + +### LifecycleFunction + +Ƭ **LifecycleFunction**: (`exe`: [`ExeUnit`](../classes/activity_exe_unit_exe_unit.ExeUnit)) => `Promise`\<`void`\> + +#### Type declaration + +▸ (`exe`): `Promise`\<`void`\> + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `exe` | [`ExeUnit`](../classes/activity_exe_unit_exe_unit.ExeUnit) | + +##### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/activity/exe-unit/exe-unit.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/exe-unit/exe-unit.ts#L26) diff --git a/src/pages/docs/golem-js/reference/modules/activity_exe_unit_process.md b/src/pages/docs/golem-js/reference/modules/activity_exe_unit_process.md new file mode 100644 index 000000000..0ea6259cc --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/activity_exe_unit_process.md @@ -0,0 +1,13 @@ +--- +title: "Module activity/exe-unit/process" +pageTitle: "Module activity/exe-unit/process - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module activity/exe-unit/process within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: activity/exe-unit/process + +## Table of contents + +### Classes + +- [RemoteProcess](../classes/activity_exe_unit_process.RemoteProcess) diff --git a/src/pages/docs/golem-js/reference/modules/activity_results.md b/src/pages/docs/golem-js/reference/modules/activity_results.md index 271455785..936a7ae20 100644 --- a/src/pages/docs/golem-js/reference/modules/activity_results.md +++ b/src/pages/docs/golem-js/reference/modules/activity_results.md @@ -17,3 +17,5 @@ type: "JS API Reference" - [ResultData](../interfaces/activity_results.ResultData) - [StreamingBatchEvent](../interfaces/activity_results.StreamingBatchEvent) - [RuntimeEventKind](../interfaces/activity_results.RuntimeEventKind) +- [RuntimeEventStarted](../interfaces/activity_results.RuntimeEventStarted) +- [RuntimeEventFinished](../interfaces/activity_results.RuntimeEventFinished) diff --git a/src/pages/docs/golem-js/reference/modules/activity_script_command.md b/src/pages/docs/golem-js/reference/modules/activity_script_command.md new file mode 100644 index 000000000..67d80546c --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/activity_script_command.md @@ -0,0 +1,76 @@ +--- +title: "Module activity/script/command" +pageTitle: "Module activity/script/command - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module activity/script/command within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: activity/script/command + +## Table of contents + +### Classes + +- [Command](../classes/activity_script_command.Command) +- [Deploy](../classes/activity_script_command.Deploy) +- [Start](../classes/activity_script_command.Start) +- [Run](../classes/activity_script_command.Run) +- [Terminate](../classes/activity_script_command.Terminate) +- [Transfer](../classes/activity_script_command.Transfer) +- [UploadFile](../classes/activity_script_command.UploadFile) +- [UploadData](../classes/activity_script_command.UploadData) +- [DownloadFile](../classes/activity_script_command.DownloadFile) +- [DownloadData](../classes/activity_script_command.DownloadData) + +### Type Aliases + +- [Capture](activity_script_command#capture) +- [CaptureMode](activity_script_command#capturemode) +- [CapturePart](activity_script_command#capturepart) +- [CaptureFormat](activity_script_command#captureformat) + +## Type Aliases + +### Capture + +Ƭ **Capture**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `stdout?` | [`CaptureMode`](activity_script_command#capturemode) | +| `stderr?` | [`CaptureMode`](activity_script_command#capturemode) | + +#### Defined in + +[src/activity/script/command.ts:74](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L74) + +___ + +### CaptureMode + +Ƭ **CaptureMode**: \{ `atEnd`: \{ `part?`: [`CapturePart`](activity_script_command#capturepart) ; `format?`: [`CaptureFormat`](activity_script_command#captureformat) } } \| \{ `stream`: \{ `limit?`: `number` ; `format?`: [`CaptureFormat`](activity_script_command#captureformat) } } + +#### Defined in + +[src/activity/script/command.ts:79](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L79) + +___ + +### CapturePart + +Ƭ **CapturePart**: \{ `head`: `number` } \| \{ `tail`: `number` } \| \{ `headTail`: `number` } + +#### Defined in + +[src/activity/script/command.ts:83](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L83) + +___ + +### CaptureFormat + +Ƭ **CaptureFormat**: ``"string"`` \| ``"binary"`` + +#### Defined in + +[src/activity/script/command.ts:85](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/activity/script/command.ts#L85) diff --git a/src/pages/docs/golem-js/reference/modules/activity_script_script.md b/src/pages/docs/golem-js/reference/modules/activity_script_script.md new file mode 100644 index 000000000..d7ff9eb07 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/activity_script_script.md @@ -0,0 +1,13 @@ +--- +title: "Module activity/script/script" +pageTitle: "Module activity/script/script - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module activity/script/script within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: activity/script/script + +## Table of contents + +### Classes + +- [Script](../classes/activity_script_script.Script) diff --git a/src/pages/docs/golem-js/reference/modules/agreement_agreement.md b/src/pages/docs/golem-js/reference/modules/agreement_agreement.md deleted file mode 100644 index e925f0664..000000000 --- a/src/pages/docs/golem-js/reference/modules/agreement_agreement.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Module agreement/agreement" -pageTitle: "Module agreement/agreement - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module agreement/agreement within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: agreement/agreement - -## Table of contents - -### Interfaces - -- [ProviderInfo](../interfaces/agreement_agreement.ProviderInfo) diff --git a/src/pages/docs/golem-js/reference/modules/agreement_service.md b/src/pages/docs/golem-js/reference/modules/agreement_service.md deleted file mode 100644 index 0b4d8227f..000000000 --- a/src/pages/docs/golem-js/reference/modules/agreement_service.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "Module agreement/service" -pageTitle: "Module agreement/service - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module agreement/service within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: agreement/service - -## Table of contents - -### Classes - -- [AgreementCandidate](../classes/agreement_service.AgreementCandidate) - -### Interfaces - -- [AgreementDTO](../interfaces/agreement_service.AgreementDTO) -- [AgreementServiceOptions](../interfaces/agreement_service.AgreementServiceOptions) - -### Type Aliases - -- [AgreementSelector](agreement_service#agreementselector) - -## Type Aliases - -### AgreementSelector - -Ƭ **AgreementSelector**: (`candidates`: [`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)[]) => `Promise`\<[`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)\> - -#### Type declaration - -▸ (`candidates`): `Promise`\<[`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)\> - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `candidates` | [`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)[] | - -##### Returns - -`Promise`\<[`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)\> - -#### Defined in - -[src/agreement/service.ts:18](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L18) diff --git a/src/pages/docs/golem-js/reference/modules/agreement_strategy.md b/src/pages/docs/golem-js/reference/modules/agreement_strategy.md deleted file mode 100644 index 9dfc6743e..000000000 --- a/src/pages/docs/golem-js/reference/modules/agreement_strategy.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: "Module agreement/strategy" -pageTitle: "Module agreement/strategy - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module agreement/strategy within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: agreement/strategy - -## Table of contents - -### Functions - -- [randomAgreementSelector](agreement_strategy#randomagreementselector) -- [randomAgreementSelectorWithPriorityForExistingOnes](agreement_strategy#randomagreementselectorwithpriorityforexistingones) -- [bestAgreementSelector](agreement_strategy#bestagreementselector) - -## Functions - -### randomAgreementSelector - -▸ **randomAgreementSelector**(): (`candidates`: [`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)[]) => `Promise`\<[`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)\> - -Default selector that selects a random provider from the pool - -#### Returns - -`fn` - -▸ (`candidates`): `Promise`\<[`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)\> - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `candidates` | [`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)[] | - -##### Returns - -`Promise`\<[`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)\> - -#### Defined in - -[src/agreement/strategy.ts:4](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/strategy.ts#L4) - -___ - -### randomAgreementSelectorWithPriorityForExistingOnes - -▸ **randomAgreementSelectorWithPriorityForExistingOnes**(): (`candidates`: [`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)[]) => `Promise`\<[`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)\> - -Selector selecting a random provider from the pool, but giving priority to those who already have a confirmed agreement and deployed activity - -#### Returns - -`fn` - -▸ (`candidates`): `Promise`\<[`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)\> - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `candidates` | [`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)[] | - -##### Returns - -`Promise`\<[`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)\> - -#### Defined in - -[src/agreement/strategy.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/strategy.ts#L8) - -___ - -### bestAgreementSelector - -▸ **bestAgreementSelector**(`scores`): (`candidates`: [`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)[]) => `Promise`\<[`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)\> - -Selector selecting the provider according to the provided list of scores - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `scores` | `Object` | - -#### Returns - -`fn` - -▸ (`candidates`): `Promise`\<[`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)\> - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `candidates` | [`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)[] | - -##### Returns - -`Promise`\<[`AgreementCandidate`](../classes/agreement_service.AgreementCandidate)\> - -#### Defined in - -[src/agreement/strategy.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/strategy.ts#L17) diff --git a/src/pages/docs/golem-js/reference/modules/error_golem_error.md b/src/pages/docs/golem-js/reference/modules/error_golem_error.md deleted file mode 100644 index 7cca16f44..000000000 --- a/src/pages/docs/golem-js/reference/modules/error_golem_error.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: "Module error/golem-error" -pageTitle: "Module error/golem-error - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module error/golem-error within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: error/golem-error - -## Table of contents - -### Classes - -- [GolemError](../classes/error_golem_error.GolemError) -- [GolemUserError](../classes/error_golem_error.GolemUserError) -- [GolemAbortError](../classes/error_golem_error.GolemAbortError) -- [GolemConfigError](../classes/error_golem_error.GolemConfigError) -- [GolemInternalError](../classes/error_golem_error.GolemInternalError) -- [GolemPlatformError](../classes/error_golem_error.GolemPlatformError) -- [GolemTimeoutError](../classes/error_golem_error.GolemTimeoutError) -- [GolemModuleError](../classes/error_golem_error.GolemModuleError) diff --git a/src/pages/docs/golem-js/reference/modules/events_events.md b/src/pages/docs/golem-js/reference/modules/events_events.md deleted file mode 100644 index 6e6b41cff..000000000 --- a/src/pages/docs/golem-js/reference/modules/events_events.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "Module events/events" -pageTitle: "Module events/events - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module events/events within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: events/events - -## Table of contents - -### Classes - -- [BaseEvent](../classes/events_events.BaseEvent) -- [ComputationStarted](../classes/events_events.ComputationStarted) -- [ComputationFinished](../classes/events_events.ComputationFinished) -- [ComputationFailed](../classes/events_events.ComputationFailed) -- [TaskStarted](../classes/events_events.TaskStarted) -- [TaskRedone](../classes/events_events.TaskRedone) -- [TaskRejected](../classes/events_events.TaskRejected) -- [TaskFinished](../classes/events_events.TaskFinished) -- [AllocationCreated](../classes/events_events.AllocationCreated) -- [DemandSubscribed](../classes/events_events.DemandSubscribed) -- [DemandFailed](../classes/events_events.DemandFailed) -- [DemandUnsubscribed](../classes/events_events.DemandUnsubscribed) -- [CollectFailed](../classes/events_events.CollectFailed) -- [ProposalReceived](../classes/events_events.ProposalReceived) -- [ProposalRejected](../classes/events_events.ProposalRejected) -- [ProposalResponded](../classes/events_events.ProposalResponded) -- [ProposalFailed](../classes/events_events.ProposalFailed) -- [ProposalConfirmed](../classes/events_events.ProposalConfirmed) -- [PackageCreated](../classes/events_events.PackageCreated) -- [AgreementCreated](../classes/events_events.AgreementCreated) -- [AgreementConfirmed](../classes/events_events.AgreementConfirmed) -- [AgreementRejected](../classes/events_events.AgreementRejected) -- [AgreementTerminated](../classes/events_events.AgreementTerminated) -- [InvoiceReceived](../classes/events_events.InvoiceReceived) -- [DebitNoteReceived](../classes/events_events.DebitNoteReceived) -- [PaymentAccepted](../classes/events_events.PaymentAccepted) -- [DebitNoteAccepted](../classes/events_events.DebitNoteAccepted) -- [PaymentFailed](../classes/events_events.PaymentFailed) -- [ActivityCreated](../classes/events_events.ActivityCreated) -- [ActivityDestroyed](../classes/events_events.ActivityDestroyed) -- [ActivityStateChanged](../classes/events_events.ActivityStateChanged) -- [ScriptSent](../classes/events_events.ScriptSent) -- [ScriptExecuted](../classes/events_events.ScriptExecuted) - -### Variables - -- [EVENT\_TYPE](events_events#event_type) - -## Variables - -### EVENT\_TYPE - -• `Const` **EVENT\_TYPE**: ``"GolemEvent"`` - -Global Event Type with which all API events will be emitted. It should be used on all listeners that would like to handle events. - -#### Defined in - -[src/events/events.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/events/events.ts#L10) diff --git a/src/pages/docs/golem-js/reference/modules/executor_events.md b/src/pages/docs/golem-js/reference/modules/executor_events.md deleted file mode 100644 index 6b52487ce..000000000 --- a/src/pages/docs/golem-js/reference/modules/executor_events.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Module executor/events" -pageTitle: "Module executor/events - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module executor/events within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: executor/events - -## Table of contents - -### Interfaces - -- [TaskExecutorEventsDict](../interfaces/executor_events.TaskExecutorEventsDict) diff --git a/src/pages/docs/golem-js/reference/modules/executor_executor.md b/src/pages/docs/golem-js/reference/modules/executor_executor.md deleted file mode 100644 index 7e6cb3360..000000000 --- a/src/pages/docs/golem-js/reference/modules/executor_executor.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: "Module executor/executor" -pageTitle: "Module executor/executor - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module executor/executor within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: executor/executor - -## Table of contents - -### Classes - -- [TaskExecutor](../classes/executor_executor.TaskExecutor) - -### Type Aliases - -- [ExecutorOptions](executor_executor#executoroptions) -- [ExecutorOptionsMixin](executor_executor#executoroptionsmixin) -- [YagnaOptions](executor_executor#yagnaoptions) - -## Type Aliases - -### ExecutorOptions - -Ƭ **ExecutorOptions**: \{ `package?`: `string` \| [`Package`](../classes/package_package.Package) ; `taskTimeout?`: `number` ; `subnetTag?`: `string` ; `logger?`: [`Logger`](../interfaces/utils_logger_logger.Logger) ; `enableLogging?`: `boolean` ; `yagnaOptions?`: [`YagnaOptions`](executor_executor#yagnaoptions) ; `eventTarget?`: `EventTarget` ; `maxTaskRetries?`: `number` ; `storageProvider?`: [`StorageProvider`](../interfaces/storage_provider.StorageProvider) ; `activityPreparingTimeout?`: `number` ; `skipProcessSignals?`: `boolean` ; `startupTimeout?`: `number` ; `exitOnNoProposals?`: `boolean` } & `Omit`\<[`PackageOptions`](package_package#packageoptions), ``"imageHash"`` \| ``"imageTag"``\> & [`MarketOptions`](../interfaces/market_service.MarketOptions) & [`TaskServiceOptions`](../interfaces/task_service.TaskServiceOptions) & [`PaymentOptions`](../interfaces/payment_service.PaymentOptions) & [`NetworkServiceOptions`](network_service#networkserviceoptions) & [`AgreementServiceOptions`](../interfaces/agreement_service.AgreementServiceOptions) & [`WorkOptions`](../interfaces/task_work.WorkOptions) - -#### Defined in - -[src/executor/executor.ts:22](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/executor.ts#L22) - -___ - -### ExecutorOptionsMixin - -Ƭ **ExecutorOptionsMixin**: `string` \| [`ExecutorOptions`](executor_executor#executoroptions) - -Contains information needed to start executor, if string the imageHash is required, otherwise it should be a type of [ExecutorOptions](executor_executor#executoroptions) - -#### Defined in - -[src/executor/executor.ts:79](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/executor.ts#L79) - -___ - -### YagnaOptions - -Ƭ **YagnaOptions**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `apiKey?` | `string` | -| `basePath?` | `string` | - -#### Defined in - -[src/executor/executor.ts:81](https://github.com/golemfactory/golem-js/blob/7cee55b/src/executor/executor.ts#L81) diff --git a/src/pages/docs/golem-js/reference/modules/experimental_deployment_builder.md b/src/pages/docs/golem-js/reference/modules/experimental_deployment_builder.md new file mode 100644 index 000000000..066c7c16f --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/experimental_deployment_builder.md @@ -0,0 +1,18 @@ +--- +title: "Module experimental/deployment/builder" +pageTitle: "Module experimental/deployment/builder - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module experimental/deployment/builder within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: experimental/deployment/builder + +## Table of contents + +### Classes + +- [GolemDeploymentBuilder](../classes/experimental_deployment_builder.GolemDeploymentBuilder) + +### Interfaces + +- [DeploymentOptions](../interfaces/experimental_deployment_builder.DeploymentOptions) +- [CreateResourceRentalPoolOptions](../interfaces/experimental_deployment_builder.CreateResourceRentalPoolOptions) diff --git a/src/pages/docs/golem-js/reference/modules/experimental_deployment_deployment.md b/src/pages/docs/golem-js/reference/modules/experimental_deployment_deployment.md new file mode 100644 index 000000000..0bb6c50fb --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/experimental_deployment_deployment.md @@ -0,0 +1,42 @@ +--- +title: "Module experimental/deployment/deployment" +pageTitle: "Module experimental/deployment/deployment - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module experimental/deployment/deployment within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: experimental/deployment/deployment + +## Table of contents + +### Enumerations + +- [DeploymentState](../enums/experimental_deployment_deployment.DeploymentState) + +### Classes + +- [Deployment](../classes/experimental_deployment_deployment.Deployment) + +### Interfaces + +- [DeploymentEvents](../interfaces/experimental_deployment_deployment.DeploymentEvents) + +### Type Aliases + +- [DeploymentComponents](experimental_deployment_deployment#deploymentcomponents) + +## Type Aliases + +### DeploymentComponents + +Ƭ **DeploymentComponents**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `resourceRentalPools` | \{ `name`: `string` ; `options`: [`CreateResourceRentalPoolOptions`](../interfaces/experimental_deployment_builder.CreateResourceRentalPoolOptions) }[] | +| `networks` | \{ `name`: `string` ; `options`: [`NetworkOptions`](../interfaces/network_network_module.NetworkOptions) }[] | + +#### Defined in + +[src/experimental/deployment/deployment.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/deployment.ts#L45) diff --git a/src/pages/docs/golem-js/reference/modules/experimental_deployment_validate_deployment.md b/src/pages/docs/golem-js/reference/modules/experimental_deployment_validate_deployment.md new file mode 100644 index 000000000..afc03187d --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/experimental_deployment_validate_deployment.md @@ -0,0 +1,33 @@ +--- +title: "Module experimental/deployment/validate-deployment" +pageTitle: "Module experimental/deployment/validate-deployment - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module experimental/deployment/validate-deployment within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: experimental/deployment/validate-deployment + +## Table of contents + +### Functions + +- [validateDeployment](experimental_deployment_validate_deployment#validatedeployment) + +## Functions + +### validateDeployment + +▸ **validateDeployment**(`components`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `components` | [`DeploymentComponents`](experimental_deployment_deployment#deploymentcomponents) | + +#### Returns + +`void` + +#### Defined in + +[src/experimental/deployment/validate-deployment.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/deployment/validate-deployment.ts#L18) diff --git a/src/pages/docs/golem-js/reference/modules/experimental_job_job.md b/src/pages/docs/golem-js/reference/modules/experimental_job_job.md new file mode 100644 index 000000000..c2272aed7 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/experimental_job_job.md @@ -0,0 +1,75 @@ +--- +title: "Module experimental/job/job" +pageTitle: "Module experimental/job/job - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module experimental/job/job within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: experimental/job/job + +## Table of contents + +### Enumerations + +- [JobState](../enums/experimental_job_job.JobState) + +### Classes + +- [Job](../classes/experimental_job_job.Job) + +### Interfaces + +- [JobEventsDict](../interfaces/experimental_job_job.JobEventsDict) + +### Type Aliases + +- [RunJobOptions](experimental_job_job#runjoboptions) +- [WorkFunction](experimental_job_job#workfunction) + +## Type Aliases + +### RunJobOptions + +Ƭ **RunJobOptions**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `payment?` | [`PaymentModuleOptions`](../interfaces/payment_payment_module.PaymentModuleOptions) | +| `network?` | [`NetworkOptions`](../interfaces/network_network_module.NetworkOptions) | +| `workload?` | [`WorkloadDemandDirectorConfigOptions`](market_demand_options#workloaddemanddirectorconfigoptions) | +| `work?` | [`ExeUnitOptions`](../interfaces/activity_exe_unit_exe_unit.ExeUnitOptions) | + +#### Defined in + +[src/experimental/job/job.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L19) + +___ + +### WorkFunction + +Ƭ **WorkFunction**\<`OutputType`\>: (`exe`: [`ExeUnit`](../classes/activity_exe_unit_exe_unit.ExeUnit)) => `Promise`\<`OutputType`\> + +#### Type parameters + +| Name | +| :------ | +| `OutputType` | + +#### Type declaration + +▸ (`exe`): `Promise`\<`OutputType`\> + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `exe` | [`ExeUnit`](../classes/activity_exe_unit_exe_unit.ExeUnit) | + +##### Returns + +`Promise`\<`OutputType`\> + +#### Defined in + +[src/experimental/job/job.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job.ts#L26) diff --git a/src/pages/docs/golem-js/reference/modules/experimental_job_job_manager.md b/src/pages/docs/golem-js/reference/modules/experimental_job_job_manager.md new file mode 100644 index 000000000..b2411dfef --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/experimental_job_job_manager.md @@ -0,0 +1,27 @@ +--- +title: "Module experimental/job/job_manager" +pageTitle: "Module experimental/job/job_manager - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module experimental/job/job_manager within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: experimental/job/job\_manager + +## Table of contents + +### Classes + +- [JobManager](../classes/experimental_job_job_manager.JobManager) + +### Type Aliases + +- [JobManagerConfig](experimental_job_job_manager#jobmanagerconfig) + +## Type Aliases + +### JobManagerConfig + +Ƭ **JobManagerConfig**: `Partial`\<[`RunJobOptions`](experimental_job_job#runjoboptions)\> & \{ `yagna?`: [`YagnaOptions`](shared_yagna_yagnaApi#yagnaoptions) } + +#### Defined in + +[src/experimental/job/job_manager.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/job/job_manager.ts#L13) diff --git a/src/pages/docs/golem-js/reference/modules/experimental_reputation_error.md b/src/pages/docs/golem-js/reference/modules/experimental_reputation_error.md new file mode 100644 index 000000000..d9b80156b --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/experimental_reputation_error.md @@ -0,0 +1,13 @@ +--- +title: "Module experimental/reputation/error" +pageTitle: "Module experimental/reputation/error - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module experimental/reputation/error within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: experimental/reputation/error + +## Table of contents + +### Classes + +- [GolemReputationError](../classes/experimental_reputation_error.GolemReputationError) diff --git a/src/pages/docs/golem-js/reference/modules/experimental_reputation_system.md b/src/pages/docs/golem-js/reference/modules/experimental_reputation_system.md new file mode 100644 index 000000000..482d7eabd --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/experimental_reputation_system.md @@ -0,0 +1,96 @@ +--- +title: "Module experimental/reputation/system" +pageTitle: "Module experimental/reputation/system - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module experimental/reputation/system within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: experimental/reputation/system + +## Table of contents + +### Classes + +- [ReputationSystem](../classes/experimental_reputation_system.ReputationSystem) + +### Variables + +- [DEFAULT\_PROPOSAL\_MIN\_SCORE](experimental_reputation_system#default_proposal_min_score) +- [DEFAULT\_PROPOSAL\_WEIGHTS](experimental_reputation_system#default_proposal_weights) +- [DEFAULT\_AGREEMENT\_WEIGHTS](experimental_reputation_system#default_agreement_weights) +- [DEFAULT\_REPUTATION\_URL](experimental_reputation_system#default_reputation_url) +- [DEFAULT\_AGREEMENT\_TOP\_POOL\_SIZE](experimental_reputation_system#default_agreement_top_pool_size) +- [REPUTATION\_PRESETS](experimental_reputation_system#reputation_presets) + +## Variables + +### DEFAULT\_PROPOSAL\_MIN\_SCORE + +• `Const` **DEFAULT\_PROPOSAL\_MIN\_SCORE**: ``0.8`` + +Default minimum score for proposals. + +#### Defined in + +[src/experimental/reputation/system.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L23) + +___ + +### DEFAULT\_PROPOSAL\_WEIGHTS + +• `Const` **DEFAULT\_PROPOSAL\_WEIGHTS**: [`ReputationWeights`](experimental_reputation_types#reputationweights) + +Default weights used to calculate the score for proposals. + +#### Defined in + +[src/experimental/reputation/system.ts:29](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L29) + +___ + +### DEFAULT\_AGREEMENT\_WEIGHTS + +• `Const` **DEFAULT\_AGREEMENT\_WEIGHTS**: [`ReputationWeights`](experimental_reputation_types#reputationweights) + +Default weights used to calculate the score for agreements. + +#### Defined in + +[src/experimental/reputation/system.ts:38](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L38) + +___ + +### DEFAULT\_REPUTATION\_URL + +• `Const` **DEFAULT\_REPUTATION\_URL**: ``"https://reputation.dev-test.golem.network/v2/providers/scores"`` + +Default reputation service URL. + +#### Defined in + +[src/experimental/reputation/system.ts:47](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L47) + +___ + +### DEFAULT\_AGREEMENT\_TOP\_POOL\_SIZE + +• `Const` **DEFAULT\_AGREEMENT\_TOP\_POOL\_SIZE**: ``2`` + +The number of top scoring providers to consider when selecting an agreement. + +Default for `topPoolSize` agreement selector option. + +#### Defined in + +[src/experimental/reputation/system.ts:54](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L54) + +___ + +### REPUTATION\_PRESETS + +• `Const` **REPUTATION\_PRESETS**: [`ReputationPresets`](../interfaces/experimental_reputation_types.ReputationPresets) + +Predefined presets for reputation system. + +#### Defined in + +[src/experimental/reputation/system.ts:59](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/system.ts#L59) diff --git a/src/pages/docs/golem-js/reference/modules/experimental_reputation_types.md b/src/pages/docs/golem-js/reference/modules/experimental_reputation_types.md new file mode 100644 index 000000000..71aef1a2c --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/experimental_reputation_types.md @@ -0,0 +1,53 @@ +--- +title: "Module experimental/reputation/types" +pageTitle: "Module experimental/reputation/types - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module experimental/reputation/types within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: experimental/reputation/types + +## Table of contents + +### Interfaces + +- [ReputationProviderScores](../interfaces/experimental_reputation_types.ReputationProviderScores) +- [ReputationProviderEntry](../interfaces/experimental_reputation_types.ReputationProviderEntry) +- [ReputationRejectedOperator](../interfaces/experimental_reputation_types.ReputationRejectedOperator) +- [ReputationRejectedProvider](../interfaces/experimental_reputation_types.ReputationRejectedProvider) +- [ReputationUntestedProvider](../interfaces/experimental_reputation_types.ReputationUntestedProvider) +- [ReputationData](../interfaces/experimental_reputation_types.ReputationData) +- [ProposalFilterOptions](../interfaces/experimental_reputation_types.ProposalFilterOptions) +- [ProposalSelectorOptions](../interfaces/experimental_reputation_types.ProposalSelectorOptions) +- [ReputationWeightsMixin](../interfaces/experimental_reputation_types.ReputationWeightsMixin) +- [ReputationPreset](../interfaces/experimental_reputation_types.ReputationPreset) +- [ReputationPresets](../interfaces/experimental_reputation_types.ReputationPresets) +- [ReputationConfig](../interfaces/experimental_reputation_types.ReputationConfig) + +### Type Aliases + +- [ReputationWeights](experimental_reputation_types#reputationweights) +- [ReputationPresetName](experimental_reputation_types#reputationpresetname) + +## Type Aliases + +### ReputationWeights + +Ƭ **ReputationWeights**: `Partial`\<[`ReputationProviderScores`](../interfaces/experimental_reputation_types.ReputationProviderScores)\> + +Weights used to calculate the score for providers. + +#### Defined in + +[src/experimental/reputation/types.ts:114](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L114) + +___ + +### ReputationPresetName + +Ƭ **ReputationPresetName**: keyof [`ReputationPresets`](../interfaces/experimental_reputation_types.ReputationPresets) + +Names of predefined reputation presets. + +#### Defined in + +[src/experimental/reputation/types.ts:149](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/experimental/reputation/types.ts#L149) diff --git a/src/pages/docs/golem-js/reference/modules/golem_network_golem_network.md b/src/pages/docs/golem-js/reference/modules/golem_network_golem_network.md index 52f6afa8f..b67ccde15 100644 --- a/src/pages/docs/golem-js/reference/modules/golem_network_golem_network.md +++ b/src/pages/docs/golem-js/reference/modules/golem_network_golem_network.md @@ -1,10 +1,10 @@ --- -title: "Module golem_network/golem_network" -pageTitle: "Module golem_network/golem_network - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module golem_network/golem_network within the golem-js SDK for the Golem Network." +title: "Module golem-network/golem-network" +pageTitle: "Module golem-network/golem-network - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module golem-network/golem-network within the golem-js SDK for the Golem Network." type: "JS API Reference" --- -# Module: golem\_network/golem\_network +# Module: golem-network/golem-network ## Table of contents @@ -12,16 +12,63 @@ type: "JS API Reference" - [GolemNetwork](../classes/golem_network_golem_network.GolemNetwork) +### Interfaces + +- [GolemNetworkOptions](../interfaces/golem_network_golem_network.GolemNetworkOptions) +- [MarketOrderSpec](../interfaces/golem_network_golem_network.MarketOrderSpec) +- [GolemNetworkEvents](../interfaces/golem_network_golem_network.GolemNetworkEvents) +- [OneOfOptions](../interfaces/golem_network_golem_network.OneOfOptions) +- [ManyOfOptions](../interfaces/golem_network_golem_network.ManyOfOptions) + ### Type Aliases -- [GolemNetworkConfig](golem_network_golem_network#golemnetworkconfig) +- [InstanceOrFactory](golem_network_golem_network#instanceorfactory) +- [GolemServices](golem_network_golem_network#golemservices) ## Type Aliases -### GolemNetworkConfig +### InstanceOrFactory + +Ƭ **InstanceOrFactory**\<`TargetInterface`, `ConstructorArgs`\>: `TargetInterface` \| (...`args`: `ConstructorArgs`) => `TargetInterface` + +Instance of an object or a factory function that you can call `new` on. +Optionally you can provide constructor arguments. + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `TargetInterface` | `TargetInterface` | +| `ConstructorArgs` | extends `unknown`[] = `never`[] | + +#### Defined in + +[src/golem-network/golem-network.ts:46](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L46) + +___ + +### GolemServices + +Ƭ **GolemServices**: `Object` + +Dependency Container + +#### Type declaration -Ƭ **GolemNetworkConfig**: `Partial`\<[`RunJobOptions`](job_job#runjoboptions)\> & \{ `yagna?`: [`YagnaOptions`](executor_executor#yagnaoptions) } +| Name | Type | +| :------ | :------ | +| `yagna` | [`YagnaApi`](../classes/shared_yagna_yagnaApi.YagnaApi) | +| `logger` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | +| `paymentApi` | [`IPaymentApi`](../interfaces/payment_api.IPaymentApi) | +| `activityApi` | [`IActivityApi`](../interfaces/activity_api.IActivityApi) | +| `marketApi` | [`IMarketApi`](../interfaces/market_api.IMarketApi) | +| `networkApi` | [`INetworkApi`](../interfaces/network_api.INetworkApi) | +| `proposalCache` | [`CacheService`](../classes/shared_cache_CacheService.CacheService)\<[`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)\> | +| `proposalRepository` | [`IProposalRepository`](../interfaces/market_proposal_market_proposal.IProposalRepository) | +| `demandRepository` | [`IDemandRepository`](../interfaces/market_demand_demand.IDemandRepository) | +| `fileServer` | [`IFileServer`](../interfaces/activity_activity_module.IFileServer) | +| `storageProvider` | [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) | #### Defined in -[src/golem_network/golem_network.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/golem_network/golem_network.ts#L8) +[src/golem-network/golem-network.ts:161](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/golem-network/golem-network.ts#L161) diff --git a/src/pages/docs/golem-js/reference/modules/job_job.md b/src/pages/docs/golem-js/reference/modules/job_job.md deleted file mode 100644 index 255c28b4d..000000000 --- a/src/pages/docs/golem-js/reference/modules/job_job.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: "Module job/job" -pageTitle: "Module job/job - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module job/job within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: job/job - -## Table of contents - -### Classes - -- [Job](../classes/job_job.Job) - -### Interfaces - -- [JobEventsDict](../interfaces/job_job.JobEventsDict) - -### Type Aliases - -- [RunJobOptions](job_job#runjoboptions) - -## Type Aliases - -### RunJobOptions - -Ƭ **RunJobOptions**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `market?` | [`MarketOptions`](../interfaces/market_service.MarketOptions) | -| `payment?` | [`PaymentOptions`](../interfaces/payment_service.PaymentOptions) | -| `agreement?` | `AgreementOptions` | -| `network?` | `NetworkOptions` | -| `package?` | [`PackageOptions`](package_package#packageoptions) | -| `activity?` | [`ActivityOptions`](../interfaces/activity_activity.ActivityOptions) | -| `work?` | [`WorkOptions`](../interfaces/task_work.WorkOptions) | - -#### Defined in - -[src/job/job.ts:17](https://github.com/golemfactory/golem-js/blob/7cee55b/src/job/job.ts#L17) diff --git a/src/pages/docs/golem-js/reference/modules/market_agreement_agreement.md b/src/pages/docs/golem-js/reference/modules/market_agreement_agreement.md new file mode 100644 index 000000000..082f6b194 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_agreement_agreement.md @@ -0,0 +1,41 @@ +--- +title: "Module market/agreement/agreement" +pageTitle: "Module market/agreement/agreement - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/agreement/agreement within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/agreement/agreement + +## Table of contents + +### Classes + +- [Agreement](../classes/market_agreement_agreement.Agreement) + +### Interfaces + +- [ProviderInfo](../interfaces/market_agreement_agreement.ProviderInfo) +- [AgreementOptions](../interfaces/market_agreement_agreement.AgreementOptions) +- [IAgreementRepository](../interfaces/market_agreement_agreement.IAgreementRepository) + +### Type Aliases + +- [AgreementState](market_agreement_agreement#agreementstate) + +## Type Aliases + +### AgreementState + +Ƭ **AgreementState**: ``"Proposal"`` \| ``"Pending"`` \| ``"Cancelled"`` \| ``"Rejected"`` \| ``"Approved"`` \| ``"Expired"`` \| ``"Terminated"`` + +* `Proposal` - newly created by a Requestor (draft based on Proposal) +* `Pending` - confirmed by a Requestor and send to Provider for approval +* `Cancelled` by a Requestor +* `Rejected` by a Provider +* `Approved` by both sides +* `Expired` - not approved, rejected nor cancelled within validity period +* `Terminated` - finished after approval. + +#### Defined in + +[src/market/agreement/agreement.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement.ts#L14) diff --git a/src/pages/docs/golem-js/reference/modules/market_agreement_agreement_event.md b/src/pages/docs/golem-js/reference/modules/market_agreement_agreement_event.md new file mode 100644 index 000000000..4d43f4a6c --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_agreement_agreement_event.md @@ -0,0 +1,102 @@ +--- +title: "Module market/agreement/agreement-event" +pageTitle: "Module market/agreement/agreement-event - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/agreement/agreement-event within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/agreement/agreement-event + +## Table of contents + +### Type Aliases + +- [AgreementApproved](market_agreement_agreement_event#agreementapproved) +- [AgreementTerminatedEvent](market_agreement_agreement_event#agreementterminatedevent) +- [AgreementRejectedEvent](market_agreement_agreement_event#agreementrejectedevent) +- [AgreementCancelledEvent](market_agreement_agreement_event#agreementcancelledevent) +- [AgreementEvent](market_agreement_agreement_event#agreementevent) + +## Type Aliases + +### AgreementApproved + +Ƭ **AgreementApproved**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `type` | ``"AgreementApproved"`` | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | +| `timestamp` | `Date` | + +#### Defined in + +[src/market/agreement/agreement-event.ts:3](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement-event.ts#L3) + +___ + +### AgreementTerminatedEvent + +Ƭ **AgreementTerminatedEvent**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `type` | ``"AgreementTerminated"`` | +| `terminatedBy` | ``"Provider"`` \| ``"Requestor"`` | +| `reason` | `string` | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | +| `timestamp` | `Date` | + +#### Defined in + +[src/market/agreement/agreement-event.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement-event.ts#L9) + +___ + +### AgreementRejectedEvent + +Ƭ **AgreementRejectedEvent**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `type` | ``"AgreementRejected"`` | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | +| `reason` | `string` | +| `timestamp` | `Date` | + +#### Defined in + +[src/market/agreement/agreement-event.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement-event.ts#L17) + +___ + +### AgreementCancelledEvent + +Ƭ **AgreementCancelledEvent**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `type` | ``"AgreementCancelled"`` | +| `agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | +| `timestamp` | `Date` | + +#### Defined in + +[src/market/agreement/agreement-event.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement-event.ts#L24) + +___ + +### AgreementEvent + +Ƭ **AgreementEvent**: [`AgreementApproved`](market_agreement_agreement_event#agreementapproved) \| [`AgreementTerminatedEvent`](market_agreement_agreement_event#agreementterminatedevent) \| [`AgreementRejectedEvent`](market_agreement_agreement_event#agreementrejectedevent) \| [`AgreementCancelledEvent`](market_agreement_agreement_event#agreementcancelledevent) + +#### Defined in + +[src/market/agreement/agreement-event.ts:30](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/agreement/agreement-event.ts#L30) diff --git a/src/pages/docs/golem-js/reference/modules/market_api.md b/src/pages/docs/golem-js/reference/modules/market_api.md new file mode 100644 index 000000000..bb424c39e --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_api.md @@ -0,0 +1,46 @@ +--- +title: "Module market/api" +pageTitle: "Module market/api - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/api within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/api + +## Table of contents + +### Interfaces + +- [IMarketApi](../interfaces/market_api.IMarketApi) + +### Type Aliases + +- [MarketEvents](market_api#marketevents) + +## Type Aliases + +### MarketEvents + +Ƭ **MarketEvents**: `Object` + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `demandSubscriptionStarted` | (`demand`: [`Demand`](../classes/market_demand_demand.Demand)) => `void` | - | +| `demandSubscriptionRefreshed` | (`demand`: [`Demand`](../classes/market_demand_demand.Demand)) => `void` | - | +| `demandSubscriptionStopped` | (`demand`: [`Demand`](../classes/market_demand_demand.Demand)) => `void` | - | +| `offerProposalReceived` | (`event`: [`OfferProposalReceivedEvent`](market_proposal_market_proposal_event#offerproposalreceivedevent)) => `void` | - | +| `offerCounterProposalSent` | (`offerProposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal), `counterProposal`: [`OfferCounterProposal`](../classes/market_proposal_offer_counter_proposal.OfferCounterProposal)) => `void` | - | +| `errorSendingCounterProposal` | (`offerProposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal), `error`: `Error`) => `void` | - | +| `offerCounterProposalRejected` | (`event`: [`OfferCounterProposalRejectedEvent`](market_proposal_market_proposal_event#offercounterproposalrejectedevent)) => `void` | - | +| `offerPropertyQueryReceived` | (`event`: [`OfferPropertyQueryReceivedEvent`](market_proposal_market_proposal_event#offerpropertyqueryreceivedevent)) => `void` | - | +| `offerProposalRejectedByProposalFilter` | (`offerProposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal), `reason?`: `string`) => `void` | - | +| `offerProposalRejectedByPriceFilter` | (`offerProposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal), `reason?`: `string`) => `void` | - | +| `agreementApproved` | (`event`: [`AgreementApproved`](market_agreement_agreement_event#agreementapproved)) => `void` | - | +| `agreementRejected` | (`event`: [`AgreementRejectedEvent`](market_agreement_agreement_event#agreementrejectedevent)) => `void` | - | +| `agreementTerminated` | (`event`: [`AgreementTerminatedEvent`](market_agreement_agreement_event#agreementterminatedevent)) => `void` | - | +| `agreementCancelled` | (`event`: [`AgreementCancelledEvent`](market_agreement_agreement_event#agreementcancelledevent)) => `void` | - | + +#### Defined in + +[src/market/api.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/api.ts#L22) diff --git a/src/pages/docs/golem-js/reference/modules/market_builder.md b/src/pages/docs/golem-js/reference/modules/market_builder.md deleted file mode 100644 index 7ea0748ff..000000000 --- a/src/pages/docs/golem-js/reference/modules/market_builder.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "Module market/builder" -pageTitle: "Module market/builder - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module market/builder within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: market/builder - -## Table of contents - -### Type Aliases - -- [MarketDecoration](market_builder#marketdecoration) - -## Type Aliases - -### MarketDecoration - -Ƭ **MarketDecoration**: `Object` - -Properties and constraints to be added to a market object (i.e. a demand or an offer). - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `properties` | \{ `key`: `string` ; `value`: `string` \| `number` \| `boolean` }[] | -| `constraints` | `string`[] | - -#### Defined in - -[src/market/builder.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/builder.ts#L8) diff --git a/src/pages/docs/golem-js/reference/modules/market_demand.md b/src/pages/docs/golem-js/reference/modules/market_demand.md deleted file mode 100644 index 6f9260866..000000000 --- a/src/pages/docs/golem-js/reference/modules/market_demand.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "Module market/demand" -pageTitle: "Module market/demand - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module market/demand within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: market/demand - -## Table of contents - -### Interfaces - -- [DemandDetails](../interfaces/market_demand.DemandDetails) -- [DemandOptions](../interfaces/market_demand.DemandOptions) diff --git a/src/pages/docs/golem-js/reference/modules/market_demand_demand.md b/src/pages/docs/golem-js/reference/modules/market_demand_demand.md new file mode 100644 index 000000000..75ee43182 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_demand_demand.md @@ -0,0 +1,33 @@ +--- +title: "Module market/demand/demand" +pageTitle: "Module market/demand/demand - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/demand/demand within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/demand/demand + +## Table of contents + +### Classes + +- [DemandSpecification](../classes/market_demand_demand.DemandSpecification) +- [Demand](../classes/market_demand_demand.Demand) + +### Interfaces + +- [BasicDemandPropertyConfig](../interfaces/market_demand_demand.BasicDemandPropertyConfig) +- [IDemandRepository](../interfaces/market_demand_demand.IDemandRepository) + +### Type Aliases + +- [BuildDemandOptions](market_demand_demand#builddemandoptions) + +## Type Aliases + +### BuildDemandOptions + +Ƭ **BuildDemandOptions**: `Partial`\<\{ `workload`: `Partial`\<[`WorkloadDemandDirectorConfigOptions`](market_demand_options#workloaddemanddirectorconfigoptions)\> ; `payment`: `Partial`\<[`PaymentDemandDirectorConfigOptions`](../interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions)\> }\> & `Partial`\<[`BasicDemandDirectorConfigOptions`](../interfaces/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions)\> + +#### Defined in + +[src/market/demand/demand.ts:85](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand.ts#L85) diff --git a/src/pages/docs/golem-js/reference/modules/market_demand_demand_body_builder.md b/src/pages/docs/golem-js/reference/modules/market_demand_demand_body_builder.md new file mode 100644 index 000000000..3a403492c --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_demand_demand_body_builder.md @@ -0,0 +1,80 @@ +--- +title: "Module market/demand/demand-body-builder" +pageTitle: "Module market/demand/demand-body-builder - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/demand/demand-body-builder within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/demand/demand-body-builder + +## Table of contents + +### Enumerations + +- [ComparisonOperator](../enums/market_demand_demand_body_builder.ComparisonOperator) + +### Classes + +- [DemandBodyBuilder](../classes/market_demand_demand_body_builder.DemandBodyBuilder) + +### Type Aliases + +- [DemandPropertyValue](market_demand_demand_body_builder#demandpropertyvalue) +- [DemandProperty](market_demand_demand_body_builder#demandproperty) +- [DemandBodyPrototype](market_demand_demand_body_builder#demandbodyprototype) + +## Type Aliases + +### DemandPropertyValue + +Ƭ **DemandPropertyValue**: `string` \| `number` \| `boolean` \| `string`[] \| `number`[] + +Defines what kind of value data types one can expect in the raw Demand Properties + +#### Defined in + +[src/market/demand/demand-body-builder.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand-body-builder.ts#L6) + +___ + +### DemandProperty + +Ƭ **DemandProperty**: `Object` + +Represents a single property/attribute that can be set on a Demand to specify Requestor needs + +Demand properties should be understood as values for various parameters of the agreement between Provider and Requestor. +By defining properties on the demand, and negotiating them, the parties settle on the Terms & Conditions of the collaboration. + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `key` | `string` | +| `value` | [`DemandPropertyValue`](market_demand_demand_body_builder#demandpropertyvalue) | + +#### Defined in + +[src/market/demand/demand-body-builder.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand-body-builder.ts#L14) + +___ + +### DemandBodyPrototype + +Ƭ **DemandBodyPrototype**: `Object` + +Data structure that represents details of the body for a demand subscription request + +This type belongs to our domain (use case layer), and will later be "serialized" to the body that's sent to +Yagna. You should consider this as a "draft of the demand", that can be finalized by one of the [market/api.IMarketApi](../interfaces/market_api.IMarketApi) +implementations. + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `properties` | [`DemandProperty`](market_demand_demand_body_builder#demandproperty)[] | +| `constraints` | `string`[] | + +#### Defined in + +[src/market/demand/demand-body-builder.ts:32](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/demand-body-builder.ts#L32) diff --git a/src/pages/docs/golem-js/reference/modules/market_demand_directors_base_config.md b/src/pages/docs/golem-js/reference/modules/market_demand_directors_base_config.md new file mode 100644 index 000000000..fc1f16499 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_demand_directors_base_config.md @@ -0,0 +1,13 @@ +--- +title: "Module market/demand/directors/base-config" +pageTitle: "Module market/demand/directors/base-config - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/demand/directors/base-config within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/demand/directors/base-config + +## Table of contents + +### Classes + +- [BaseConfig](../classes/market_demand_directors_base_config.BaseConfig) diff --git a/src/pages/docs/golem-js/reference/modules/market_demand_directors_basic_demand_director.md b/src/pages/docs/golem-js/reference/modules/market_demand_directors_basic_demand_director.md new file mode 100644 index 000000000..95a4eb424 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_demand_directors_basic_demand_director.md @@ -0,0 +1,13 @@ +--- +title: "Module market/demand/directors/basic-demand-director" +pageTitle: "Module market/demand/directors/basic-demand-director - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/demand/directors/basic-demand-director within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/demand/directors/basic-demand-director + +## Table of contents + +### Classes + +- [BasicDemandDirector](../classes/market_demand_directors_basic_demand_director.BasicDemandDirector) diff --git a/src/pages/docs/golem-js/reference/modules/market_demand_directors_basic_demand_director_config.md b/src/pages/docs/golem-js/reference/modules/market_demand_directors_basic_demand_director_config.md new file mode 100644 index 000000000..948d8f844 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_demand_directors_basic_demand_director_config.md @@ -0,0 +1,17 @@ +--- +title: "Module market/demand/directors/basic-demand-director-config" +pageTitle: "Module market/demand/directors/basic-demand-director-config - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/demand/directors/basic-demand-director-config within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/demand/directors/basic-demand-director-config + +## Table of contents + +### Classes + +- [BasicDemandDirectorConfig](../classes/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig) + +### Interfaces + +- [BasicDemandDirectorConfigOptions](../interfaces/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions) diff --git a/src/pages/docs/golem-js/reference/modules/market_demand_directors_payment_demand_director.md b/src/pages/docs/golem-js/reference/modules/market_demand_directors_payment_demand_director.md new file mode 100644 index 000000000..b67cdc26d --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_demand_directors_payment_demand_director.md @@ -0,0 +1,13 @@ +--- +title: "Module market/demand/directors/payment-demand-director" +pageTitle: "Module market/demand/directors/payment-demand-director - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/demand/directors/payment-demand-director within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/demand/directors/payment-demand-director + +## Table of contents + +### Classes + +- [PaymentDemandDirector](../classes/market_demand_directors_payment_demand_director.PaymentDemandDirector) diff --git a/src/pages/docs/golem-js/reference/modules/market_demand_directors_payment_demand_director_config.md b/src/pages/docs/golem-js/reference/modules/market_demand_directors_payment_demand_director_config.md new file mode 100644 index 000000000..74558d5f2 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_demand_directors_payment_demand_director_config.md @@ -0,0 +1,17 @@ +--- +title: "Module market/demand/directors/payment-demand-director-config" +pageTitle: "Module market/demand/directors/payment-demand-director-config - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/demand/directors/payment-demand-director-config within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/demand/directors/payment-demand-director-config + +## Table of contents + +### Classes + +- [PaymentDemandDirectorConfig](../classes/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig) + +### Interfaces + +- [PaymentDemandDirectorConfigOptions](../interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions) diff --git a/src/pages/docs/golem-js/reference/modules/market_demand_directors_workload_demand_director.md b/src/pages/docs/golem-js/reference/modules/market_demand_directors_workload_demand_director.md new file mode 100644 index 000000000..a1a2d5953 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_demand_directors_workload_demand_director.md @@ -0,0 +1,13 @@ +--- +title: "Module market/demand/directors/workload-demand-director" +pageTitle: "Module market/demand/directors/workload-demand-director - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/demand/directors/workload-demand-director within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/demand/directors/workload-demand-director + +## Table of contents + +### Classes + +- [WorkloadDemandDirector](../classes/market_demand_directors_workload_demand_director.WorkloadDemandDirector) diff --git a/src/pages/docs/golem-js/reference/modules/market_demand_directors_workload_demand_director_config.md b/src/pages/docs/golem-js/reference/modules/market_demand_directors_workload_demand_director_config.md new file mode 100644 index 000000000..e502ebc3d --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_demand_directors_workload_demand_director_config.md @@ -0,0 +1,17 @@ +--- +title: "Module market/demand/directors/workload-demand-director-config" +pageTitle: "Module market/demand/directors/workload-demand-director-config - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/demand/directors/workload-demand-director-config within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/demand/directors/workload-demand-director-config + +## Table of contents + +### Enumerations + +- [PackageFormat](../enums/market_demand_directors_workload_demand_director_config.PackageFormat) + +### Classes + +- [WorkloadDemandDirectorConfig](../classes/market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig) diff --git a/src/pages/docs/golem-js/reference/modules/market_demand_options.md b/src/pages/docs/golem-js/reference/modules/market_demand_options.md new file mode 100644 index 000000000..db05a5ef6 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_demand_options.md @@ -0,0 +1,109 @@ +--- +title: "Module market/demand/options" +pageTitle: "Module market/demand/options - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/demand/options within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/demand/options + +## Table of contents + +### Type Aliases + +- [ResourceDemandOptions](market_demand_options#resourcedemandoptions) +- [RuntimeDemandOptions](market_demand_options#runtimedemandoptions) +- [ManifestDemandOptions](market_demand_options#manifestdemandoptions) +- [ImageDemandOptions](market_demand_options#imagedemandoptions) +- [WorkloadDemandDirectorConfigOptions](market_demand_options#workloaddemanddirectorconfigoptions) + +## Type Aliases + +### ResourceDemandOptions + +Ƭ **ResourceDemandOptions**: `Object` + +Specifies a set of options related to computation resources that will be used to form the demand + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `minMemGib` | `number` | Minimum required memory to execute application GB | +| `minStorageGib` | `number` | Minimum required disk storage to execute tasks in GB | +| `minCpuThreads` | `number` | Minimum required CPU threads | +| `minCpuCores` | `number` | Minimum required CPU cores | + +#### Defined in + +[src/market/demand/options.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/options.ts#L6) + +___ + +### RuntimeDemandOptions + +Ƭ **RuntimeDemandOptions**: `Object` + +Specifies a set of options related to runtime configuration that will be used to form the demand + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `engine` | `string` | Type of engine required: vm, wasm, vm-nvidia, etc... | +| `capabilities` | `string`[] | Required providers capabilities to run application: example: ["vpn"] | + +#### Defined in + +[src/market/demand/options.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/options.ts#L20) + +___ + +### ManifestDemandOptions + +Ƭ **ManifestDemandOptions**: `Object` + +Specifies a set of options related to computation manifest that can be used to form the demand + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `manifest` | `string` | - | +| `manifestSig` | `string` | Signature of base64 encoded Computation Payload Manifest * | +| `manifestSigAlgorithm` | `string` | Algorithm of manifest signature, e.g. "sha256" * | +| `manifestCert` | `string` | Certificate - base64 encoded public certificate (DER or PEM) matching key used to generate signature * | + +#### Defined in + +[src/market/demand/options.ts:31](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/options.ts#L31) + +___ + +### ImageDemandOptions + +Ƭ **ImageDemandOptions**: `Object` + +Specifies a set of options related to the Golem VM Image (GVMI) that will be used to form the demand + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `imageUrl?` | `string` | If you want a provider to download the image from your local filesystem or a different registry than the default one, you can provide the image url here. Note that to use this option you need to also provide the image SHA3-224 hash. | +| `imageHash?` | `string` | finds package by its contents hash | +| `imageTag?` | `string` | finds package by registry tag | +| `useHttps?` | `boolean` | Force the image download url that will be passed to the provider to use HTTPS. This option is only relevant when you use `imageHash` or `imageTag` options. Default is false | + +#### Defined in + +[src/market/demand/options.ts:44](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/options.ts#L44) + +___ + +### WorkloadDemandDirectorConfigOptions + +Ƭ **WorkloadDemandDirectorConfigOptions**: [`RuntimeDemandOptions`](market_demand_options#runtimedemandoptions) & [`ResourceDemandOptions`](market_demand_options#resourcedemandoptions) & [`RequireAtLeastOne`](shared_utils_types#requireatleastone)\<[`ImageDemandOptions`](market_demand_options#imagedemandoptions) & [`ManifestDemandOptions`](market_demand_options#manifestdemandoptions), ``"imageHash"`` \| ``"imageTag"`` \| ``"imageUrl"`` \| ``"manifest"``\> + +#### Defined in + +[src/market/demand/options.ts:66](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/demand/options.ts#L66) diff --git a/src/pages/docs/golem-js/reference/modules/market_draft_offer_proposal_pool.md b/src/pages/docs/golem-js/reference/modules/market_draft_offer_proposal_pool.md new file mode 100644 index 000000000..5db0eeab9 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_draft_offer_proposal_pool.md @@ -0,0 +1,46 @@ +--- +title: "Module market/draft-offer-proposal-pool" +pageTitle: "Module market/draft-offer-proposal-pool - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/draft-offer-proposal-pool within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/draft-offer-proposal-pool + +## Table of contents + +### Classes + +- [DraftOfferProposalPool](../classes/market_draft_offer_proposal_pool.DraftOfferProposalPool) + +### Interfaces + +- [ProposalPoolOptions](../interfaces/market_draft_offer_proposal_pool.ProposalPoolOptions) +- [ProposalPoolEvents](../interfaces/market_draft_offer_proposal_pool.ProposalPoolEvents) + +### Type Aliases + +- [ProposalSelector](market_draft_offer_proposal_pool#proposalselector) + +## Type Aliases + +### ProposalSelector + +Ƭ **ProposalSelector**: (`proposals`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)[]) => [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) + +#### Type declaration + +▸ (`proposals`): [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `proposals` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)[] | + +##### Returns + +[`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) + +#### Defined in + +[src/market/draft-offer-proposal-pool.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/draft-offer-proposal-pool.ts#L9) diff --git a/src/pages/docs/golem-js/reference/modules/market_helpers.md b/src/pages/docs/golem-js/reference/modules/market_helpers.md index c7d8eb0a7..aed4d0d3a 100644 --- a/src/pages/docs/golem-js/reference/modules/market_helpers.md +++ b/src/pages/docs/golem-js/reference/modules/market_helpers.md @@ -30,4 +30,4 @@ An array with Golem Node IDs of the whitelisted providers. #### Defined in -[src/market/helpers.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/helpers.ts#L10) +[src/market/helpers.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/helpers.ts#L10) diff --git a/src/pages/docs/golem-js/reference/modules/market_market_module.md b/src/pages/docs/golem-js/reference/modules/market_market_module.md new file mode 100644 index 000000000..977680d85 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_market_module.md @@ -0,0 +1,44 @@ +--- +title: "Module market/market.module" +pageTitle: "Module market/market.module - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/market.module within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/market.module + +## Table of contents + +### Classes + +- [MarketModuleImpl](../classes/market_market_module.MarketModuleImpl) + +### Interfaces + +- [MarketOptions](../interfaces/market_market_module.MarketOptions) +- [MarketModule](../interfaces/market_market_module.MarketModule) +- [IDemandDirector](../interfaces/market_market_module.IDemandDirector) + +### Type Aliases + +- [DemandEngine](market_market_module#demandengine) +- [PricingOptions](market_market_module#pricingoptions) + +## Type Aliases + +### DemandEngine + +Ƭ **DemandEngine**: ``"vm"`` \| ``"vm-nvidia"`` \| ``"wasmtime"`` + +#### Defined in + +[src/market/market.module.ts:45](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L45) + +___ + +### PricingOptions + +Ƭ **PricingOptions**: \{ `model`: ``"linear"`` ; `maxStartPrice`: `number` ; `maxCpuPerHourPrice`: `number` ; `maxEnvPerHourPrice`: `number` } \| \{ `model`: ``"burn-rate"`` ; `avgGlmPerHour`: `number` } + +#### Defined in + +[src/market/market.module.ts:47](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/market.module.ts#L47) diff --git a/src/pages/docs/golem-js/reference/modules/market_proposal.md b/src/pages/docs/golem-js/reference/modules/market_proposal.md deleted file mode 100644 index 9f7a10807..000000000 --- a/src/pages/docs/golem-js/reference/modules/market_proposal.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "Module market/proposal" -pageTitle: "Module market/proposal - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module market/proposal within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: market/proposal - -## Table of contents - -### Classes - -- [Proposal](../classes/market_proposal.Proposal) - -### Interfaces - -- [ProposalDetails](../interfaces/market_proposal.ProposalDetails) - -### Type Aliases - -- [PricingInfo](market_proposal#pricinginfo) -- [ProposalProperties](market_proposal#proposalproperties) - -## Type Aliases - -### PricingInfo - -Ƭ **PricingInfo**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `cpuSec` | `number` | -| `envSec` | `number` | -| `start` | `number` | - -#### Defined in - -[src/market/proposal.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L8) - -___ - -### ProposalProperties - -Ƭ **ProposalProperties**: `Record`\<`string`, `string` \| `number` \| `string`[] \| `number`[] \| `boolean`\> & \{ `golem.activity.caps.transfer.protocol`: `string`[] ; `golem.com.payment.debit-notes.accept-timeout?`: `number` ; `golem.com.payment.platform.erc20-polygon-glm.address?`: `string` ; `golem.com.payment.platform.erc20-goerli-tglm.address?`: `string` ; `golem.com.payment.platform.erc20-mumbai-tglm.address?`: `string` ; `golem.com.pricing.model`: ``"linear"`` ; `golem.com.pricing.model.linear.coeffs`: `number`[] ; `golem.com.scheme`: `string` ; `golem.com.scheme.payu.debit-note.interval-sec??`: `number` ; `golem.com.scheme.payu.payment-timeout-sec??`: `number` ; `golem.com.usage.vector`: `string`[] ; `golem.inf.cpu.architecture`: `string` ; `golem.inf.cpu.brand`: `string` ; `golem.inf.cpu.capabilities`: `string`[] ; `golem.inf.cpu.cores`: `number` ; `golem.inf.cpu.model`: `string` ; `golem.inf.cpu.threads`: `number` ; `golem.inf.cpu.vendor`: `string`[] ; `golem.inf.mem.gib`: `number` ; `golem.inf.storage.gib`: `number` ; `golem.node.debug.subnet`: `string` ; `golem.node.id.name`: `string` ; `golem.node.net.is-public`: `boolean` ; `golem.runtime.capabilities`: `string`[] ; `golem.runtime.name`: `string` ; `golem.runtime.version`: `string` ; `golem.srv.caps.multi-activity`: `boolean` ; `golem.srv.caps.payload-manifest`: `boolean` } - -#### Defined in - -[src/market/proposal.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposal.ts#L15) diff --git a/src/pages/docs/golem-js/reference/modules/market_proposal_market_proposal.md b/src/pages/docs/golem-js/reference/modules/market_proposal_market_proposal.md new file mode 100644 index 000000000..36d95f879 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_proposal_market_proposal.md @@ -0,0 +1,17 @@ +--- +title: "Module market/proposal/market-proposal" +pageTitle: "Module market/proposal/market-proposal - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/proposal/market-proposal within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/proposal/market-proposal + +## Table of contents + +### Classes + +- [MarketProposal](../classes/market_proposal_market_proposal.MarketProposal) + +### Interfaces + +- [IProposalRepository](../interfaces/market_proposal_market_proposal.IProposalRepository) diff --git a/src/pages/docs/golem-js/reference/modules/market_proposal_market_proposal_event.md b/src/pages/docs/golem-js/reference/modules/market_proposal_market_proposal_event.md new file mode 100644 index 000000000..f26988694 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_proposal_market_proposal_event.md @@ -0,0 +1,80 @@ +--- +title: "Module market/proposal/market-proposal-event" +pageTitle: "Module market/proposal/market-proposal-event - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/proposal/market-proposal-event within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/proposal/market-proposal-event + +## Table of contents + +### Type Aliases + +- [OfferProposalReceivedEvent](market_proposal_market_proposal_event#offerproposalreceivedevent) +- [OfferCounterProposalRejectedEvent](market_proposal_market_proposal_event#offercounterproposalrejectedevent) +- [OfferPropertyQueryReceivedEvent](market_proposal_market_proposal_event#offerpropertyqueryreceivedevent) +- [MarketProposalEvent](market_proposal_market_proposal_event#marketproposalevent) + +## Type Aliases + +### OfferProposalReceivedEvent + +Ƭ **OfferProposalReceivedEvent**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `type` | ``"ProposalReceived"`` | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | +| `timestamp` | `Date` | + +#### Defined in + +[src/market/proposal/market-proposal-event.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal-event.ts#L4) + +___ + +### OfferCounterProposalRejectedEvent + +Ƭ **OfferCounterProposalRejectedEvent**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `type` | ``"ProposalRejected"`` | +| `counterProposal` | [`OfferCounterProposal`](../classes/market_proposal_offer_counter_proposal.OfferCounterProposal) | +| `reason` | `string` | +| `timestamp` | `Date` | + +#### Defined in + +[src/market/proposal/market-proposal-event.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal-event.ts#L10) + +___ + +### OfferPropertyQueryReceivedEvent + +Ƭ **OfferPropertyQueryReceivedEvent**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `type` | ``"PropertyQueryReceived"`` | +| `timestamp` | `Date` | + +#### Defined in + +[src/market/proposal/market-proposal-event.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal-event.ts#L17) + +___ + +### MarketProposalEvent + +Ƭ **MarketProposalEvent**: [`OfferProposalReceivedEvent`](market_proposal_market_proposal_event#offerproposalreceivedevent) \| [`OfferCounterProposalRejectedEvent`](market_proposal_market_proposal_event#offercounterproposalrejectedevent) \| [`OfferPropertyQueryReceivedEvent`](market_proposal_market_proposal_event#offerpropertyqueryreceivedevent) + +#### Defined in + +[src/market/proposal/market-proposal-event.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/market-proposal-event.ts#L22) diff --git a/src/pages/docs/golem-js/reference/modules/market_proposal_offer_counter_proposal.md b/src/pages/docs/golem-js/reference/modules/market_proposal_offer_counter_proposal.md new file mode 100644 index 000000000..f34427979 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_proposal_offer_counter_proposal.md @@ -0,0 +1,13 @@ +--- +title: "Module market/proposal/offer-counter-proposal" +pageTitle: "Module market/proposal/offer-counter-proposal - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/proposal/offer-counter-proposal within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/proposal/offer-counter-proposal + +## Table of contents + +### Classes + +- [OfferCounterProposal](../classes/market_proposal_offer_counter_proposal.OfferCounterProposal) diff --git a/src/pages/docs/golem-js/reference/modules/market_proposal_offer_proposal.md b/src/pages/docs/golem-js/reference/modules/market_proposal_offer_proposal.md new file mode 100644 index 000000000..2e4dacb4d --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_proposal_offer_proposal.md @@ -0,0 +1,82 @@ +--- +title: "Module market/proposal/offer-proposal" +pageTitle: "Module market/proposal/offer-proposal - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/proposal/offer-proposal within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/proposal/offer-proposal + +## Table of contents + +### Classes + +- [OfferProposal](../classes/market_proposal_offer_proposal.OfferProposal) + +### Type Aliases + +- [ProposalFilter](market_proposal_offer_proposal#proposalfilter) +- [PricingInfo](market_proposal_offer_proposal#pricinginfo) +- [ProposalState](market_proposal_offer_proposal#proposalstate) +- [ProposalDTO](market_proposal_offer_proposal#proposaldto) + +## Type Aliases + +### ProposalFilter + +Ƭ **ProposalFilter**: (`proposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)) => `boolean` + +#### Type declaration + +▸ (`proposal`): `boolean` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | + +##### Returns + +`boolean` + +#### Defined in + +[src/market/proposal/offer-proposal.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-proposal.ts#L8) + +___ + +### PricingInfo + +Ƭ **PricingInfo**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `cpuSec` | `number` | +| `envSec` | `number` | +| `start` | `number` | + +#### Defined in + +[src/market/proposal/offer-proposal.ts:10](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-proposal.ts#L10) + +___ + +### ProposalState + +Ƭ **ProposalState**: ``"Initial"`` \| ``"Draft"`` \| ``"Rejected"`` \| ``"Accepted"`` \| ``"Expired"`` + +#### Defined in + +[src/market/proposal/offer-proposal.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-proposal.ts#L16) + +___ + +### ProposalDTO + +Ƭ **ProposalDTO**: `Partial`\<\{ `transferProtocol`: `string`[] ; `cpuBrand`: `string` ; `cpuCapabilities`: `string`[] ; `cpuCores`: `number` ; `cpuThreads`: `number` ; `memory`: `number` ; `storage`: `number` ; `publicNet`: `boolean` ; `runtimeCapabilities`: `string`[] ; `runtimeName`: `string` ; `state`: [`ProposalState`](market_proposal_offer_proposal#proposalstate) }\> + +#### Defined in + +[src/market/proposal/offer-proposal.ts:18](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/offer-proposal.ts#L18) diff --git a/src/pages/docs/golem-js/reference/modules/market_proposal_proposal_properties.md b/src/pages/docs/golem-js/reference/modules/market_proposal_proposal_properties.md new file mode 100644 index 000000000..7a4c77390 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/market_proposal_proposal_properties.md @@ -0,0 +1,205 @@ +--- +title: "Module market/proposal/proposal-properties" +pageTitle: "Module market/proposal/proposal-properties - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/proposal/proposal-properties within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: market/proposal/proposal-properties + +## Table of contents + +### Type Aliases + +- [GenericGolemProtocolPropertyType](market_proposal_proposal_properties#genericgolemprotocolpropertytype) +- [Gap3MidAgreementPaymentProps](market_proposal_proposal_properties#gap3midagreementpaymentprops) +- [StandardCommonProps](market_proposal_proposal_properties#standardcommonprops) +- [StandardNodeProps](market_proposal_proposal_properties#standardnodeprops) +- [StandardCommercialProps](market_proposal_proposal_properties#standardcommercialprops) +- [StandardServiceProps](market_proposal_proposal_properties#standardserviceprops) +- [StandardComputationPlatformProps](market_proposal_proposal_properties#standardcomputationplatformprops) +- [ProposalProperties](market_proposal_proposal_properties#proposalproperties) + +## Type Aliases + +### GenericGolemProtocolPropertyType + +Ƭ **GenericGolemProtocolPropertyType**: `Record`\<`string`, `string` \| `number` \| `string`[] \| `number`[] \| `boolean`\> + +Describes the type representing properties from the perspective of Golem Market Protocol + +Golem Protocol defines "properties" as a flat list of key/value pairs. + +The protocol itself does not dictate what properties should or shouldn't be defined. Such details +are left for the Provider and Requestor to agree upon outside the protocol. + +The mentioned agreements can be done in a P2P manner between the involved entities, or both parties +can decide to adhere to a specific "standard" which determines which properties are "mandatory". + +Specific property definitions and requirements were provided in Golem _standards_ and _architecture proposals_. + +**`Link`** + +https://github.com/golemfactory/golem-architecture/tree/master/standards Golem standards + +**`Link`** + +https://github.com/golemfactory/golem-architecture/tree/master/gaps Golem Architecture Proposals + +#### Defined in + +[src/market/proposal/proposal-properties.ts:17](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/proposal-properties.ts#L17) + +___ + +### Gap3MidAgreementPaymentProps + +Ƭ **Gap3MidAgreementPaymentProps**: `Object` + +Properties defined by GAP-3 + +**`Link`** + +https://github.com/golemfactory/golem-architecture/blob/master/gaps/gap-3_mid_agreement_payments/gap-3_mid_agreement_payments + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `golem.com.scheme.payu.debit-note.interval-sec??` | `number` | +| `golem.com.scheme.payu.payment-timeout-sec??` | `number` | + +#### Defined in + +[src/market/proposal/proposal-properties.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/proposal-properties.ts#L23) + +___ + +### StandardCommonProps + +Ƭ **StandardCommonProps**: `Object` + +**`Link`** + +https://github.com/golemfactory/golem-architecture/tree/master/standards/0-commons + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `golem.activity.caps.transfer.protocol` | (``"http"`` \| ``"https"`` \| ``"gftp"``)[] | +| `golem.inf.cpu.architecture` | `string` | +| `golem.inf.cpu.brand` | `string` | +| `golem.inf.cpu.capabilities` | `string`[] | +| `golem.inf.cpu.cores` | `number` | +| `golem.inf.cpu.model` | `string` | +| `golem.inf.cpu.threads` | `number` | +| `golem.inf.cpu.vendor` | `string` | +| `golem.inf.mem.gib` | `number` | +| `golem.inf.storage.gib` | `number` | +| `golem.runtime.capabilities` | `string`[] | +| `golem.runtime.name` | `string` | +| `golem.runtime.version` | `string` | + +#### Defined in + +[src/market/proposal/proposal-properties.ts:30](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/proposal-properties.ts#L30) + +___ + +### StandardNodeProps + +Ƭ **StandardNodeProps**: `Object` + +https://github.com/golemfactory/golem-architecture/blob/master/standards/2-service/srv + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `golem.node.id.name` | `string` | - | +| `golem.node.geo.country_code?` | `string` | **`Deprecated`** Do not rely on this, it's mentioned in the standard, but not implemented FIXME #yagna | + +#### Defined in + +[src/market/proposal/proposal-properties.ts:49](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/proposal-properties.ts#L49) + +___ + +### StandardCommercialProps + +Ƭ **StandardCommercialProps**: `Object` + +**`Link`** + +https://github.com/golemfactory/golem-architecture/blob/master/standards/3-commercial/com + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `golem.com.payment.debit-notes.accept-timeout?` | `number` | - | +| `golem.com.payment.chosen-platform` | `string` | **`Example`** ```ts "erc20-polygon-glm" ``` | +| `golem.com.payment.platform.erc20-polygon-glm.address?` | `string` | - | +| `golem.com.payment.platform.erc20-holesky-tglm.address?` | `string` | - | +| `golem.com.payment.platform.erc20-mumbai-tglm.address?` | `string` | - | +| `golem.com.payment.protocol.version` | `number` | - | +| `golem.com.scheme` | `string` | **`Example`** ```ts payu ``` | +| `golem.com.scheme.payu.interval_sec?` | `number` | **`Deprecated`** replaced by `golem.com.scheme.payu.debit-note.interval-sec?` in GAP-3 | +| `golem.com.pricing.model` | ``"linear"`` | - | +| `golem.com.pricing.model.linear.coeffs` | `number`[] | - | +| `golem.com.usage.vector` | `string`[] | - | + +#### Defined in + +[src/market/proposal/proposal-properties.ts:58](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/proposal-properties.ts#L58) + +___ + +### StandardServiceProps + +Ƭ **StandardServiceProps**: `Object` + +**`Link`** + +https://github.com/golemfactory/golem-architecture/blob/master/standards/2-service/srv + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `golem.srv.caps.multi-activity` | `boolean` | + +#### Defined in + +[src/market/proposal/proposal-properties.ts:78](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/proposal-properties.ts#L78) + +___ + +### StandardComputationPlatformProps + +Ƭ **StandardComputationPlatformProps**: `Object` + +**`Link`** + +https://github.com/golemfactory/golem-architecture/blob/master/standards/2-service/srv/comp + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `golem.srv.comp.expiration` | `number` | +| `golem.srv.comp.task_package` | `string` | + +#### Defined in + +[src/market/proposal/proposal-properties.ts:85](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/proposal-properties.ts#L85) + +___ + +### ProposalProperties + +Ƭ **ProposalProperties**: [`GenericGolemProtocolPropertyType`](market_proposal_proposal_properties#genericgolemprotocolpropertytype) & [`StandardCommonProps`](market_proposal_proposal_properties#standardcommonprops) & [`StandardNodeProps`](market_proposal_proposal_properties#standardnodeprops) & [`StandardCommercialProps`](market_proposal_proposal_properties#standardcommercialprops) & [`StandardServiceProps`](market_proposal_proposal_properties#standardserviceprops) & [`StandardComputationPlatformProps`](market_proposal_proposal_properties#standardcomputationplatformprops) & [`Gap3MidAgreementPaymentProps`](market_proposal_proposal_properties#gap3midagreementpaymentprops) & `Partial`\<\{ `golem.node.debug.subnet`: `string` ; `golem.node.net.is-public`: `boolean` ; `golem.srv.caps.payload-manifest`: `boolean` }\> + +#### Defined in + +[src/market/proposal/proposal-properties.ts:90](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/proposal-properties.ts#L90) diff --git a/src/pages/docs/golem-js/reference/modules/market_proposals_batch.md b/src/pages/docs/golem-js/reference/modules/market_proposal_proposals_batch.md similarity index 51% rename from src/pages/docs/golem-js/reference/modules/market_proposals_batch.md rename to src/pages/docs/golem-js/reference/modules/market_proposal_proposals_batch.md index 9308fabaa..5087653c6 100644 --- a/src/pages/docs/golem-js/reference/modules/market_proposals_batch.md +++ b/src/pages/docs/golem-js/reference/modules/market_proposal_proposals_batch.md @@ -1,20 +1,20 @@ --- -title: "Module market/proposals_batch" -pageTitle: "Module market/proposals_batch - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module market/proposals_batch within the golem-js SDK for the Golem Network." +title: "Module market/proposal/proposals_batch" +pageTitle: "Module market/proposal/proposals_batch - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module market/proposal/proposals_batch within the golem-js SDK for the Golem Network." type: "JS API Reference" --- -# Module: market/proposals\_batch +# Module: market/proposal/proposals\_batch ## Table of contents ### Classes -- [ProposalsBatch](../classes/market_proposals_batch.ProposalsBatch) +- [ProposalsBatch](../classes/market_proposal_proposals_batch.ProposalsBatch) ### Type Aliases -- [ProposalsBatchOptions](market_proposals_batch#proposalsbatchoptions) +- [ProposalsBatchOptions](market_proposal_proposals_batch#proposalsbatchoptions) ## Type Aliases @@ -31,4 +31,4 @@ type: "JS API Reference" #### Defined in -[src/market/proposals_batch.ts:4](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/proposals_batch.ts#L4) +[src/market/proposal/proposals_batch.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/proposal/proposals_batch.ts#L4) diff --git a/src/pages/docs/golem-js/reference/modules/market_service.md b/src/pages/docs/golem-js/reference/modules/market_service.md deleted file mode 100644 index 3d53bd6a6..000000000 --- a/src/pages/docs/golem-js/reference/modules/market_service.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: "Module market/service" -pageTitle: "Module market/service - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module market/service within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: market/service - -## Table of contents - -### Interfaces - -- [MarketOptions](../interfaces/market_service.MarketOptions) - -### Type Aliases - -- [ProposalFilter](market_service#proposalfilter) - -## Type Aliases - -### ProposalFilter - -Ƭ **ProposalFilter**: (`proposal`: [`Proposal`](../classes/market_proposal.Proposal)) => `boolean` - -#### Type declaration - -▸ (`proposal`): `boolean` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `proposal` | [`Proposal`](../classes/market_proposal.Proposal) | - -##### Returns - -`boolean` - -#### Defined in - -[src/market/service.ts:11](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/service.ts#L11) diff --git a/src/pages/docs/golem-js/reference/modules/market_strategy.md b/src/pages/docs/golem-js/reference/modules/market_strategy.md index 21d1363e8..cdccfa023 100644 --- a/src/pages/docs/golem-js/reference/modules/market_strategy.md +++ b/src/pages/docs/golem-js/reference/modules/market_strategy.md @@ -39,7 +39,7 @@ type: "JS API Reference" #### Defined in -[src/market/strategy.ts:30](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/strategy.ts#L30) +[src/market/strategy.ts:30](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/strategy.ts#L30) ## Functions @@ -61,13 +61,13 @@ Default Proposal filter that accept all proposal coming from the market #### Defined in -[src/market/strategy.ts:4](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/strategy.ts#L4) +[src/market/strategy.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/strategy.ts#L4) ___ ### disallowProvidersById -▸ **disallowProvidersById**(`providerIds`): (`proposal`: [`Proposal`](../classes/market_proposal.Proposal)) => `boolean` +▸ **disallowProvidersById**(`providerIds`): (`proposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)) => `boolean` Proposal filter blocking every offer coming from a provider whose id is in the array @@ -87,7 +87,7 @@ Proposal filter blocking every offer coming from a provider whose id is in the a | Name | Type | | :------ | :------ | -| `proposal` | [`Proposal`](../classes/market_proposal.Proposal) | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | ##### Returns @@ -95,13 +95,13 @@ Proposal filter blocking every offer coming from a provider whose id is in the a #### Defined in -[src/market/strategy.ts:7](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/strategy.ts#L7) +[src/market/strategy.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/strategy.ts#L7) ___ ### disallowProvidersByName -▸ **disallowProvidersByName**(`providerNames`): (`proposal`: [`Proposal`](../classes/market_proposal.Proposal)) => `boolean` +▸ **disallowProvidersByName**(`providerNames`): (`proposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)) => `boolean` Proposal filter blocking every offer coming from a provider whose name is in the array @@ -121,7 +121,7 @@ Proposal filter blocking every offer coming from a provider whose name is in the | Name | Type | | :------ | :------ | -| `proposal` | [`Proposal`](../classes/market_proposal.Proposal) | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | ##### Returns @@ -129,13 +129,13 @@ Proposal filter blocking every offer coming from a provider whose name is in the #### Defined in -[src/market/strategy.ts:11](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/strategy.ts#L11) +[src/market/strategy.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/strategy.ts#L11) ___ ### disallowProvidersByNameRegex -▸ **disallowProvidersByNameRegex**(`regexp`): (`proposal`: [`Proposal`](../classes/market_proposal.Proposal)) => `boolean` +▸ **disallowProvidersByNameRegex**(`regexp`): (`proposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)) => `boolean` Proposal filter blocking every offer coming from a provider whose name match to the regexp @@ -155,7 +155,7 @@ Proposal filter blocking every offer coming from a provider whose name match to | Name | Type | | :------ | :------ | -| `proposal` | [`Proposal`](../classes/market_proposal.Proposal) | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | ##### Returns @@ -163,13 +163,13 @@ Proposal filter blocking every offer coming from a provider whose name match to #### Defined in -[src/market/strategy.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/strategy.ts#L15) +[src/market/strategy.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/strategy.ts#L15) ___ ### allowProvidersById -▸ **allowProvidersById**(`providerIds`): (`proposal`: [`Proposal`](../classes/market_proposal.Proposal)) => `boolean` +▸ **allowProvidersById**(`providerIds`): (`proposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)) => `boolean` Proposal filter that only allows offers from a provider whose id is in the array @@ -189,7 +189,7 @@ Proposal filter that only allows offers from a provider whose id is in the array | Name | Type | | :------ | :------ | -| `proposal` | [`Proposal`](../classes/market_proposal.Proposal) | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | ##### Returns @@ -197,13 +197,13 @@ Proposal filter that only allows offers from a provider whose id is in the array #### Defined in -[src/market/strategy.ts:19](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/strategy.ts#L19) +[src/market/strategy.ts:19](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/strategy.ts#L19) ___ ### allowProvidersByName -▸ **allowProvidersByName**(`providerNames`): (`proposal`: [`Proposal`](../classes/market_proposal.Proposal)) => `boolean` +▸ **allowProvidersByName**(`providerNames`): (`proposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)) => `boolean` Proposal filter that only allows offers from a provider whose name is in the array @@ -223,7 +223,7 @@ Proposal filter that only allows offers from a provider whose name is in the arr | Name | Type | | :------ | :------ | -| `proposal` | [`Proposal`](../classes/market_proposal.Proposal) | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | ##### Returns @@ -231,13 +231,13 @@ Proposal filter that only allows offers from a provider whose name is in the arr #### Defined in -[src/market/strategy.ts:23](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/strategy.ts#L23) +[src/market/strategy.ts:23](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/strategy.ts#L23) ___ ### allowProvidersByNameRegex -▸ **allowProvidersByNameRegex**(`regexp`): (`proposal`: [`Proposal`](../classes/market_proposal.Proposal)) => `boolean` +▸ **allowProvidersByNameRegex**(`regexp`): (`proposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)) => `boolean` Proposal filter that only allows offers from a provider whose name match to the regexp @@ -257,7 +257,7 @@ Proposal filter that only allows offers from a provider whose name match to the | Name | Type | | :------ | :------ | -| `proposal` | [`Proposal`](../classes/market_proposal.Proposal) | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | ##### Returns @@ -265,13 +265,13 @@ Proposal filter that only allows offers from a provider whose name match to the #### Defined in -[src/market/strategy.ts:27](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/strategy.ts#L27) +[src/market/strategy.ts:27](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/strategy.ts#L27) ___ ### limitPriceFilter -▸ **limitPriceFilter**(`priceLimits`): (`proposal`: [`Proposal`](../classes/market_proposal.Proposal)) => `boolean` +▸ **limitPriceFilter**(`priceLimits`): (`proposal`: [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal)) => `boolean` Proposal filter only allowing offers that do not exceed the defined usage @@ -291,7 +291,7 @@ Proposal filter only allowing offers that do not exceed the defined usage | Name | Type | | :------ | :------ | -| `proposal` | [`Proposal`](../classes/market_proposal.Proposal) | +| `proposal` | [`OfferProposal`](../classes/market_proposal_offer_proposal.OfferProposal) | ##### Returns @@ -299,4 +299,4 @@ Proposal filter only allowing offers that do not exceed the defined usage #### Defined in -[src/market/strategy.ts:43](https://github.com/golemfactory/golem-js/blob/7cee55b/src/market/strategy.ts#L43) +[src/market/strategy.ts:43](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/market/strategy.ts#L43) diff --git a/src/pages/docs/golem-js/reference/modules/network_api.md b/src/pages/docs/golem-js/reference/modules/network_api.md new file mode 100644 index 000000000..7a648d5e5 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/network_api.md @@ -0,0 +1,14 @@ +--- +title: "Module network/api" +pageTitle: "Module network/api - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module network/api within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: network/api + +## Table of contents + +### Interfaces + +- [NetworkEvents](../interfaces/network_api.NetworkEvents) +- [INetworkApi](../interfaces/network_api.INetworkApi) diff --git a/src/pages/docs/golem-js/reference/modules/network_network.md b/src/pages/docs/golem-js/reference/modules/network_network.md index cc3de72c5..b7ad4096b 100644 --- a/src/pages/docs/golem-js/reference/modules/network_network.md +++ b/src/pages/docs/golem-js/reference/modules/network_network.md @@ -8,6 +8,14 @@ type: "JS API Reference" ## Table of contents +### Enumerations + +- [NetworkState](../enums/network_network.NetworkState) + +### Classes + +- [Network](../classes/network_network.Network) + ### Interfaces - [NetworkInfo](../interfaces/network_network.NetworkInfo) diff --git a/src/pages/docs/golem-js/reference/modules/network_network_module.md b/src/pages/docs/golem-js/reference/modules/network_network_module.md new file mode 100644 index 000000000..0aa2910cd --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/network_network_module.md @@ -0,0 +1,18 @@ +--- +title: "Module network/network.module" +pageTitle: "Module network/network.module - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module network/network.module within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: network/network.module + +## Table of contents + +### Classes + +- [NetworkModuleImpl](../classes/network_network_module.NetworkModuleImpl) + +### Interfaces + +- [NetworkOptions](../interfaces/network_network_module.NetworkOptions) +- [NetworkModule](../interfaces/network_network_module.NetworkModule) diff --git a/src/pages/docs/golem-js/reference/modules/network_service.md b/src/pages/docs/golem-js/reference/modules/network_service.md deleted file mode 100644 index 267679788..000000000 --- a/src/pages/docs/golem-js/reference/modules/network_service.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: "Module network/service" -pageTitle: "Module network/service - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module network/service within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: network/service - -## Table of contents - -### Type Aliases - -- [NetworkServiceOptions](network_service#networkserviceoptions) - -## Type Aliases - -### NetworkServiceOptions - -Ƭ **NetworkServiceOptions**: `Omit`\<`NetworkOptions`, ``"networkOwnerId"``\> - -#### Defined in - -[src/network/service.ts:7](https://github.com/golemfactory/golem-js/blob/7cee55b/src/network/service.ts#L7) diff --git a/src/pages/docs/golem-js/reference/modules/network_tcpProxy.md b/src/pages/docs/golem-js/reference/modules/network_tcpProxy.md new file mode 100644 index 000000000..d6e334fd9 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/network_tcpProxy.md @@ -0,0 +1,18 @@ +--- +title: "Module network/tcpProxy" +pageTitle: "Module network/tcpProxy - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module network/tcpProxy within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: network/tcpProxy + +## Table of contents + +### Classes + +- [TcpProxy](../classes/network_tcpProxy.TcpProxy) + +### Interfaces + +- [TcpProxyEvents](../interfaces/network_tcpProxy.TcpProxyEvents) +- [TcpProxyOptions](../interfaces/network_tcpProxy.TcpProxyOptions) diff --git a/src/pages/docs/golem-js/reference/modules/package_package.md b/src/pages/docs/golem-js/reference/modules/package_package.md deleted file mode 100644 index ba6aa90f2..000000000 --- a/src/pages/docs/golem-js/reference/modules/package_package.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: "Module package/package" -pageTitle: "Module package/package - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module package/package within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: package/package - -## Table of contents - -### Classes - -- [Package](../classes/package_package.Package) - -### Interfaces - -- [PackageDetails](../interfaces/package_package.PackageDetails) - -### Type Aliases - -- [AllPackageOptions](package_package#allpackageoptions) -- [PackageOptions](package_package#packageoptions) - -## Type Aliases - -### AllPackageOptions - -Ƭ **AllPackageOptions**: `Object` - -#### Type declaration - -| Name | Type | Description | -| :------ | :------ | :------ | -| `engine?` | `string` | Type of engine required: vm, emscripten, sgx, sgx-js, sgx-wasm, sgx-wasi | -| `minMemGib?` | `number` | Minimum required memory to execute application GB | -| `minStorageGib?` | `number` | Minimum required disk storage to execute tasks in GB | -| `minCpuThreads?` | `number` | Minimum required CPU threads | -| `minCpuCores?` | `number` | Minimum required CPU cores | -| `capabilities?` | `string`[] | Required providers capabilities to run application | -| `imageHash?` | `string` | finds package by its contents hash | -| `imageTag?` | `string` | finds package by registry tag | -| `manifest?` | `string` | - | -| `manifestSig?` | `string` | Signature of base64 encoded Computation Payload Manifest * | -| `manifestSigAlgorithm?` | `string` | Algorithm of manifest signature, e.g. "sha256" * | -| `manifestCert?` | `string` | Certificate - base64 encoded public certificate (DER or PEM) matching key used to generate signature * | -| `logger?` | [`Logger`](../interfaces/utils_logger_logger.Logger) | - | - -#### Defined in - -[src/package/package.ts:7](https://github.com/golemfactory/golem-js/blob/7cee55b/src/package/package.ts#L7) - -___ - -### PackageOptions - -Ƭ **PackageOptions**: [`RequireAtLeastOne`](utils_types#requireatleastone)\<[`AllPackageOptions`](package_package#allpackageoptions), ``"imageHash"`` \| ``"imageTag"`` \| ``"manifest"``\> - -#### Defined in - -[src/package/package.ts:34](https://github.com/golemfactory/golem-js/blob/7cee55b/src/package/package.ts#L34) diff --git a/src/pages/docs/golem-js/reference/modules/payment_BaseDocument.md b/src/pages/docs/golem-js/reference/modules/payment_BaseDocument.md new file mode 100644 index 000000000..d030eba63 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/payment_BaseDocument.md @@ -0,0 +1,17 @@ +--- +title: "Module payment/BaseDocument" +pageTitle: "Module payment/BaseDocument - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module payment/BaseDocument within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: payment/BaseDocument + +## Table of contents + +### Classes + +- [BaseDocument](../classes/payment_BaseDocument.BaseDocument) + +### Interfaces + +- [BaseModel](../interfaces/payment_BaseDocument.BaseModel) diff --git a/src/pages/docs/golem-js/reference/modules/payment_InvoiceProcessor.md b/src/pages/docs/golem-js/reference/modules/payment_InvoiceProcessor.md index d923fabf1..d9dad7607 100644 --- a/src/pages/docs/golem-js/reference/modules/payment_InvoiceProcessor.md +++ b/src/pages/docs/golem-js/reference/modules/payment_InvoiceProcessor.md @@ -20,8 +20,8 @@ type: "JS API Reference" ### InvoiceAcceptResult -Ƭ **InvoiceAcceptResult**: \{ `invoiceId`: `string` ; `allocation`: `Allocation` ; `success`: ``true`` ; `amount`: `string` ; `dryRun`: `boolean` } \| \{ `invoiceId`: `string` ; `allocation`: `Allocation` ; `success`: ``false`` ; `amount`: `string` ; `reason`: `unknown` ; `dryRun`: `boolean` } +Ƭ **InvoiceAcceptResult**: \{ `invoiceId`: `string` ; `allocation`: `PaymentApi.AllocationDTO` ; `success`: ``true`` ; `amount`: `string` ; `dryRun`: `boolean` } \| \{ `invoiceId`: `string` ; `allocation`: `PaymentApi.AllocationDTO` ; `success`: ``false`` ; `amount`: `string` ; `reason`: `unknown` ; `dryRun`: `boolean` } #### Defined in -[src/payment/InvoiceProcessor.ts:6](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/InvoiceProcessor.ts#L6) +[src/payment/InvoiceProcessor.ts:5](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/InvoiceProcessor.ts#L5) diff --git a/src/pages/docs/golem-js/reference/modules/payment_PayerDetails.md b/src/pages/docs/golem-js/reference/modules/payment_PayerDetails.md new file mode 100644 index 000000000..1ce8127eb --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/payment_PayerDetails.md @@ -0,0 +1,13 @@ +--- +title: "Module payment/PayerDetails" +pageTitle: "Module payment/PayerDetails - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module payment/PayerDetails within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: payment/PayerDetails + +## Table of contents + +### Classes + +- [PayerDetails](../classes/payment_PayerDetails.PayerDetails) diff --git a/src/pages/docs/golem-js/reference/modules/payment_agreement_payment_process.md b/src/pages/docs/golem-js/reference/modules/payment_agreement_payment_process.md index 9d7d39306..ebd4273df 100644 --- a/src/pages/docs/golem-js/reference/modules/payment_agreement_payment_process.md +++ b/src/pages/docs/golem-js/reference/modules/payment_agreement_payment_process.md @@ -11,3 +11,68 @@ type: "JS API Reference" ### Classes - [AgreementPaymentProcess](../classes/payment_agreement_payment_process.AgreementPaymentProcess) + +### Interfaces + +- [PaymentProcessOptions](../interfaces/payment_agreement_payment_process.PaymentProcessOptions) + +### Type Aliases + +- [DebitNoteFilter](payment_agreement_payment_process#debitnotefilter) +- [InvoiceFilter](payment_agreement_payment_process#invoicefilter) + +## Type Aliases + +### DebitNoteFilter + +Ƭ **DebitNoteFilter**: (`debitNote`: [`DebitNote`](../classes/payment_debit_note.DebitNote), `context`: \{ `agreement`: [`Agreement`](../classes/market_agreement_agreement.Agreement) ; `allocation`: [`Allocation`](../classes/payment_allocation.Allocation) ; `demand`: [`Demand`](../classes/market_demand_demand.Demand) }) => `Promise`\<`boolean`\> \| `boolean` + +#### Type declaration + +▸ (`debitNote`, `context`): `Promise`\<`boolean`\> \| `boolean` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `debitNote` | [`DebitNote`](../classes/payment_debit_note.DebitNote) | +| `context` | `Object` | +| `context.agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | +| `context.allocation` | [`Allocation`](../classes/payment_allocation.Allocation) | +| `context.demand` | [`Demand`](../classes/market_demand_demand.Demand) | + +##### Returns + +`Promise`\<`boolean`\> \| `boolean` + +#### Defined in + +[src/payment/agreement_payment_process.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L15) + +___ + +### InvoiceFilter + +Ƭ **InvoiceFilter**: (`invoice`: [`Invoice`](../classes/payment_invoice.Invoice), `context`: \{ `agreement`: [`Agreement`](../classes/market_agreement_agreement.Agreement) ; `allocation`: [`Allocation`](../classes/payment_allocation.Allocation) ; `demand`: [`Demand`](../classes/market_demand_demand.Demand) }) => `Promise`\<`boolean`\> \| `boolean` + +#### Type declaration + +▸ (`invoice`, `context`): `Promise`\<`boolean`\> \| `boolean` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `invoice` | [`Invoice`](../classes/payment_invoice.Invoice) | +| `context` | `Object` | +| `context.agreement` | [`Agreement`](../classes/market_agreement_agreement.Agreement) | +| `context.allocation` | [`Allocation`](../classes/payment_allocation.Allocation) | +| `context.demand` | [`Demand`](../classes/market_demand_demand.Demand) | + +##### Returns + +`Promise`\<`boolean`\> \| `boolean` + +#### Defined in + +[src/payment/agreement_payment_process.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/agreement_payment_process.ts#L24) diff --git a/src/pages/docs/golem-js/reference/modules/payment_allocation.md b/src/pages/docs/golem-js/reference/modules/payment_allocation.md new file mode 100644 index 000000000..1dd0ce212 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/payment_allocation.md @@ -0,0 +1,17 @@ +--- +title: "Module payment/allocation" +pageTitle: "Module payment/allocation - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module payment/allocation within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: payment/allocation + +## Table of contents + +### Classes + +- [Allocation](../classes/payment_allocation.Allocation) + +### Interfaces + +- [AllocationOptions](../interfaces/payment_allocation.AllocationOptions) diff --git a/src/pages/docs/golem-js/reference/modules/payment_api.md b/src/pages/docs/golem-js/reference/modules/payment_api.md new file mode 100644 index 000000000..3bdeb7168 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/payment_api.md @@ -0,0 +1,70 @@ +--- +title: "Module payment/api" +pageTitle: "Module payment/api - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module payment/api within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: payment/api + +## Table of contents + +### Interfaces + +- [IPaymentApi](../interfaces/payment_api.IPaymentApi) + +### Type Aliases + +- [PaymentEvents](payment_api#paymentevents) +- [CreateAllocationParams](payment_api#createallocationparams) + +## Type Aliases + +### PaymentEvents + +Ƭ **PaymentEvents**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `allocationCreated` | (`allocation`: [`Allocation`](../classes/payment_allocation.Allocation)) => `void` | +| `errorCreatingAllocation` | (`error`: `Error`) => `void` | +| `allocationReleased` | (`allocation`: [`Allocation`](../classes/payment_allocation.Allocation)) => `void` | +| `errorReleasingAllocation` | (`allocation`: [`Allocation`](../classes/payment_allocation.Allocation), `error`: `Error`) => `void` | +| `allocationAmended` | (`allocation`: [`Allocation`](../classes/payment_allocation.Allocation)) => `void` | +| `errorAmendingAllocation` | (`allocation`: [`Allocation`](../classes/payment_allocation.Allocation), `error`: `Error`) => `void` | +| `invoiceReceived` | (`invoice`: [`Invoice`](../classes/payment_invoice.Invoice)) => `void` | +| `debitNoteReceived` | (`debitNote`: [`DebitNote`](../classes/payment_debit_note.DebitNote)) => `void` | +| `invoiceAccepted` | (`invoice`: [`Invoice`](../classes/payment_invoice.Invoice)) => `void` | +| `invoiceRejected` | (`invoice`: [`Invoice`](../classes/payment_invoice.Invoice)) => `void` | +| `errorAcceptingInvoice` | (`invoice`: [`Invoice`](../classes/payment_invoice.Invoice), `error`: `Error`) => `void` | +| `errorRejectingInvoice` | (`invoice`: [`Invoice`](../classes/payment_invoice.Invoice), `error`: `Error`) => `void` | +| `debitNoteAccepted` | (`debitNote`: [`DebitNote`](../classes/payment_debit_note.DebitNote)) => `void` | +| `debitNoteRejected` | (`debitNote`: [`DebitNote`](../classes/payment_debit_note.DebitNote)) => `void` | +| `errorAcceptingDebitNote` | (`debitNote`: [`DebitNote`](../classes/payment_debit_note.DebitNote), `error`: `Error`) => `void` | +| `errorRejectingDebitNote` | (`debitNote`: [`DebitNote`](../classes/payment_debit_note.DebitNote), `error`: `Error`) => `void` | + +#### Defined in + +[src/payment/api.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L6) + +___ + +### CreateAllocationParams + +Ƭ **CreateAllocationParams**: `Object` + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `budget` | `number` | How much to allocate | +| `expirationSec` | `number` | How long the allocation should be valid | +| `paymentPlatform?` | `string` | Optionally override the payment platform to use for this allocation | +| `deposit?` | \{ `contract`: `string` ; `id`: `string` } | Optionally provide a deposit to be used for the allocation, instead of using funds from the yagna wallet. Deposit is a way to pay for the computation using someone else's funds. The other party has to call the `createDeposit` method on the `LockPayment` smart contract and provide the deposit ID. | +| `deposit.contract` | `string` | Address of the smart contract that holds the deposit. | +| `deposit.id` | `string` | ID of the deposit, obtained by calling the `createDeposit` method on the smart contract. | + +#### Defined in + +[src/payment/api.ts:59](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/api.ts#L59) diff --git a/src/pages/docs/golem-js/reference/modules/payment_debit_note.md b/src/pages/docs/golem-js/reference/modules/payment_debit_note.md index 5af49d32d..663145963 100644 --- a/src/pages/docs/golem-js/reference/modules/payment_debit_note.md +++ b/src/pages/docs/golem-js/reference/modules/payment_debit_note.md @@ -8,20 +8,10 @@ type: "JS API Reference" ## Table of contents -### Interfaces - -- [DebitNoteDTO](../interfaces/payment_debit_note.DebitNoteDTO) - -### Type Aliases - -- [InvoiceOptions](payment_debit_note#invoiceoptions) +### Classes -## Type Aliases +- [DebitNote](../classes/payment_debit_note.DebitNote) -### InvoiceOptions - -Ƭ **InvoiceOptions**: [`BasePaymentOptions`](../interfaces/payment_config.BasePaymentOptions) - -#### Defined in +### Interfaces -[src/payment/debit_note.ts:11](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/debit_note.ts#L11) +- [IDebitNoteRepository](../interfaces/payment_debit_note.IDebitNoteRepository) diff --git a/src/pages/docs/golem-js/reference/modules/payment_invoice.md b/src/pages/docs/golem-js/reference/modules/payment_invoice.md index 305bb711e..113cd7c1c 100644 --- a/src/pages/docs/golem-js/reference/modules/payment_invoice.md +++ b/src/pages/docs/golem-js/reference/modules/payment_invoice.md @@ -8,9 +8,13 @@ type: "JS API Reference" ## Table of contents +### Classes + +- [Invoice](../classes/payment_invoice.Invoice) + ### Interfaces -- [InvoiceDTO](../interfaces/payment_invoice.InvoiceDTO) +- [IInvoiceRepository](../interfaces/payment_invoice.IInvoiceRepository) ### Type Aliases @@ -24,4 +28,4 @@ type: "JS API Reference" #### Defined in -[src/payment/invoice.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/invoice.ts#L10) +[src/payment/invoice.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/invoice.ts#L7) diff --git a/src/pages/docs/golem-js/reference/modules/payment_payment_module.md b/src/pages/docs/golem-js/reference/modules/payment_payment_module.md new file mode 100644 index 000000000..ca9bb5b1d --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/payment_payment_module.md @@ -0,0 +1,18 @@ +--- +title: "Module payment/payment.module" +pageTitle: "Module payment/payment.module - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module payment/payment.module within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: payment/payment.module + +## Table of contents + +### Classes + +- [PaymentModuleImpl](../classes/payment_payment_module.PaymentModuleImpl) + +### Interfaces + +- [PaymentModuleOptions](../interfaces/payment_payment_module.PaymentModuleOptions) +- [PaymentModule](../interfaces/payment_payment_module.PaymentModule) diff --git a/src/pages/docs/golem-js/reference/modules/payment_payments.md b/src/pages/docs/golem-js/reference/modules/payment_payments.md deleted file mode 100644 index 40d76e053..000000000 --- a/src/pages/docs/golem-js/reference/modules/payment_payments.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "Module payment/payments" -pageTitle: "Module payment/payments - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module payment/payments within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: payment/payments - -## Table of contents - -### Classes - -- [Payments](../classes/payment_payments.Payments) - -### Interfaces - -- [PaymentOptions](../interfaces/payment_payments.PaymentOptions) - -### Variables - -- [PAYMENT\_EVENT\_TYPE](payment_payments#payment_event_type) - -## Variables - -### PAYMENT\_EVENT\_TYPE - -• `Const` **PAYMENT\_EVENT\_TYPE**: ``"PaymentReceived"`` - -#### Defined in - -[src/payment/payments.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/payments.ts#L15) diff --git a/src/pages/docs/golem-js/reference/modules/payment_rejection.md b/src/pages/docs/golem-js/reference/modules/payment_rejection.md new file mode 100644 index 000000000..902e0240c --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/payment_rejection.md @@ -0,0 +1,17 @@ +--- +title: "Module payment/rejection" +pageTitle: "Module payment/rejection - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module payment/rejection within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: payment/rejection + +## Table of contents + +### Enumerations + +- [RejectionReason](../enums/payment_rejection.RejectionReason) + +### Interfaces + +- [Rejection](../interfaces/payment_rejection.Rejection) diff --git a/src/pages/docs/golem-js/reference/modules/payment_service.md b/src/pages/docs/golem-js/reference/modules/payment_service.md index 029879b61..4e550054f 100644 --- a/src/pages/docs/golem-js/reference/modules/payment_service.md +++ b/src/pages/docs/golem-js/reference/modules/payment_service.md @@ -11,56 +11,3 @@ type: "JS API Reference" ### Interfaces - [PaymentOptions](../interfaces/payment_service.PaymentOptions) - -### Type Aliases - -- [DebitNoteFilter](payment_service#debitnotefilter) -- [InvoiceFilter](payment_service#invoicefilter) - -## Type Aliases - -### DebitNoteFilter - -Ƭ **DebitNoteFilter**: (`debitNote`: [`DebitNoteDTO`](../interfaces/payment_debit_note.DebitNoteDTO)) => `Promise`\<`boolean`\> \| `boolean` - -#### Type declaration - -▸ (`debitNote`): `Promise`\<`boolean`\> \| `boolean` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `debitNote` | [`DebitNoteDTO`](../interfaces/payment_debit_note.DebitNoteDTO) | - -##### Returns - -`Promise`\<`boolean`\> \| `boolean` - -#### Defined in - -[src/payment/service.ts:37](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/service.ts#L37) - -___ - -### InvoiceFilter - -Ƭ **InvoiceFilter**: (`invoice`: [`InvoiceDTO`](../interfaces/payment_invoice.InvoiceDTO)) => `Promise`\<`boolean`\> \| `boolean` - -#### Type declaration - -▸ (`invoice`): `Promise`\<`boolean`\> \| `boolean` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `invoice` | [`InvoiceDTO`](../interfaces/payment_invoice.InvoiceDTO) | - -##### Returns - -`Promise`\<`boolean`\> \| `boolean` - -#### Defined in - -[src/payment/service.ts:38](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/service.ts#L38) diff --git a/src/pages/docs/golem-js/reference/modules/payment_strategy.md b/src/pages/docs/golem-js/reference/modules/payment_strategy.md index 2cb122645..e16b3f462 100644 --- a/src/pages/docs/golem-js/reference/modules/payment_strategy.md +++ b/src/pages/docs/golem-js/reference/modules/payment_strategy.md @@ -35,7 +35,7 @@ Default DebitNotes filter that accept all debit notes without any validation #### Defined in -[src/payment/strategy.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/strategy.ts#L5) +[src/payment/strategy.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/strategy.ts#L6) ___ @@ -57,13 +57,13 @@ Default Invoices filter that accept all invoices without any validation #### Defined in -[src/payment/strategy.ts:7](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/strategy.ts#L7) +[src/payment/strategy.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/strategy.ts#L9) ___ ### acceptMaxAmountDebitNoteFilter -▸ **acceptMaxAmountDebitNoteFilter**(`maxAmount`): (`debitNote`: [`DebitNoteDTO`](../interfaces/payment_debit_note.DebitNoteDTO)) => `Promise`\<`boolean`\> +▸ **acceptMaxAmountDebitNoteFilter**(`maxAmount`): (`debitNote`: [`DebitNote`](../classes/payment_debit_note.DebitNote)) => `Promise`\<`boolean`\> A custom filter that only accepts debit notes below a given value @@ -83,7 +83,7 @@ A custom filter that only accepts debit notes below a given value | Name | Type | | :------ | :------ | -| `debitNote` | [`DebitNoteDTO`](../interfaces/payment_debit_note.DebitNoteDTO) | +| `debitNote` | [`DebitNote`](../classes/payment_debit_note.DebitNote) | ##### Returns @@ -91,13 +91,13 @@ A custom filter that only accepts debit notes below a given value #### Defined in -[src/payment/strategy.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/strategy.ts#L10) +[src/payment/strategy.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/strategy.ts#L12) ___ ### acceptMaxAmountInvoiceFilter -▸ **acceptMaxAmountInvoiceFilter**(`maxAmount`): (`invoice`: [`InvoiceDTO`](../interfaces/payment_invoice.InvoiceDTO)) => `Promise`\<`boolean`\> +▸ **acceptMaxAmountInvoiceFilter**(`maxAmount`): (`invoice`: [`Invoice`](../classes/payment_invoice.Invoice)) => `Promise`\<`boolean`\> A custom filter that only accepts invoices below a given value @@ -117,7 +117,7 @@ A custom filter that only accepts invoices below a given value | Name | Type | | :------ | :------ | -| `invoice` | [`InvoiceDTO`](../interfaces/payment_invoice.InvoiceDTO) | +| `invoice` | [`Invoice`](../classes/payment_invoice.Invoice) | ##### Returns @@ -125,4 +125,4 @@ A custom filter that only accepts invoices below a given value #### Defined in -[src/payment/strategy.ts:14](https://github.com/golemfactory/golem-js/blob/7cee55b/src/payment/strategy.ts#L14) +[src/payment/strategy.ts:16](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/payment/strategy.ts#L16) diff --git a/src/pages/docs/golem-js/reference/modules/resource_rental_rental_module.md b/src/pages/docs/golem-js/reference/modules/resource_rental_rental_module.md new file mode 100644 index 000000000..e96076359 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/resource_rental_rental_module.md @@ -0,0 +1,17 @@ +--- +title: "Module resource-rental/rental.module" +pageTitle: "Module resource-rental/rental.module - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module resource-rental/rental.module within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: resource-rental/rental.module + +## Table of contents + +### Classes + +- [RentalModuleImpl](../classes/resource_rental_rental_module.RentalModuleImpl) + +### Interfaces + +- [RentalModule](../interfaces/resource_rental_rental_module.RentalModule) diff --git a/src/pages/docs/golem-js/reference/modules/resource_rental_resource_rental.md b/src/pages/docs/golem-js/reference/modules/resource_rental_resource_rental.md new file mode 100644 index 000000000..c84d8ff75 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/resource_rental_resource_rental.md @@ -0,0 +1,18 @@ +--- +title: "Module resource-rental/resource-rental" +pageTitle: "Module resource-rental/resource-rental - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module resource-rental/resource-rental within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: resource-rental/resource-rental + +## Table of contents + +### Classes + +- [ResourceRental](../classes/resource_rental_resource_rental.ResourceRental) + +### Interfaces + +- [ResourceRentalEvents](../interfaces/resource_rental_resource_rental.ResourceRentalEvents) +- [ResourceRentalOptions](../interfaces/resource_rental_resource_rental.ResourceRentalOptions) diff --git a/src/pages/docs/golem-js/reference/modules/resource_rental_resource_rental_pool.md b/src/pages/docs/golem-js/reference/modules/resource_rental_resource_rental_pool.md new file mode 100644 index 000000000..6e0f7c264 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/resource_rental_resource_rental_pool.md @@ -0,0 +1,33 @@ +--- +title: "Module resource-rental/resource-rental-pool" +pageTitle: "Module resource-rental/resource-rental-pool - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module resource-rental/resource-rental-pool within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: resource-rental/resource-rental-pool + +## Table of contents + +### Classes + +- [ResourceRentalPool](../classes/resource_rental_resource_rental_pool.ResourceRentalPool) + +### Interfaces + +- [ResourceRentalPoolDependencies](../interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolDependencies) +- [ResourceRentalPoolOptions](../interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolOptions) +- [ResourceRentalPoolEvents](../interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolEvents) + +### Type Aliases + +- [Concurrency](resource_rental_resource_rental_pool#concurrency) + +## Type Aliases + +### Concurrency + +Ƭ **Concurrency**: `number` \| [`RequireAtLeastOne`](shared_utils_types#requireatleastone)\<\{ `min`: `number` ; `max`: `number` }\> + +#### Defined in + +[src/resource-rental/resource-rental-pool.ts:22](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/resource-rental/resource-rental-pool.ts#L22) diff --git a/src/pages/docs/golem-js/reference/modules/script_command.md b/src/pages/docs/golem-js/reference/modules/script_command.md deleted file mode 100644 index 6fd0d88bf..000000000 --- a/src/pages/docs/golem-js/reference/modules/script_command.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: "Module script/command" -pageTitle: "Module script/command - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module script/command within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: script/command - -## Table of contents - -### Classes - -- [Terminate](../classes/script_command.Terminate) -- [UploadData](../classes/script_command.UploadData) -- [DownloadData](../classes/script_command.DownloadData) - -### Type Aliases - -- [Capture](script_command#capture) -- [CaptureMode](script_command#capturemode) - -## Other - -### Capture - -Ƭ **Capture**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `stdout?` | [`CaptureMode`](script_command#capturemode) | -| `stderr?` | [`CaptureMode`](script_command#capturemode) | - -#### Defined in - -[src/script/command.ts:76](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L76) - -___ - -### CaptureMode - -Ƭ **CaptureMode**: \{ `atEnd`: \{ `part?`: `CapturePart` ; `format?`: `CaptureFormat` } } \| \{ `stream`: \{ `limit?`: `number` ; `format?`: `CaptureFormat` } } - -#### Defined in - -[src/script/command.ts:80](https://github.com/golemfactory/golem-js/blob/7cee55b/src/script/command.ts#L80) - -___ diff --git a/src/pages/docs/golem-js/reference/modules/shared_cache_CacheService.md b/src/pages/docs/golem-js/reference/modules/shared_cache_CacheService.md new file mode 100644 index 000000000..0eddc843c --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_cache_CacheService.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/cache/CacheService" +pageTitle: "Module shared/cache/CacheService - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/cache/CacheService within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/cache/CacheService + +## Table of contents + +### Classes + +- [CacheService](../classes/shared_cache_CacheService.CacheService) diff --git a/src/pages/docs/golem-js/reference/modules/shared_error_golem_error.md b/src/pages/docs/golem-js/reference/modules/shared_error_golem_error.md new file mode 100644 index 000000000..3cbd8bb5c --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_error_golem_error.md @@ -0,0 +1,20 @@ +--- +title: "Module shared/error/golem-error" +pageTitle: "Module shared/error/golem-error - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/error/golem-error within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/error/golem-error + +## Table of contents + +### Classes + +- [GolemError](../classes/shared_error_golem_error.GolemError) +- [GolemUserError](../classes/shared_error_golem_error.GolemUserError) +- [GolemAbortError](../classes/shared_error_golem_error.GolemAbortError) +- [GolemConfigError](../classes/shared_error_golem_error.GolemConfigError) +- [GolemInternalError](../classes/shared_error_golem_error.GolemInternalError) +- [GolemPlatformError](../classes/shared_error_golem_error.GolemPlatformError) +- [GolemTimeoutError](../classes/shared_error_golem_error.GolemTimeoutError) +- [GolemModuleError](../classes/shared_error_golem_error.GolemModuleError) diff --git a/src/pages/docs/golem-js/reference/modules/shared_storage_GftpServerAdapter.md b/src/pages/docs/golem-js/reference/modules/shared_storage_GftpServerAdapter.md new file mode 100644 index 000000000..65ec19f90 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_storage_GftpServerAdapter.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/storage/GftpServerAdapter" +pageTitle: "Module shared/storage/GftpServerAdapter - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/storage/GftpServerAdapter within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/storage/GftpServerAdapter + +## Table of contents + +### Classes + +- [GftpServerAdapter](../classes/shared_storage_GftpServerAdapter.GftpServerAdapter) diff --git a/src/pages/docs/golem-js/reference/modules/shared_storage_default.md b/src/pages/docs/golem-js/reference/modules/shared_storage_default.md new file mode 100644 index 000000000..6f90b02af --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_storage_default.md @@ -0,0 +1,34 @@ +--- +title: "Module shared/storage/default" +pageTitle: "Module shared/storage/default - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/storage/default within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/storage/default + +## Table of contents + +### Functions + +- [createDefaultStorageProvider](shared_storage_default#createdefaultstorageprovider) + +## Functions + +### createDefaultStorageProvider + +▸ **createDefaultStorageProvider**(`yagnaApi`, `logger?`): [`GftpStorageProvider`](../classes/shared_storage_gftp.GftpStorageProvider) \| [`NullStorageProvider`](../classes/shared_storage_null.NullStorageProvider) \| [`WebSocketBrowserStorageProvider`](../classes/shared_storage_ws_browser.WebSocketBrowserStorageProvider) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `yagnaApi` | [`YagnaApi`](../classes/shared_yagna_yagnaApi.YagnaApi) | +| `logger?` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | + +#### Returns + +[`GftpStorageProvider`](../classes/shared_storage_gftp.GftpStorageProvider) \| [`NullStorageProvider`](../classes/shared_storage_null.NullStorageProvider) \| [`WebSocketBrowserStorageProvider`](../classes/shared_storage_ws_browser.WebSocketBrowserStorageProvider) + +#### Defined in + +[src/shared/storage/default.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/default.ts#L6) diff --git a/src/pages/docs/golem-js/reference/modules/shared_storage_gftp.md b/src/pages/docs/golem-js/reference/modules/shared_storage_gftp.md new file mode 100644 index 000000000..2d4dc7296 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_storage_gftp.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/storage/gftp" +pageTitle: "Module shared/storage/gftp - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/storage/gftp within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/storage/gftp + +## Table of contents + +### Classes + +- [GftpStorageProvider](../classes/shared_storage_gftp.GftpStorageProvider) diff --git a/src/pages/docs/golem-js/reference/modules/shared_storage_null.md b/src/pages/docs/golem-js/reference/modules/shared_storage_null.md new file mode 100644 index 000000000..f56980049 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_storage_null.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/storage/null" +pageTitle: "Module shared/storage/null - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/storage/null within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/storage/null + +## Table of contents + +### Classes + +- [NullStorageProvider](../classes/shared_storage_null.NullStorageProvider) diff --git a/src/pages/docs/golem-js/reference/modules/shared_storage_provider.md b/src/pages/docs/golem-js/reference/modules/shared_storage_provider.md new file mode 100644 index 000000000..68762acfa --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_storage_provider.md @@ -0,0 +1,41 @@ +--- +title: "Module shared/storage/provider" +pageTitle: "Module shared/storage/provider - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/storage/provider within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/storage/provider + +## Table of contents + +### Interfaces + +- [StorageProvider](../interfaces/shared_storage_provider.StorageProvider) + +### Type Aliases + +- [StorageProviderDataCallback](shared_storage_provider#storageproviderdatacallback) + +## Type Aliases + +### StorageProviderDataCallback + +Ƭ **StorageProviderDataCallback**: (`data`: `Uint8Array`) => `void` + +#### Type declaration + +▸ (`data`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `Uint8Array` | + +##### Returns + +`void` + +#### Defined in + +[src/shared/storage/provider.ts:1](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/storage/provider.ts#L1) diff --git a/src/pages/docs/golem-js/reference/modules/shared_storage_ws_browser.md b/src/pages/docs/golem-js/reference/modules/shared_storage_ws_browser.md new file mode 100644 index 000000000..f45c616d3 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_storage_ws_browser.md @@ -0,0 +1,17 @@ +--- +title: "Module shared/storage/ws-browser" +pageTitle: "Module shared/storage/ws-browser - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/storage/ws-browser within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/storage/ws-browser + +## Table of contents + +### Classes + +- [WebSocketBrowserStorageProvider](../classes/shared_storage_ws_browser.WebSocketBrowserStorageProvider) + +### Interfaces + +- [WebSocketStorageProviderOptions](../interfaces/shared_storage_ws_browser.WebSocketStorageProviderOptions) diff --git a/src/pages/docs/golem-js/reference/modules/shared_types.md b/src/pages/docs/golem-js/reference/modules/shared_types.md new file mode 100644 index 000000000..3c7a720af --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_types.md @@ -0,0 +1,23 @@ +--- +title: "Module shared/types" +pageTitle: "Module shared/types - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/types within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/types + +## Table of contents + +### Type Aliases + +- [DataTransferProtocol](shared_types#datatransferprotocol) + +## Type Aliases + +### DataTransferProtocol + +Ƭ **DataTransferProtocol**: ``"gftp"`` \| ``"ws"`` \| [`StorageProvider`](../interfaces/shared_storage_provider.StorageProvider) + +#### Defined in + +[src/shared/types.ts:3](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/types.ts#L3) diff --git a/src/pages/docs/golem-js/reference/modules/shared_utils_abortSignal.md b/src/pages/docs/golem-js/reference/modules/shared_utils_abortSignal.md new file mode 100644 index 000000000..8b23bcf5f --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_utils_abortSignal.md @@ -0,0 +1,37 @@ +--- +title: "Module shared/utils/abortSignal" +pageTitle: "Module shared/utils/abortSignal - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/utils/abortSignal within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/utils/abortSignal + +## Table of contents + +### Functions + +- [createAbortSignalFromTimeout](shared_utils_abortSignal#createabortsignalfromtimeout) + +## Functions + +### createAbortSignalFromTimeout + +▸ **createAbortSignalFromTimeout**(`timeoutOrSignal`): `AbortSignal` + +If provided an AbortSignal, returns it. +If provided a number, returns an AbortSignal that will be aborted after the specified number of milliseconds. +If provided undefined, returns an AbortSignal that will never be aborted. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `timeoutOrSignal` | `undefined` \| `number` \| `AbortSignal` | + +#### Returns + +`AbortSignal` + +#### Defined in + +[src/shared/utils/abortSignal.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/abortSignal.ts#L6) diff --git a/src/pages/docs/golem-js/reference/modules/shared_utils_apiErrorMessage.md b/src/pages/docs/golem-js/reference/modules/shared_utils_apiErrorMessage.md new file mode 100644 index 000000000..eeed44e0f --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_utils_apiErrorMessage.md @@ -0,0 +1,36 @@ +--- +title: "Module shared/utils/apiErrorMessage" +pageTitle: "Module shared/utils/apiErrorMessage - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/utils/apiErrorMessage within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/utils/apiErrorMessage + +## Table of contents + +### Functions + +- [getMessageFromApiError](shared_utils_apiErrorMessage#getmessagefromapierror) + +## Functions + +### getMessageFromApiError + +▸ **getMessageFromApiError**(`error`): `string` + +Try to extract a message from a yagna API error. +If the error is not an instance of `ApiError`, return the error message. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `unknown` | + +#### Returns + +`string` + +#### Defined in + +[src/shared/utils/apiErrorMessage.ts:9](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/apiErrorMessage.ts#L9) diff --git a/src/pages/docs/golem-js/reference/modules/shared_utils_env.md b/src/pages/docs/golem-js/reference/modules/shared_utils_env.md new file mode 100644 index 000000000..fcdc75b54 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_utils_env.md @@ -0,0 +1,102 @@ +--- +title: "Module shared/utils/env" +pageTitle: "Module shared/utils/env - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/utils/env within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/utils/env + +## Table of contents + +### Functions + +- [getYagnaApiUrl](shared_utils_env#getyagnaapiurl) +- [getYagnaAppKey](shared_utils_env#getyagnaappkey) +- [getYagnaSubnet](shared_utils_env#getyagnasubnet) +- [getRepoUrl](shared_utils_env#getrepourl) +- [getPaymentNetwork](shared_utils_env#getpaymentnetwork) +- [isDevMode](shared_utils_env#isdevmode) + +## Functions + +### getYagnaApiUrl + +▸ **getYagnaApiUrl**(): `string` + +#### Returns + +`string` + +#### Defined in + +[src/shared/utils/env.ts:3](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/env.ts#L3) + +___ + +### getYagnaAppKey + +▸ **getYagnaAppKey**(): `string` + +#### Returns + +`string` + +#### Defined in + +[src/shared/utils/env.ts:7](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/env.ts#L7) + +___ + +### getYagnaSubnet + +▸ **getYagnaSubnet**(): `string` + +#### Returns + +`string` + +#### Defined in + +[src/shared/utils/env.ts:11](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/env.ts#L11) + +___ + +### getRepoUrl + +▸ **getRepoUrl**(): `string` + +#### Returns + +`string` + +#### Defined in + +[src/shared/utils/env.ts:15](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/env.ts#L15) + +___ + +### getPaymentNetwork + +▸ **getPaymentNetwork**(): `string` + +#### Returns + +`string` + +#### Defined in + +[src/shared/utils/env.ts:21](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/env.ts#L21) + +___ + +### isDevMode + +▸ **isDevMode**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[src/shared/utils/env.ts:25](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/env.ts#L25) diff --git a/src/pages/docs/golem-js/reference/modules/shared_utils_eventLoop.md b/src/pages/docs/golem-js/reference/modules/shared_utils_eventLoop.md new file mode 100644 index 000000000..8f35b66bc --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_utils_eventLoop.md @@ -0,0 +1,64 @@ +--- +title: "Module shared/utils/eventLoop" +pageTitle: "Module shared/utils/eventLoop - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/utils/eventLoop within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/utils/eventLoop + +## Table of contents + +### Functions + +- [runOnNextEventLoopIteration](shared_utils_eventLoop#runonnexteventloopiteration) + +## Functions + +### runOnNextEventLoopIteration + +▸ **runOnNextEventLoopIteration**\<`T`\>(`cb`): `Promise`\<`T`\> + +Run a callback on the next event loop iteration ("promote" a microtask to a task using setTimeout). +Note that this is not guaranteed to run on the very next iteration, but it will run as soon as possible. +This function is designed to avoid the problem of microtasks queueing other microtasks in an infinite loop. +See the example below for a common pitfall that this function can help avoid. +Learn more about microtasks and their relation to async/await here: +https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide/In_depth +https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await#control_flow_effects_of_await + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `cb` | () => `Promise`\<`T`\> | The callback to run on the next event loop iteration. | + +#### Returns + +`Promise`\<`T`\> + +**`Example`** + +```ts +const signal = AbortSignal.timeout(1_000); +// This loop will run for 1 second, then stop. +while (!signal.aborted) { + await runOnNextEventLoopIteration(() => Promise.resolve()); +} + +const signal = AbortSignal.timeout(1_000); +// This loop will run indefinitely. +// Each while loop iteration queues a microtask, which itself queues another microtask, and so on. +while (!signal.aborted) { + await Promise.resolve(); +} +``` + +#### Defined in + +[src/shared/utils/eventLoop.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/eventLoop.ts#L26) diff --git a/src/pages/docs/golem-js/reference/modules/shared_utils_logger_defaultLogger.md b/src/pages/docs/golem-js/reference/modules/shared_utils_logger_defaultLogger.md new file mode 100644 index 000000000..2edfed8fe --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_utils_logger_defaultLogger.md @@ -0,0 +1,58 @@ +--- +title: "Module shared/utils/logger/defaultLogger" +pageTitle: "Module shared/utils/logger/defaultLogger - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/utils/logger/defaultLogger within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/utils/logger/defaultLogger + +## Table of contents + +### Type Aliases + +- [DefaultLoggerOptions](shared_utils_logger_defaultLogger#defaultloggeroptions) + +### Functions + +- [defaultLogger](shared_utils_logger_defaultLogger#defaultlogger) + +## Type Aliases + +### DefaultLoggerOptions + +Ƭ **DefaultLoggerOptions**: `Object` + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `disableAutoPrefix` | `boolean` | Disables prefixing the root namespace with golem-js **`Default`** ```ts false ``` | + +#### Defined in + +[src/shared/utils/logger/defaultLogger.ts:4](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/logger/defaultLogger.ts#L4) + +## Functions + +### defaultLogger + +▸ **defaultLogger**(`namespace`, `opts?`): [`Logger`](../interfaces/shared_utils_logger_logger.Logger) + +Creates a logger that uses the debug library. This logger is used by default by all entities in the SDK. + +If the namespace is not prefixed with `golem-js:`, it will be prefixed automatically - this can be controlled by `disableAutoPrefix` options. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `namespace` | `string` | +| `opts` | [`DefaultLoggerOptions`](shared_utils_logger_defaultLogger#defaultloggeroptions) | + +#### Returns + +[`Logger`](../interfaces/shared_utils_logger_logger.Logger) + +#### Defined in + +[src/shared/utils/logger/defaultLogger.ts:26](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/logger/defaultLogger.ts#L26) diff --git a/src/pages/docs/golem-js/reference/modules/shared_utils_logger_logger.md b/src/pages/docs/golem-js/reference/modules/shared_utils_logger_logger.md new file mode 100644 index 000000000..d4bf07cba --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_utils_logger_logger.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/utils/logger/logger" +pageTitle: "Module shared/utils/logger/logger - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/utils/logger/logger within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/utils/logger/logger + +## Table of contents + +### Interfaces + +- [Logger](../interfaces/shared_utils_logger_logger.Logger) diff --git a/src/pages/docs/golem-js/reference/modules/shared_utils_logger_nullLogger.md b/src/pages/docs/golem-js/reference/modules/shared_utils_logger_nullLogger.md new file mode 100644 index 000000000..06f5f4662 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_utils_logger_nullLogger.md @@ -0,0 +1,27 @@ +--- +title: "Module shared/utils/logger/nullLogger" +pageTitle: "Module shared/utils/logger/nullLogger - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/utils/logger/nullLogger within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/utils/logger/nullLogger + +## Table of contents + +### Functions + +- [nullLogger](shared_utils_logger_nullLogger#nulllogger) + +## Functions + +### nullLogger + +▸ **nullLogger**(): [`Logger`](../interfaces/shared_utils_logger_logger.Logger) + +#### Returns + +[`Logger`](../interfaces/shared_utils_logger_logger.Logger) + +#### Defined in + +[src/shared/utils/logger/nullLogger.ts:3](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/logger/nullLogger.ts#L3) diff --git a/src/pages/docs/golem-js/reference/modules/shared_utils_runtimeContextChecker.md b/src/pages/docs/golem-js/reference/modules/shared_utils_runtimeContextChecker.md new file mode 100644 index 000000000..be1f92946 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_utils_runtimeContextChecker.md @@ -0,0 +1,23 @@ +--- +title: "Module shared/utils/runtimeContextChecker" +pageTitle: "Module shared/utils/runtimeContextChecker - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/utils/runtimeContextChecker within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/utils/runtimeContextChecker + +## Table of contents + +### Variables + +- [isNode](shared_utils_runtimeContextChecker#isnode) + +## Variables + +### isNode + +• `Const` **isNode**: `boolean` + +#### Defined in + +[src/shared/utils/runtimeContextChecker.ts:8](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/runtimeContextChecker.ts#L8) diff --git a/src/pages/docs/golem-js/reference/modules/shared_utils_timeout.md b/src/pages/docs/golem-js/reference/modules/shared_utils_timeout.md new file mode 100644 index 000000000..d26a8d28c --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_utils_timeout.md @@ -0,0 +1,40 @@ +--- +title: "Module shared/utils/timeout" +pageTitle: "Module shared/utils/timeout - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/utils/timeout within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/utils/timeout + +## Table of contents + +### Functions + +- [withTimeout](shared_utils_timeout#withtimeout) + +## Functions + +### withTimeout + +▸ **withTimeout**\<`T`\>(`promise`, `timeoutMs`): `Promise`\<`T`\> + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `promise` | `Promise`\<`T`\> | +| `timeoutMs` | `number` | + +#### Returns + +`Promise`\<`T`\> + +#### Defined in + +[src/shared/utils/timeout.ts:3](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/timeout.ts#L3) diff --git a/src/pages/docs/golem-js/reference/modules/shared_utils_types.md b/src/pages/docs/golem-js/reference/modules/shared_utils_types.md new file mode 100644 index 000000000..87d837d26 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_utils_types.md @@ -0,0 +1,49 @@ +--- +title: "Module shared/utils/types" +pageTitle: "Module shared/utils/types - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/utils/types within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/utils/types + +## Table of contents + +### Type Aliases + +- [RequireAtLeastOne](shared_utils_types#requireatleastone) +- [ElementOf](shared_utils_types#elementof) + +## Type Aliases + +### RequireAtLeastOne + +Ƭ **RequireAtLeastOne**\<`T`, `Keys`\>: `Pick`\<`T`, `Exclude`\\> & \{ [K in Keys]-?: Required\\> & Partial\\>\> }[`Keys`] + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `T` | +| `Keys` | extends keyof `T` = keyof `T` | + +#### Defined in + +[src/shared/utils/types.ts:12](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/types.ts#L12) + +___ + +### ElementOf + +Ƭ **ElementOf**\<`T`\>: `T` extends infer U[] ? `U` : `never` + +Utility type extracting the type of the element of a typed array + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Defined in + +[src/shared/utils/types.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/types.ts#L20) diff --git a/src/pages/docs/golem-js/reference/modules/shared_utils_wait.md b/src/pages/docs/golem-js/reference/modules/shared_utils_wait.md new file mode 100644 index 000000000..500cdf35b --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_utils_wait.md @@ -0,0 +1,70 @@ +--- +title: "Module shared/utils/wait" +pageTitle: "Module shared/utils/wait - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/utils/wait within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/utils/wait + +## Table of contents + +### Functions + +- [waitForCondition](shared_utils_wait#waitforcondition) +- [waitAndCall](shared_utils_wait#waitandcall) + +## Functions + +### waitForCondition + +▸ **waitForCondition**(`check`, `opts?`): `Promise`\<`void`\> + +Utility function that helps to block the execution until a condition is met (check returns true) or the timeout happens. + +#### Parameters + +| Name | Type | Default value | Description | +| :------ | :------ | :------ | :------ | +| `check` | () => `boolean` \| `Promise`\<`boolean`\> | `undefined` | The function checking if the condition is met. | +| `opts?` | `Object` | `undefined` | Options controlling the timeout and check interval in seconds. | +| `opts.timeoutSeconds` | `number` | `30` | The timeout value in seconds. | +| `opts.intervalSeconds` | `number` | `1` | The interval between condition checks in seconds. | + +#### Returns + +`Promise`\<`void`\> + +- Resolves when the condition is met or rejects with a timeout error if it wasn't met on time. + +#### Defined in + +[src/shared/utils/wait.ts:13](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/wait.ts#L13) + +___ + +### waitAndCall + +▸ **waitAndCall**\<`T`\>(`fn`, `waitSeconds`): `Promise`\<`T`\> + +Simple utility that allows you to wait n-seconds and then call the provided function + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `fn` | () => `T` \| `Promise`\<`T`\> | +| `waitSeconds` | `number` | + +#### Returns + +`Promise`\<`T`\> + +#### Defined in + +[src/shared/utils/wait.ts:43](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/utils/wait.ts#L43) diff --git a/src/pages/docs/golem-js/reference/modules/shared_yagna_adapters_activity_api_adapter.md b/src/pages/docs/golem-js/reference/modules/shared_yagna_adapters_activity_api_adapter.md new file mode 100644 index 000000000..0e2483928 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_yagna_adapters_activity_api_adapter.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/yagna/adapters/activity-api-adapter" +pageTitle: "Module shared/yagna/adapters/activity-api-adapter - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/yagna/adapters/activity-api-adapter within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/yagna/adapters/activity-api-adapter + +## Table of contents + +### Classes + +- [ActivityApiAdapter](../classes/shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter) diff --git a/src/pages/docs/golem-js/reference/modules/shared_yagna_adapters_market_api_adapter.md b/src/pages/docs/golem-js/reference/modules/shared_yagna_adapters_market_api_adapter.md new file mode 100644 index 000000000..f9d4fb20b --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_yagna_adapters_market_api_adapter.md @@ -0,0 +1,47 @@ +--- +title: "Module shared/yagna/adapters/market-api-adapter" +pageTitle: "Module shared/yagna/adapters/market-api-adapter - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/yagna/adapters/market-api-adapter within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/yagna/adapters/market-api-adapter + +## Table of contents + +### Classes + +- [MarketApiAdapter](../classes/shared_yagna_adapters_market_api_adapter.MarketApiAdapter) + +### Type Aliases + +- [DemandRequestBody](shared_yagna_adapters_market_api_adapter#demandrequestbody) + +## Type Aliases + +### DemandRequestBody + +Ƭ **DemandRequestBody**: `Object` + +A bit more user-friendly type definition of DemandOfferBaseDTO from ya-ts-client + +That's probably one of the most confusing elements around Golem Protocol and the API specificiation: + +- Providers create Offers +- Requestors create Demands +- Demands are used to create a subscription for Proposals - Initial ones reflect the Offer that was matched with the Demand used to subscribe +- Once the proposal is countered, it's countered with a "counter proposal" which is no longer Offer + Demand, + but rather a sketch of the agreement - here both parties try to agree on the values of certain properties that + are interesting from their perspective. These "negotiated proposals (of) ...." are buit using DemandOffeBaseDTO + +#FIXME yagna - feedback in the note above + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `properties` | `Record`\<`string`, `string` \| `number` \| `boolean` \| `string`[] \| `number`[]\> | +| `constraints` | `string` | + +#### Defined in + +[src/shared/yagna/adapters/market-api-adapter.ts:37](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/adapters/market-api-adapter.ts#L37) diff --git a/src/pages/docs/golem-js/reference/modules/shared_yagna_adapters_network_api_adapter.md b/src/pages/docs/golem-js/reference/modules/shared_yagna_adapters_network_api_adapter.md new file mode 100644 index 000000000..2b0baa6f7 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_yagna_adapters_network_api_adapter.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/yagna/adapters/network-api-adapter" +pageTitle: "Module shared/yagna/adapters/network-api-adapter - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/yagna/adapters/network-api-adapter within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/yagna/adapters/network-api-adapter + +## Table of contents + +### Classes + +- [NetworkApiAdapter](../classes/shared_yagna_adapters_network_api_adapter.NetworkApiAdapter) diff --git a/src/pages/docs/golem-js/reference/modules/shared_yagna_adapters_payment_api_adapter.md b/src/pages/docs/golem-js/reference/modules/shared_yagna_adapters_payment_api_adapter.md new file mode 100644 index 000000000..61e89fb89 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_yagna_adapters_payment_api_adapter.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/yagna/adapters/payment-api-adapter" +pageTitle: "Module shared/yagna/adapters/payment-api-adapter - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/yagna/adapters/payment-api-adapter within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/yagna/adapters/payment-api-adapter + +## Table of contents + +### Classes + +- [PaymentApiAdapter](../classes/shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter) diff --git a/src/pages/docs/golem-js/reference/modules/shared_yagna_event_reader.md b/src/pages/docs/golem-js/reference/modules/shared_yagna_event_reader.md new file mode 100644 index 000000000..f101b9700 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_yagna_event_reader.md @@ -0,0 +1,74 @@ +--- +title: "Module shared/yagna/event-reader" +pageTitle: "Module shared/yagna/event-reader - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/yagna/event-reader within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/yagna/event-reader + +## Table of contents + +### Classes + +- [EventReader](../classes/shared_yagna_event_reader.EventReader) + +### Type Aliases + +- [CancellablePoll](shared_yagna_event_reader#cancellablepoll) +- [EventsFetcherWithCursor](shared_yagna_event_reader#eventsfetcherwithcursor) + +## Type Aliases + +### CancellablePoll + +Ƭ **CancellablePoll**\<`T`\>: `Object` + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `eventType` | `string` | User defined name of the event stream for ease of debugging | +| `isBusy` | `boolean` | Tells if a poll call is currently active - reader | +| `isOnline` | `boolean` | Tells if the poll is active in general. If it's 'false' it means that the poll was cancelled and no polling attempts will be done any more | +| `pollValues` | () => `AsyncGenerator`\<`T`\> | - | +| `cancel` | () => `Promise`\<`void`\> | - | + +#### Defined in + +[src/shared/yagna/event-reader.ts:6](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/event-reader.ts#L6) + +___ + +### EventsFetcherWithCursor + +Ƭ **EventsFetcherWithCursor**\<`T`\>: (`lastEventTimestamp`: `string`) => `Promise`\<`T`[]\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | extends `EventDTO` | + +#### Type declaration + +▸ (`lastEventTimestamp`): `Promise`\<`T`[]\> + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `lastEventTimestamp` | `string` | + +##### Returns + +`Promise`\<`T`[]\> + +#### Defined in + +[src/shared/yagna/event-reader.ts:27](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/event-reader.ts#L27) diff --git a/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_activity_repository.md b/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_activity_repository.md new file mode 100644 index 000000000..3c90b8cdc --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_activity_repository.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/yagna/repository/activity-repository" +pageTitle: "Module shared/yagna/repository/activity-repository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/yagna/repository/activity-repository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/yagna/repository/activity-repository + +## Table of contents + +### Classes + +- [ActivityRepository](../classes/shared_yagna_repository_activity_repository.ActivityRepository) diff --git a/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_agreement_repository.md b/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_agreement_repository.md new file mode 100644 index 000000000..35b0abfe5 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_agreement_repository.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/yagna/repository/agreement-repository" +pageTitle: "Module shared/yagna/repository/agreement-repository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/yagna/repository/agreement-repository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/yagna/repository/agreement-repository + +## Table of contents + +### Classes + +- [AgreementRepository](../classes/shared_yagna_repository_agreement_repository.AgreementRepository) diff --git a/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_debit_note_repository.md b/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_debit_note_repository.md new file mode 100644 index 000000000..bcc1aad8c --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_debit_note_repository.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/yagna/repository/debit-note-repository" +pageTitle: "Module shared/yagna/repository/debit-note-repository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/yagna/repository/debit-note-repository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/yagna/repository/debit-note-repository + +## Table of contents + +### Classes + +- [DebitNoteRepository](../classes/shared_yagna_repository_debit_note_repository.DebitNoteRepository) diff --git a/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_demand_repository.md b/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_demand_repository.md new file mode 100644 index 000000000..88d185fae --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_demand_repository.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/yagna/repository/demand-repository" +pageTitle: "Module shared/yagna/repository/demand-repository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/yagna/repository/demand-repository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/yagna/repository/demand-repository + +## Table of contents + +### Classes + +- [DemandRepository](../classes/shared_yagna_repository_demand_repository.DemandRepository) diff --git a/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_invoice_repository.md b/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_invoice_repository.md new file mode 100644 index 000000000..9994f1223 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_invoice_repository.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/yagna/repository/invoice-repository" +pageTitle: "Module shared/yagna/repository/invoice-repository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/yagna/repository/invoice-repository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/yagna/repository/invoice-repository + +## Table of contents + +### Classes + +- [InvoiceRepository](../classes/shared_yagna_repository_invoice_repository.InvoiceRepository) diff --git a/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_proposal_repository.md b/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_proposal_repository.md new file mode 100644 index 000000000..e0439be87 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_yagna_repository_proposal_repository.md @@ -0,0 +1,13 @@ +--- +title: "Module shared/yagna/repository/proposal-repository" +pageTitle: "Module shared/yagna/repository/proposal-repository - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/yagna/repository/proposal-repository within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/yagna/repository/proposal-repository + +## Table of contents + +### Classes + +- [ProposalRepository](../classes/shared_yagna_repository_proposal_repository.ProposalRepository) diff --git a/src/pages/docs/golem-js/reference/modules/shared_yagna_yagnaApi.md b/src/pages/docs/golem-js/reference/modules/shared_yagna_yagnaApi.md new file mode 100644 index 000000000..e3305b258 --- /dev/null +++ b/src/pages/docs/golem-js/reference/modules/shared_yagna_yagnaApi.md @@ -0,0 +1,86 @@ +--- +title: "Module shared/yagna/yagnaApi" +pageTitle: "Module shared/yagna/yagnaApi - golem-js API Reference" +description: "Explore the detailed API reference documentation for the Module shared/yagna/yagnaApi within the golem-js SDK for the Golem Network." +type: "JS API Reference" +--- +# Module: shared/yagna/yagnaApi + +## Table of contents + +### Classes + +- [YagnaApi](../classes/shared_yagna_yagnaApi.YagnaApi) + +### Interfaces + +- [YagnaExeScriptObserver](../interfaces/shared_yagna_yagnaApi.YagnaExeScriptObserver) + +### Type Aliases + +- [YagnaOptions](shared_yagna_yagnaApi#yagnaoptions) +- [YagnaAgreementOperationEvent](shared_yagna_yagnaApi#yagnaagreementoperationevent) +- [YagnaInvoiceEvent](shared_yagna_yagnaApi#yagnainvoiceevent) +- [YagnaDebitNoteEvent](shared_yagna_yagnaApi#yagnadebitnoteevent) + +### Variables + +- [MIN\_SUPPORTED\_YAGNA](shared_yagna_yagnaApi#min_supported_yagna) + +## Type Aliases + +### YagnaOptions + +Ƭ **YagnaOptions**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `apiKey?` | `string` | +| `basePath?` | `string` | +| `logger?` | [`Logger`](../interfaces/shared_utils_logger_logger.Logger) | + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:14](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L14) + +___ + +### YagnaAgreementOperationEvent + +Ƭ **YagnaAgreementOperationEvent**: [`ElementOf`](shared_utils_types#elementof)\<`Awaited`\<`ReturnType`\<`YaTsClient.MarketApi.RequestorService`[``"collectAgreementEvents"``]\>\>\> + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:24](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L24) + +___ + +### YagnaInvoiceEvent + +Ƭ **YagnaInvoiceEvent**: [`ElementOf`](shared_utils_types#elementof)\<`Awaited`\<`ReturnType`\<`YaTsClient.PaymentApi.RequestorService`[``"getInvoiceEvents"``]\>\>\> + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:27](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L27) + +___ + +### YagnaDebitNoteEvent + +Ƭ **YagnaDebitNoteEvent**: [`ElementOf`](shared_utils_types#elementof)\<`Awaited`\<`ReturnType`\<`YaTsClient.PaymentApi.RequestorService`[``"getDebitNoteEvents"``]\>\>\> + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:30](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L30) + +## Variables + +### MIN\_SUPPORTED\_YAGNA + +• `Const` **MIN\_SUPPORTED\_YAGNA**: ``"0.15.0"`` + +#### Defined in + +[src/shared/yagna/yagnaApi.ts:20](https://github.com/golemfactory/golem-js/blob/0909f3b7/src/shared/yagna/yagnaApi.ts#L20) diff --git a/src/pages/docs/golem-js/reference/modules/storage_gftp.md b/src/pages/docs/golem-js/reference/modules/storage_gftp.md deleted file mode 100644 index 520a71d6e..000000000 --- a/src/pages/docs/golem-js/reference/modules/storage_gftp.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Module storage/gftp" -pageTitle: "Module storage/gftp - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module storage/gftp within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: storage/gftp - -## Table of contents - -### Classes - -- [GftpStorageProvider](../classes/storage_gftp.GftpStorageProvider) diff --git a/src/pages/docs/golem-js/reference/modules/storage_null.md b/src/pages/docs/golem-js/reference/modules/storage_null.md deleted file mode 100644 index 7b7c53765..000000000 --- a/src/pages/docs/golem-js/reference/modules/storage_null.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Module storage/null" -pageTitle: "Module storage/null - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module storage/null within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: storage/null - -## Table of contents - -### Classes - -- [NullStorageProvider](../classes/storage_null.NullStorageProvider) diff --git a/src/pages/docs/golem-js/reference/modules/storage_provider.md b/src/pages/docs/golem-js/reference/modules/storage_provider.md deleted file mode 100644 index 11514c41b..000000000 --- a/src/pages/docs/golem-js/reference/modules/storage_provider.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: "Module storage/provider" -pageTitle: "Module storage/provider - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module storage/provider within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: storage/provider - -## Table of contents - -### Interfaces - -- [StorageProvider](../interfaces/storage_provider.StorageProvider) - -### Type Aliases - -- [StorageProviderDataCallback](storage_provider#storageproviderdatacallback) - -## Type Aliases - -### StorageProviderDataCallback - -Ƭ **StorageProviderDataCallback**: (`data`: `Uint8Array`) => `void` - -#### Type declaration - -▸ (`data`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `Uint8Array` | - -##### Returns - -`void` - -#### Defined in - -[src/storage/provider.ts:1](https://github.com/golemfactory/golem-js/blob/7cee55b/src/storage/provider.ts#L1) diff --git a/src/pages/docs/golem-js/reference/modules/storage_ws_browser.md b/src/pages/docs/golem-js/reference/modules/storage_ws_browser.md deleted file mode 100644 index eccfacae3..000000000 --- a/src/pages/docs/golem-js/reference/modules/storage_ws_browser.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Module storage/ws-browser" -pageTitle: "Module storage/ws-browser - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module storage/ws-browser within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: storage/ws-browser - -## Table of contents - -### Classes - -- [WebSocketBrowserStorageProvider](../classes/storage_ws_browser.WebSocketBrowserStorageProvider) - -### Interfaces - -- [WebSocketStorageProviderOptions](../interfaces/storage_ws_browser.WebSocketStorageProviderOptions) diff --git a/src/pages/docs/golem-js/reference/modules/task_batch.md b/src/pages/docs/golem-js/reference/modules/task_batch.md deleted file mode 100644 index bab311dfe..000000000 --- a/src/pages/docs/golem-js/reference/modules/task_batch.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Module task/batch" -pageTitle: "Module task/batch - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module task/batch within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: task/batch - -## Table of contents - -### Classes - -- [Batch](../classes/task_batch.Batch) diff --git a/src/pages/docs/golem-js/reference/modules/task_error.md b/src/pages/docs/golem-js/reference/modules/task_error.md deleted file mode 100644 index 3a7eee4b1..000000000 --- a/src/pages/docs/golem-js/reference/modules/task_error.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Module task/error" -pageTitle: "Module task/error - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module task/error within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: task/error - -## Table of contents - -### Enumerations - -- [WorkErrorCode](../enums/task_error.WorkErrorCode) - -### Classes - -- [GolemWorkError](../classes/task_error.GolemWorkError) diff --git a/src/pages/docs/golem-js/reference/modules/task_process.md b/src/pages/docs/golem-js/reference/modules/task_process.md deleted file mode 100644 index e4580aa82..000000000 --- a/src/pages/docs/golem-js/reference/modules/task_process.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Module task/process" -pageTitle: "Module task/process - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module task/process within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: task/process - -## Table of contents - -### Classes - -- [RemoteProcess](../classes/task_process.RemoteProcess) diff --git a/src/pages/docs/golem-js/reference/modules/task_service.md b/src/pages/docs/golem-js/reference/modules/task_service.md deleted file mode 100644 index 6e92310cc..000000000 --- a/src/pages/docs/golem-js/reference/modules/task_service.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Module task/service" -pageTitle: "Module task/service - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module task/service within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: task/service - -## Table of contents - -### Interfaces - -- [TaskServiceOptions](../interfaces/task_service.TaskServiceOptions) diff --git a/src/pages/docs/golem-js/reference/modules/task_task.md b/src/pages/docs/golem-js/reference/modules/task_task.md deleted file mode 100644 index 64897d5f5..000000000 --- a/src/pages/docs/golem-js/reference/modules/task_task.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "Module task/task" -pageTitle: "Module task/task - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module task/task within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: task/task - -## Table of contents - -### Enumerations - -- [TaskState](../enums/task_task.TaskState) - -### Classes - -- [Task](../classes/task_task.Task) - -### Type Aliases - -- [TaskOptions](task_task#taskoptions) - -## Type Aliases - -### TaskOptions - -Ƭ **TaskOptions**: `Object` - -#### Type declaration - -| Name | Type | Description | -| :------ | :------ | :------ | -| `maxRetries?` | `number` | maximum number of retries if task failed due to provider reason, default = 5 | -| `timeout?` | `number` | timeout in ms for task execution, including retries, default = 300_000 (5min) | -| `activityReadySetupFunctions?` | [`Worker`](task_work#worker)\<`unknown`\>[] | array of setup functions to run on each activity | - -#### Defined in - -[src/task/task.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/task.ts#L16) diff --git a/src/pages/docs/golem-js/reference/modules/task_work.md b/src/pages/docs/golem-js/reference/modules/task_work.md deleted file mode 100644 index e6d2386d6..000000000 --- a/src/pages/docs/golem-js/reference/modules/task_work.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "Module task/work" -pageTitle: "Module task/work - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module task/work within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: task/work - -## Table of contents - -### Classes - -- [WorkContext](../classes/task_work.WorkContext) - -### Interfaces - -- [WorkOptions](../interfaces/task_work.WorkOptions) -- [CommandOptions](../interfaces/task_work.CommandOptions) - -### Type Aliases - -- [Worker](task_work#worker) - -## Type Aliases - -### Worker - -Ƭ **Worker**\<`OutputType`\>: (`ctx`: [`WorkContext`](../classes/task_work.WorkContext)) => `Promise`\<`OutputType`\> - -#### Type parameters - -| Name | -| :------ | -| `OutputType` | - -#### Type declaration - -▸ (`ctx`): `Promise`\<`OutputType`\> - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `ctx` | [`WorkContext`](../classes/task_work.WorkContext) | - -##### Returns - -`Promise`\<`OutputType`\> - -#### Defined in - -[src/task/work.ts:24](https://github.com/golemfactory/golem-js/blob/7cee55b/src/task/work.ts#L24) diff --git a/src/pages/docs/golem-js/reference/modules/utils_env.md b/src/pages/docs/golem-js/reference/modules/utils_env.md deleted file mode 100644 index 061ecc172..000000000 --- a/src/pages/docs/golem-js/reference/modules/utils_env.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "Module utils/env" -pageTitle: "Module utils/env - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module utils/env within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: utils/env - -## Table of contents - -### Functions - -- [getYagnaApiUrl](utils_env#getyagnaapiurl) -- [getYagnaAppKey](utils_env#getyagnaappkey) -- [getYagnaSubnet](utils_env#getyagnasubnet) -- [getRepoUrl](utils_env#getrepourl) -- [getPaymentNetwork](utils_env#getpaymentnetwork) -- [isDevMode](utils_env#isdevmode) - -## Functions - -### getYagnaApiUrl - -▸ **getYagnaApiUrl**(): `string` - -#### Returns - -`string` - -#### Defined in - -[src/utils/env.ts:3](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/env.ts#L3) - -___ - -### getYagnaAppKey - -▸ **getYagnaAppKey**(): `string` - -#### Returns - -`string` - -#### Defined in - -[src/utils/env.ts:7](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/env.ts#L7) - -___ - -### getYagnaSubnet - -▸ **getYagnaSubnet**(): `string` - -#### Returns - -`string` - -#### Defined in - -[src/utils/env.ts:11](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/env.ts#L11) - -___ - -### getRepoUrl - -▸ **getRepoUrl**(): `string` - -#### Returns - -`string` - -#### Defined in - -[src/utils/env.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/env.ts#L15) - -___ - -### getPaymentNetwork - -▸ **getPaymentNetwork**(): `string` - -#### Returns - -`string` - -#### Defined in - -[src/utils/env.ts:21](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/env.ts#L21) - -___ - -### isDevMode - -▸ **isDevMode**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/utils/env.ts:25](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/env.ts#L25) diff --git a/src/pages/docs/golem-js/reference/modules/utils_logger_defaultLogger.md b/src/pages/docs/golem-js/reference/modules/utils_logger_defaultLogger.md deleted file mode 100644 index 05834a360..000000000 --- a/src/pages/docs/golem-js/reference/modules/utils_logger_defaultLogger.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: "Module utils/logger/defaultLogger" -pageTitle: "Module utils/logger/defaultLogger - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module utils/logger/defaultLogger within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: utils/logger/defaultLogger - -## Table of contents - -### Functions - -- [defaultLogger](utils_logger_defaultLogger#defaultlogger) - -## Functions - -### defaultLogger - -▸ **defaultLogger**(`namespace`): `Object` - -Creates a logger that uses the debug library. This logger is used by default by all entities in the SDK. -If the namespace is not prefixed with `golem-js:`, it will be prefixed automatically. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `namespace` | `string` | - -#### Returns - -`Object` - -| Name | Type | -| :------ | :------ | -| `child` | (`childNamespace`: `string`) => \{ child: (childNamespace: string) =\> ...; info: (msg: string) =\> void; error: (msg: string) =\> void; warn: (msg: string) =\> void; debug: (msg: string) =\> void; log: (msg: string, ctx?: Error \| Record\<...\> \| undefined) =\> void; } | -| `info` | (`msg`: `string`) => `void` | -| `error` | (`msg`: `string`) => `void` | -| `warn` | (`msg`: `string`) => `void` | -| `debug` | (`msg`: `string`) => `void` | -| `log` | (`msg`: `string`, `ctx?`: `Error` \| `Record`\<`string`, `unknown`\>) => `void` | - -#### Defined in - -[src/utils/logger/defaultLogger.ts:7](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/logger/defaultLogger.ts#L7) diff --git a/src/pages/docs/golem-js/reference/modules/utils_logger_jsonLogger.md b/src/pages/docs/golem-js/reference/modules/utils_logger_jsonLogger.md deleted file mode 100644 index 94ec7d354..000000000 --- a/src/pages/docs/golem-js/reference/modules/utils_logger_jsonLogger.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "Module utils/logger/jsonLogger" -pageTitle: "Module utils/logger/jsonLogger - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module utils/logger/jsonLogger within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: utils/logger/jsonLogger - -## Table of contents - -### Functions - -- [jsonLogger](utils_logger_jsonLogger#jsonlogger) - -## Functions - -### jsonLogger - -▸ **jsonLogger**(`filename?`): [`Logger`](../interfaces/utils_logger_logger.Logger) - -Create a logger that writes a JSON object for every log line. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `filename?` | `string` | path to the file to write to, if not specified, logs are written to stdout | - -#### Returns - -[`Logger`](../interfaces/utils_logger_logger.Logger) - -#### Defined in - -[src/utils/logger/jsonLogger.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/logger/jsonLogger.ts#L8) diff --git a/src/pages/docs/golem-js/reference/modules/utils_logger_logger.md b/src/pages/docs/golem-js/reference/modules/utils_logger_logger.md deleted file mode 100644 index 95b71b750..000000000 --- a/src/pages/docs/golem-js/reference/modules/utils_logger_logger.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Module utils/logger/logger" -pageTitle: "Module utils/logger/logger - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module utils/logger/logger within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: utils/logger/logger - -## Table of contents - -### Interfaces - -- [Logger](../interfaces/utils_logger_logger.Logger) diff --git a/src/pages/docs/golem-js/reference/modules/utils_logger_nullLogger.md b/src/pages/docs/golem-js/reference/modules/utils_logger_nullLogger.md deleted file mode 100644 index 1b2e1c790..000000000 --- a/src/pages/docs/golem-js/reference/modules/utils_logger_nullLogger.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "Module utils/logger/nullLogger" -pageTitle: "Module utils/logger/nullLogger - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module utils/logger/nullLogger within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: utils/logger/nullLogger - -## Table of contents - -### Functions - -- [nullLogger](utils_logger_nullLogger#nulllogger) - -## Functions - -### nullLogger - -▸ **nullLogger**(): [`Logger`](../interfaces/utils_logger_logger.Logger) - -#### Returns - -[`Logger`](../interfaces/utils_logger_logger.Logger) - -#### Defined in - -[src/utils/logger/nullLogger.ts:3](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/logger/nullLogger.ts#L3) diff --git a/src/pages/docs/golem-js/reference/modules/utils_logger_pinoLogger.md b/src/pages/docs/golem-js/reference/modules/utils_logger_pinoLogger.md deleted file mode 100644 index e6b4702be..000000000 --- a/src/pages/docs/golem-js/reference/modules/utils_logger_pinoLogger.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "Module utils/logger/pinoLogger" -pageTitle: "Module utils/logger/pinoLogger - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module utils/logger/pinoLogger within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: utils/logger/pinoLogger - -## Table of contents - -### Functions - -- [pinoLogger](utils_logger_pinoLogger#pinologger) - -## Functions - -### pinoLogger - -▸ **pinoLogger**(`optionsOrStream?`): [`Logger`](../interfaces/utils_logger_logger.Logger) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `optionsOrStream?` | `LoggerOptions`\<`never`\> \| `DestinationStream` | - -#### Returns - -[`Logger`](../interfaces/utils_logger_logger.Logger) - -#### Defined in - -[src/utils/logger/pinoLogger.ts:4](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/logger/pinoLogger.ts#L4) diff --git a/src/pages/docs/golem-js/reference/modules/utils_runtimeContextChecker.md b/src/pages/docs/golem-js/reference/modules/utils_runtimeContextChecker.md deleted file mode 100644 index 85497df5d..000000000 --- a/src/pages/docs/golem-js/reference/modules/utils_runtimeContextChecker.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: "Module utils/runtimeContextChecker" -pageTitle: "Module utils/runtimeContextChecker - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module utils/runtimeContextChecker within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: utils/runtimeContextChecker - -## Table of contents - -### Variables - -- [isNode](utils_runtimeContextChecker#isnode) - -## Variables - -### isNode - -• `Const` **isNode**: `boolean` - -#### Defined in - -[src/utils/runtimeContextChecker.ts:8](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/runtimeContextChecker.ts#L8) diff --git a/src/pages/docs/golem-js/reference/modules/utils_types.md b/src/pages/docs/golem-js/reference/modules/utils_types.md deleted file mode 100644 index 4b73427f8..000000000 --- a/src/pages/docs/golem-js/reference/modules/utils_types.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "Module utils/types" -pageTitle: "Module utils/types - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module utils/types within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: utils/types - -## Table of contents - -### Type Aliases - -- [RequireAtLeastOne](utils_types#requireatleastone) - -## Type Aliases - -### RequireAtLeastOne - -Ƭ **RequireAtLeastOne**\<`T`, `Keys`\>: `Pick`\<`T`, `Exclude`\\> & \{ [K in Keys]-?: Required\\> & Partial\\>\> }[`Keys`] - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | `T` | -| `Keys` | extends keyof `T` = keyof `T` | - -#### Defined in - -[src/utils/types.ts:12](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/types.ts#L12) diff --git a/src/pages/docs/golem-js/reference/modules/utils_yagna_activity.md b/src/pages/docs/golem-js/reference/modules/utils_yagna_activity.md deleted file mode 100644 index c69dcc615..000000000 --- a/src/pages/docs/golem-js/reference/modules/utils_yagna_activity.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Module utils/yagna/activity" -pageTitle: "Module utils/yagna/activity - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module utils/yagna/activity within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: utils/yagna/activity - -## Table of contents - -### Classes - -- [RequestorApi](../classes/utils_yagna_activity.RequestorApi) diff --git a/src/pages/docs/golem-js/reference/modules/utils_yagna_gsb.md b/src/pages/docs/golem-js/reference/modules/utils_yagna_gsb.md deleted file mode 100644 index 1d4a81370..000000000 --- a/src/pages/docs/golem-js/reference/modules/utils_yagna_gsb.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "Module utils/yagna/gsb" -pageTitle: "Module utils/yagna/gsb - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module utils/yagna/gsb within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: utils/yagna/gsb - -## Table of contents - -### Classes - -- [RequestorApi](../classes/utils_yagna_gsb.RequestorApi) - -### Type Aliases - -- [ServiceModel](utils_yagna_gsb#servicemodel) -- [GftpFileInfo](utils_yagna_gsb#gftpfileinfo) - -## Type Aliases - -### ServiceModel - -Ƭ **ServiceModel**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `servicesId` | `string` | - -#### Defined in - -[src/utils/yagna/gsb.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/gsb.ts#L5) - -___ - -### GftpFileInfo - -Ƭ **GftpFileInfo**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `url` | `string` | - -#### Defined in - -[src/utils/yagna/gsb.ts:9](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/gsb.ts#L9) diff --git a/src/pages/docs/golem-js/reference/modules/utils_yagna_identity.md b/src/pages/docs/golem-js/reference/modules/utils_yagna_identity.md deleted file mode 100644 index 98dc10113..000000000 --- a/src/pages/docs/golem-js/reference/modules/utils_yagna_identity.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Module utils/yagna/identity" -pageTitle: "Module utils/yagna/identity - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module utils/yagna/identity within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: utils/yagna/identity - -## Table of contents - -### Classes - -- [RequestorApi](../classes/utils_yagna_identity.RequestorApi) - -### Interfaces - -- [IdentityModel](../interfaces/utils_yagna_identity.IdentityModel) diff --git a/src/pages/docs/golem-js/reference/modules/utils_yagna_yagna.md b/src/pages/docs/golem-js/reference/modules/utils_yagna_yagna.md deleted file mode 100644 index fef114d04..000000000 --- a/src/pages/docs/golem-js/reference/modules/utils_yagna_yagna.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "Module utils/yagna/yagna" -pageTitle: "Module utils/yagna/yagna - golem-js API Reference" -description: "Explore the detailed API reference documentation for the Module utils/yagna/yagna within the golem-js SDK for the Golem Network." -type: "JS API Reference" ---- -# Module: utils/yagna/yagna - -## Table of contents - -### Classes - -- [Yagna](../classes/utils_yagna_yagna.Yagna) - -### Type Aliases - -- [YagnaApi](utils_yagna_yagna#yagnaapi) -- [YagnaOptions](utils_yagna_yagna#yagnaoptions) - -### Variables - -- [MIN\_SUPPORTED\_YAGNA](utils_yagna_yagna#min_supported_yagna) - -## Type Aliases - -### YagnaApi - -Ƭ **YagnaApi**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `market` | `MarketRequestorApi` | -| `activity` | \{ `control`: `RequestorControlApi` ; `state`: [`RequestorApi`](../classes/utils_yagna_activity.RequestorApi) } | -| `activity.control` | `RequestorControlApi` | -| `activity.state` | [`RequestorApi`](../classes/utils_yagna_activity.RequestorApi) | -| `net` | `NetworkRequestorApi` | -| `payment` | `PaymentRequestorApi` | -| `identity` | [`RequestorApi`](../classes/utils_yagna_identity.RequestorApi) | -| `gsb` | [`RequestorApi`](../classes/utils_yagna_gsb.RequestorApi) | -| `yagnaOptions` | [`YagnaOptions`](utils_yagna_yagna#yagnaoptions) | -| `appSessionId` | `string` | - -#### Defined in - -[src/utils/yagna/yagna.ts:16](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L16) - -___ - -### YagnaOptions - -Ƭ **YagnaOptions**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `apiKey?` | `string` | -| `basePath?` | `string` | -| `abortController?` | `AbortController` | - -#### Defined in - -[src/utils/yagna/yagna.ts:27](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L27) - -## Variables - -### MIN\_SUPPORTED\_YAGNA - -• `Const` **MIN\_SUPPORTED\_YAGNA**: ``"0.13.2"`` - -#### Defined in - -[src/utils/yagna/yagna.ts:52](https://github.com/golemfactory/golem-js/blob/7cee55b/src/utils/yagna/yagna.ts#L52) diff --git a/src/pages/docs/golem-js/reference/overview.md b/src/pages/docs/golem-js/reference/overview.md index 10ada5640..59f4d26ce 100644 --- a/src/pages/docs/golem-js/reference/overview.md +++ b/src/pages/docs/golem-js/reference/overview.md @@ -6,167 +6,279 @@ type: JS API Reference * Classes * [Activity](classes/activity_activity.Activity) + * [ActivityModuleImpl](classes/activity_activity_module.ActivityModuleImpl) + * [ExeScriptExecutor](classes/activity_exe_script_executor.ExeScriptExecutor) + * [Batch](classes/activity_exe_unit_batch.Batch) + * [GolemWorkError](classes/activity_exe_unit_error.GolemWorkError) + * [ExeUnit](classes/activity_exe_unit_exe_unit.ExeUnit) + * [RemoteProcess](classes/activity_exe_unit_process.RemoteProcess) * [Result](classes/activity_results.Result) - * [AgreementCandidate](classes/agreement_service.AgreementCandidate) - * [GolemAbortError](classes/error_golem_error.GolemAbortError) - * [GolemConfigError](classes/error_golem_error.GolemConfigError) - * [GolemError](classes/error_golem_error.GolemError) - * [GolemInternalError](classes/error_golem_error.GolemInternalError) - * [GolemModuleError](classes/error_golem_error.GolemModuleError) - * [GolemPlatformError](classes/error_golem_error.GolemPlatformError) - * [GolemTimeoutError](classes/error_golem_error.GolemTimeoutError) - * [GolemUserError](classes/error_golem_error.GolemUserError) - * [ActivityCreated](classes/events_events.ActivityCreated) - * [ActivityDestroyed](classes/events_events.ActivityDestroyed) - * [ActivityStateChanged](classes/events_events.ActivityStateChanged) - * [AgreementConfirmed](classes/events_events.AgreementConfirmed) - * [AgreementCreated](classes/events_events.AgreementCreated) - * [AgreementRejected](classes/events_events.AgreementRejected) - * [AgreementTerminated](classes/events_events.AgreementTerminated) - * [AllocationCreated](classes/events_events.AllocationCreated) - * [BaseEvent](classes/events_events.BaseEvent) - * [CollectFailed](classes/events_events.CollectFailed) - * [ComputationFailed](classes/events_events.ComputationFailed) - * [ComputationFinished](classes/events_events.ComputationFinished) - * [ComputationStarted](classes/events_events.ComputationStarted) - * [DebitNoteAccepted](classes/events_events.DebitNoteAccepted) - * [DebitNoteReceived](classes/events_events.DebitNoteReceived) - * [DemandFailed](classes/events_events.DemandFailed) - * [DemandSubscribed](classes/events_events.DemandSubscribed) - * [DemandUnsubscribed](classes/events_events.DemandUnsubscribed) - * [InvoiceReceived](classes/events_events.InvoiceReceived) - * [PackageCreated](classes/events_events.PackageCreated) - * [PaymentAccepted](classes/events_events.PaymentAccepted) - * [PaymentFailed](classes/events_events.PaymentFailed) - * [ProposalConfirmed](classes/events_events.ProposalConfirmed) - * [ProposalFailed](classes/events_events.ProposalFailed) - * [ProposalReceived](classes/events_events.ProposalReceived) - * [ProposalRejected](classes/events_events.ProposalRejected) - * [ProposalResponded](classes/events_events.ProposalResponded) - * [ScriptExecuted](classes/events_events.ScriptExecuted) - * [ScriptSent](classes/events_events.ScriptSent) - * [TaskFinished](classes/events_events.TaskFinished) - * [TaskRedone](classes/events_events.TaskRedone) - * [TaskRejected](classes/events_events.TaskRejected) - * [TaskStarted](classes/events_events.TaskStarted) - * [TaskExecutor](classes/executor_executor.TaskExecutor) + * [Command](classes/activity_script_command.Command) + * [Deploy](classes/activity_script_command.Deploy) + * [DownloadData](classes/activity_script_command.DownloadData) + * [DownloadFile](classes/activity_script_command.DownloadFile) + * [Run](classes/activity_script_command.Run) + * [Start](classes/activity_script_command.Start) + * [Terminate](classes/activity_script_command.Terminate) + * [Transfer](classes/activity_script_command.Transfer) + * [UploadData](classes/activity_script_command.UploadData) + * [UploadFile](classes/activity_script_command.UploadFile) + * [Script](classes/activity_script_script.Script) + * [GolemDeploymentBuilder](classes/experimental_deployment_builder.GolemDeploymentBuilder) + * [Deployment](classes/experimental_deployment_deployment.Deployment) + * [Job](classes/experimental_job_job.Job) + * [JobManager](classes/experimental_job_job_manager.JobManager) + * [GolemReputationError](classes/experimental_reputation_error.GolemReputationError) + * [ReputationSystem](classes/experimental_reputation_system.ReputationSystem) * [GolemNetwork](classes/golem_network_golem_network.GolemNetwork) - * [Job](classes/job_job.Job) + * [Agreement](classes/market_agreement_agreement.Agreement) + * [Demand](classes/market_demand_demand.Demand) + * [DemandSpecification](classes/market_demand_demand.DemandSpecification) + * [DemandBodyBuilder](classes/market_demand_demand_body_builder.DemandBodyBuilder) + * [BaseConfig](classes/market_demand_directors_base_config.BaseConfig) + * [BasicDemandDirector](classes/market_demand_directors_basic_demand_director.BasicDemandDirector) + * [BasicDemandDirectorConfig](classes/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfig) + * [PaymentDemandDirector](classes/market_demand_directors_payment_demand_director.PaymentDemandDirector) + * [PaymentDemandDirectorConfig](classes/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfig) + * [WorkloadDemandDirector](classes/market_demand_directors_workload_demand_director.WorkloadDemandDirector) + * [WorkloadDemandDirectorConfig](classes/market_demand_directors_workload_demand_director_config.WorkloadDemandDirectorConfig) + * [DraftOfferProposalPool](classes/market_draft_offer_proposal_pool.DraftOfferProposalPool) * [GolemMarketError](classes/market_error.GolemMarketError) - * [Proposal](classes/market_proposal.Proposal) - * [ProposalsBatch](classes/market_proposals_batch.ProposalsBatch) + * [MarketModuleImpl](classes/market_market_module.MarketModuleImpl) + * [MarketProposal](classes/market_proposal_market_proposal.MarketProposal) + * [OfferCounterProposal](classes/market_proposal_offer_counter_proposal.OfferCounterProposal) + * [OfferProposal](classes/market_proposal_offer_proposal.OfferProposal) + * [ProposalsBatch](classes/market_proposal_proposals_batch.ProposalsBatch) * [GolemNetworkError](classes/network_error.GolemNetworkError) + * [Network](classes/network_network.Network) + * [NetworkModuleImpl](classes/network_network_module.NetworkModuleImpl) * [NetworkNode](classes/network_node.NetworkNode) - * [Package](classes/package_package.Package) + * [TcpProxy](classes/network_tcpProxy.TcpProxy) + * [BaseDocument](classes/payment_BaseDocument.BaseDocument) * [InvoiceProcessor](classes/payment_InvoiceProcessor.InvoiceProcessor) + * [PayerDetails](classes/payment_PayerDetails.PayerDetails) * [AgreementPaymentProcess](classes/payment_agreement_payment_process.AgreementPaymentProcess) + * [Allocation](classes/payment_allocation.Allocation) + * [DebitNote](classes/payment_debit_note.DebitNote) * [GolemPaymentError](classes/payment_error.GolemPaymentError) - * [Payments](classes/payment_payments.Payments) - * [DownloadData](classes/script_command.DownloadData) - * [Terminate](classes/script_command.Terminate) - * [UploadData](classes/script_command.UploadData) - * [GftpStorageProvider](classes/storage_gftp.GftpStorageProvider) - * [NullStorageProvider](classes/storage_null.NullStorageProvider) - * [WebSocketBrowserStorageProvider](classes/storage_ws_browser.WebSocketBrowserStorageProvider) - * [Batch](classes/task_batch.Batch) - * [GolemWorkError](classes/task_error.GolemWorkError) - * [RemoteProcess](classes/task_process.RemoteProcess) - * [Task](classes/task_task.Task) - * [WorkContext](classes/task_work.WorkContext) - * [RequestorApi](classes/utils_yagna_activity.RequestorApi) - * [RequestorApi](classes/utils_yagna_gsb.RequestorApi) - * [RequestorApi](classes/utils_yagna_identity.RequestorApi) - * [Yagna](classes/utils_yagna_yagna.Yagna) + * [Invoice](classes/payment_invoice.Invoice) + * [PaymentModuleImpl](classes/payment_payment_module.PaymentModuleImpl) + * [RentalModuleImpl](classes/resource_rental_rental_module.RentalModuleImpl) + * [ResourceRental](classes/resource_rental_resource_rental.ResourceRental) + * [ResourceRentalPool](classes/resource_rental_resource_rental_pool.ResourceRentalPool) + * [CacheService](classes/shared_cache_CacheService.CacheService) + * [GolemAbortError](classes/shared_error_golem_error.GolemAbortError) + * [GolemConfigError](classes/shared_error_golem_error.GolemConfigError) + * [GolemError](classes/shared_error_golem_error.GolemError) + * [GolemInternalError](classes/shared_error_golem_error.GolemInternalError) + * [GolemModuleError](classes/shared_error_golem_error.GolemModuleError) + * [GolemPlatformError](classes/shared_error_golem_error.GolemPlatformError) + * [GolemTimeoutError](classes/shared_error_golem_error.GolemTimeoutError) + * [GolemUserError](classes/shared_error_golem_error.GolemUserError) + * [GftpServerAdapter](classes/shared_storage_GftpServerAdapter.GftpServerAdapter) + * [GftpStorageProvider](classes/shared_storage_gftp.GftpStorageProvider) + * [NullStorageProvider](classes/shared_storage_null.NullStorageProvider) + * [WebSocketBrowserStorageProvider](classes/shared_storage_ws_browser.WebSocketBrowserStorageProvider) + * [ActivityApiAdapter](classes/shared_yagna_adapters_activity_api_adapter.ActivityApiAdapter) + * [MarketApiAdapter](classes/shared_yagna_adapters_market_api_adapter.MarketApiAdapter) + * [NetworkApiAdapter](classes/shared_yagna_adapters_network_api_adapter.NetworkApiAdapter) + * [PaymentApiAdapter](classes/shared_yagna_adapters_payment_api_adapter.PaymentApiAdapter) + * [EventReader](classes/shared_yagna_event_reader.EventReader) + * [ActivityRepository](classes/shared_yagna_repository_activity_repository.ActivityRepository) + * [AgreementRepository](classes/shared_yagna_repository_agreement_repository.AgreementRepository) + * [DebitNoteRepository](classes/shared_yagna_repository_debit_note_repository.DebitNoteRepository) + * [DemandRepository](classes/shared_yagna_repository_demand_repository.DemandRepository) + * [InvoiceRepository](classes/shared_yagna_repository_invoice_repository.InvoiceRepository) + * [ProposalRepository](classes/shared_yagna_repository_proposal_repository.ProposalRepository) + * [YagnaApi](classes/shared_yagna_yagnaApi.YagnaApi) * Enums * [ActivityStateEnum](enums/activity_activity.ActivityStateEnum) + * [WorkErrorCode](enums/activity_exe_unit_error.WorkErrorCode) + * [DeploymentState](enums/experimental_deployment_deployment.DeploymentState) + * [JobState](enums/experimental_job_job.JobState) + * [ComparisonOperator](enums/market_demand_demand_body_builder.ComparisonOperator) + * [PackageFormat](enums/market_demand_directors_workload_demand_director_config.PackageFormat) * [MarketErrorCode](enums/market_error.MarketErrorCode) * [NetworkErrorCode](enums/network_error.NetworkErrorCode) + * [NetworkState](enums/network_network.NetworkState) * [PaymentErrorCode](enums/payment_error.PaymentErrorCode) - * [WorkErrorCode](enums/task_error.WorkErrorCode) - * [TaskState](enums/task_task.TaskState) + * [RejectionReason](enums/payment_rejection.RejectionReason) * Interfaces - * [ActivityOptions](interfaces/activity_activity.ActivityOptions) - * [ExeScriptRequest](interfaces/activity_activity.ExeScriptRequest) + * [IActivityRepository](interfaces/activity_activity.IActivityRepository) + * [ActivityModule](interfaces/activity_activity_module.ActivityModule) + * [ActivityModuleOptions](interfaces/activity_activity_module.ActivityModuleOptions) + * [IFileServer](interfaces/activity_activity_module.IFileServer) + * [IActivityApi](interfaces/activity_api.IActivityApi) + * [ExeScriptRequest](interfaces/activity_exe_script_executor.ExeScriptRequest) + * [ExecutionOptions](interfaces/activity_exe_script_executor.ExecutionOptions) + * [ActivityDTO](interfaces/activity_exe_unit_exe_unit.ActivityDTO) + * [CommandOptions](interfaces/activity_exe_unit_exe_unit.CommandOptions) + * [ExeUnitOptions](interfaces/activity_exe_unit_exe_unit.ExeUnitOptions) * [ResultData](interfaces/activity_results.ResultData) + * [RuntimeEventFinished](interfaces/activity_results.RuntimeEventFinished) * [RuntimeEventKind](interfaces/activity_results.RuntimeEventKind) + * [RuntimeEventStarted](interfaces/activity_results.RuntimeEventStarted) * [StreamingBatchEvent](interfaces/activity_results.StreamingBatchEvent) - * [ProviderInfo](interfaces/agreement_agreement.ProviderInfo) - * [AgreementDTO](interfaces/agreement_service.AgreementDTO) - * [AgreementServiceOptions](interfaces/agreement_service.AgreementServiceOptions) - * [TaskExecutorEventsDict](interfaces/executor_events.TaskExecutorEventsDict) - * [JobEventsDict](interfaces/job_job.JobEventsDict) - * [DemandDetails](interfaces/market_demand.DemandDetails) - * [DemandOptions](interfaces/market_demand.DemandOptions) - * [ProposalDetails](interfaces/market_proposal.ProposalDetails) - * [MarketOptions](interfaces/market_service.MarketOptions) + * [CreateResourceRentalPoolOptions](interfaces/experimental_deployment_builder.CreateResourceRentalPoolOptions) + * [DeploymentOptions](interfaces/experimental_deployment_builder.DeploymentOptions) + * [DeploymentEvents](interfaces/experimental_deployment_deployment.DeploymentEvents) + * [JobEventsDict](interfaces/experimental_job_job.JobEventsDict) + * [ProposalFilterOptions](interfaces/experimental_reputation_types.ProposalFilterOptions) + * [ProposalSelectorOptions](interfaces/experimental_reputation_types.ProposalSelectorOptions) + * [ReputationConfig](interfaces/experimental_reputation_types.ReputationConfig) + * [ReputationData](interfaces/experimental_reputation_types.ReputationData) + * [ReputationPreset](interfaces/experimental_reputation_types.ReputationPreset) + * [ReputationPresets](interfaces/experimental_reputation_types.ReputationPresets) + * [ReputationProviderEntry](interfaces/experimental_reputation_types.ReputationProviderEntry) + * [ReputationProviderScores](interfaces/experimental_reputation_types.ReputationProviderScores) + * [ReputationRejectedOperator](interfaces/experimental_reputation_types.ReputationRejectedOperator) + * [ReputationRejectedProvider](interfaces/experimental_reputation_types.ReputationRejectedProvider) + * [ReputationUntestedProvider](interfaces/experimental_reputation_types.ReputationUntestedProvider) + * [ReputationWeightsMixin](interfaces/experimental_reputation_types.ReputationWeightsMixin) + * [GolemNetworkEvents](interfaces/golem_network_golem_network.GolemNetworkEvents) + * [GolemNetworkOptions](interfaces/golem_network_golem_network.GolemNetworkOptions) + * [ManyOfOptions](interfaces/golem_network_golem_network.ManyOfOptions) + * [MarketOrderSpec](interfaces/golem_network_golem_network.MarketOrderSpec) + * [OneOfOptions](interfaces/golem_network_golem_network.OneOfOptions) + * [AgreementOptions](interfaces/market_agreement_agreement.AgreementOptions) + * [IAgreementRepository](interfaces/market_agreement_agreement.IAgreementRepository) + * [ProviderInfo](interfaces/market_agreement_agreement.ProviderInfo) + * [IMarketApi](interfaces/market_api.IMarketApi) + * [BasicDemandPropertyConfig](interfaces/market_demand_demand.BasicDemandPropertyConfig) + * [IDemandRepository](interfaces/market_demand_demand.IDemandRepository) + * [BasicDemandDirectorConfigOptions](interfaces/market_demand_directors_basic_demand_director_config.BasicDemandDirectorConfigOptions) + * [PaymentDemandDirectorConfigOptions](interfaces/market_demand_directors_payment_demand_director_config.PaymentDemandDirectorConfigOptions) + * [ProposalPoolEvents](interfaces/market_draft_offer_proposal_pool.ProposalPoolEvents) + * [ProposalPoolOptions](interfaces/market_draft_offer_proposal_pool.ProposalPoolOptions) + * [IDemandDirector](interfaces/market_market_module.IDemandDirector) + * [MarketModule](interfaces/market_market_module.MarketModule) + * [MarketOptions](interfaces/market_market_module.MarketOptions) + * [IProposalRepository](interfaces/market_proposal_market_proposal.IProposalRepository) + * [INetworkApi](interfaces/network_api.INetworkApi) + * [NetworkEvents](interfaces/network_api.NetworkEvents) * [NetworkInfo](interfaces/network_network.NetworkInfo) - * [PackageDetails](interfaces/package_package.PackageDetails) + * [NetworkModule](interfaces/network_network_module.NetworkModule) + * [NetworkOptions](interfaces/network_network_module.NetworkOptions) + * [TcpProxyEvents](interfaces/network_tcpProxy.TcpProxyEvents) + * [TcpProxyOptions](interfaces/network_tcpProxy.TcpProxyOptions) + * [BaseModel](interfaces/payment_BaseDocument.BaseModel) + * [PaymentProcessOptions](interfaces/payment_agreement_payment_process.PaymentProcessOptions) + * [AllocationOptions](interfaces/payment_allocation.AllocationOptions) + * [IPaymentApi](interfaces/payment_api.IPaymentApi) * [BasePaymentOptions](interfaces/payment_config.BasePaymentOptions) - * [DebitNoteDTO](interfaces/payment_debit_note.DebitNoteDTO) - * [InvoiceDTO](interfaces/payment_invoice.InvoiceDTO) - * [PaymentOptions](interfaces/payment_payments.PaymentOptions) + * [IDebitNoteRepository](interfaces/payment_debit_note.IDebitNoteRepository) + * [IInvoiceRepository](interfaces/payment_invoice.IInvoiceRepository) + * [PaymentModule](interfaces/payment_payment_module.PaymentModule) + * [PaymentModuleOptions](interfaces/payment_payment_module.PaymentModuleOptions) + * [Rejection](interfaces/payment_rejection.Rejection) * [PaymentOptions](interfaces/payment_service.PaymentOptions) - * [StorageProvider](interfaces/storage_provider.StorageProvider) - * [WebSocketStorageProviderOptions](interfaces/storage_ws_browser.WebSocketStorageProviderOptions) - * [TaskServiceOptions](interfaces/task_service.TaskServiceOptions) - * [CommandOptions](interfaces/task_work.CommandOptions) - * [WorkOptions](interfaces/task_work.WorkOptions) - * [Logger](interfaces/utils_logger_logger.Logger) - * [IdentityModel](interfaces/utils_yagna_identity.IdentityModel) + * [RentalModule](interfaces/resource_rental_rental_module.RentalModule) + * [ResourceRentalEvents](interfaces/resource_rental_resource_rental.ResourceRentalEvents) + * [ResourceRentalOptions](interfaces/resource_rental_resource_rental.ResourceRentalOptions) + * [ResourceRentalPoolDependencies](interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolDependencies) + * [ResourceRentalPoolEvents](interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolEvents) + * [ResourceRentalPoolOptions](interfaces/resource_rental_resource_rental_pool.ResourceRentalPoolOptions) + * [StorageProvider](interfaces/shared_storage_provider.StorageProvider) + * [WebSocketStorageProviderOptions](interfaces/shared_storage_ws_browser.WebSocketStorageProviderOptions) + * [Logger](interfaces/shared_utils_logger_logger.Logger) + * [YagnaExeScriptObserver](interfaces/shared_yagna_yagnaApi.YagnaExeScriptObserver) * Modules * [activity/activity](modules/activity_activity) + * [activity/activity.module](modules/activity_activity_module) + * [activity/api](modules/activity_api) + * [activity/exe-script-executor](modules/activity_exe_script_executor) + * [activity/exe-unit/batch](modules/activity_exe_unit_batch) + * [activity/exe-unit/error](modules/activity_exe_unit_error) + * [activity/exe-unit/exe-unit](modules/activity_exe_unit_exe_unit) + * [activity/exe-unit/process](modules/activity_exe_unit_process) * [activity/results](modules/activity_results) - * [agreement/agreement](modules/agreement_agreement) - * [agreement/service](modules/agreement_service) - * [agreement/strategy](modules/agreement_strategy) - * [error/golem-error](modules/error_golem_error) - * [events/events](modules/events_events) - * [executor/events](modules/executor_events) - * [executor/executor](modules/executor_executor) - * [golem_network/golem_network](modules/golem_network_golem_network) - * [job/job](modules/job_job) - * [market/builder](modules/market_builder) - * [market/demand](modules/market_demand) + * [activity/script/command](modules/activity_script_command) + * [activity/script/script](modules/activity_script_script) + * [experimental/deployment/builder](modules/experimental_deployment_builder) + * [experimental/deployment/deployment](modules/experimental_deployment_deployment) + * [experimental/deployment/validate-deployment](modules/experimental_deployment_validate_deployment) + * [experimental/job/job](modules/experimental_job_job) + * [experimental/job/job_manager](modules/experimental_job_job_manager) + * [experimental/reputation/error](modules/experimental_reputation_error) + * [experimental/reputation/system](modules/experimental_reputation_system) + * [experimental/reputation/types](modules/experimental_reputation_types) + * [golem-network/golem-network](modules/golem_network_golem_network) + * [market/agreement/agreement](modules/market_agreement_agreement) + * [market/agreement/agreement-event](modules/market_agreement_agreement_event) + * [market/api](modules/market_api) + * [market/demand/demand](modules/market_demand_demand) + * [market/demand/demand-body-builder](modules/market_demand_demand_body_builder) + * [market/demand/directors/base-config](modules/market_demand_directors_base_config) + * [market/demand/directors/basic-demand-director](modules/market_demand_directors_basic_demand_director) + * [market/demand/directors/basic-demand-director-config](modules/market_demand_directors_basic_demand_director_config) + * [market/demand/directors/payment-demand-director](modules/market_demand_directors_payment_demand_director) + * [market/demand/directors/payment-demand-director-config](modules/market_demand_directors_payment_demand_director_config) + * [market/demand/directors/workload-demand-director](modules/market_demand_directors_workload_demand_director) + * [market/demand/directors/workload-demand-director-config](modules/market_demand_directors_workload_demand_director_config) + * [market/demand/options](modules/market_demand_options) + * [market/draft-offer-proposal-pool](modules/market_draft_offer_proposal_pool) * [market/error](modules/market_error) * [market/helpers](modules/market_helpers) - * [market/proposal](modules/market_proposal) - * [market/proposals_batch](modules/market_proposals_batch) - * [market/service](modules/market_service) + * [market/market.module](modules/market_market_module) + * [market/proposal/market-proposal](modules/market_proposal_market_proposal) + * [market/proposal/market-proposal-event](modules/market_proposal_market_proposal_event) + * [market/proposal/offer-counter-proposal](modules/market_proposal_offer_counter_proposal) + * [market/proposal/offer-proposal](modules/market_proposal_offer_proposal) + * [market/proposal/proposal-properties](modules/market_proposal_proposal_properties) + * [market/proposal/proposals_batch](modules/market_proposal_proposals_batch) * [market/strategy](modules/market_strategy) + * [network/api](modules/network_api) * [network/error](modules/network_error) * [network/network](modules/network_network) + * [network/network.module](modules/network_network_module) * [network/node](modules/network_node) - * [network/service](modules/network_service) - * [package/package](modules/package_package) + * [network/tcpProxy](modules/network_tcpProxy) + * [payment/BaseDocument](modules/payment_BaseDocument) * [payment/InvoiceProcessor](modules/payment_InvoiceProcessor) + * [payment/PayerDetails](modules/payment_PayerDetails) * [payment/agreement_payment_process](modules/payment_agreement_payment_process) + * [payment/allocation](modules/payment_allocation) + * [payment/api](modules/payment_api) * [payment/config](modules/payment_config) * [payment/debit_note](modules/payment_debit_note) * [payment/error](modules/payment_error) * [payment/invoice](modules/payment_invoice) - * [payment/payments](modules/payment_payments) + * [payment/payment.module](modules/payment_payment_module) + * [payment/rejection](modules/payment_rejection) * [payment/service](modules/payment_service) * [payment/strategy](modules/payment_strategy) - * [script/command](modules/script_command) - * [storage/gftp](modules/storage_gftp) - * [storage/null](modules/storage_null) - * [storage/provider](modules/storage_provider) - * [storage/ws-browser](modules/storage_ws_browser) - * [task/batch](modules/task_batch) - * [task/error](modules/task_error) - * [task/process](modules/task_process) - * [task/service](modules/task_service) - * [task/task](modules/task_task) - * [task/work](modules/task_work) - * [utils/env](modules/utils_env) - * [utils/logger/defaultLogger](modules/utils_logger_defaultLogger) - * [utils/logger/jsonLogger](modules/utils_logger_jsonLogger) - * [utils/logger/logger](modules/utils_logger_logger) - * [utils/logger/nullLogger](modules/utils_logger_nullLogger) - * [utils/logger/pinoLogger](modules/utils_logger_pinoLogger) - * [utils/runtimeContextChecker](modules/utils_runtimeContextChecker) - * [utils/types](modules/utils_types) - * [utils/yagna/activity](modules/utils_yagna_activity) - * [utils/yagna/gsb](modules/utils_yagna_gsb) - * [utils/yagna/identity](modules/utils_yagna_identity) - * [utils/yagna/yagna](modules/utils_yagna_yagna) \ No newline at end of file + * [resource-rental/rental.module](modules/resource_rental_rental_module) + * [resource-rental/resource-rental](modules/resource_rental_resource_rental) + * [resource-rental/resource-rental-pool](modules/resource_rental_resource_rental_pool) + * [shared/cache/CacheService](modules/shared_cache_CacheService) + * [shared/error/golem-error](modules/shared_error_golem_error) + * [shared/storage/GftpServerAdapter](modules/shared_storage_GftpServerAdapter) + * [shared/storage/default](modules/shared_storage_default) + * [shared/storage/gftp](modules/shared_storage_gftp) + * [shared/storage/null](modules/shared_storage_null) + * [shared/storage/provider](modules/shared_storage_provider) + * [shared/storage/ws-browser](modules/shared_storage_ws_browser) + * [shared/types](modules/shared_types) + * [shared/utils/abortSignal](modules/shared_utils_abortSignal) + * [shared/utils/apiErrorMessage](modules/shared_utils_apiErrorMessage) + * [shared/utils/env](modules/shared_utils_env) + * [shared/utils/eventLoop](modules/shared_utils_eventLoop) + * [shared/utils/logger/defaultLogger](modules/shared_utils_logger_defaultLogger) + * [shared/utils/logger/logger](modules/shared_utils_logger_logger) + * [shared/utils/logger/nullLogger](modules/shared_utils_logger_nullLogger) + * [shared/utils/runtimeContextChecker](modules/shared_utils_runtimeContextChecker) + * [shared/utils/timeout](modules/shared_utils_timeout) + * [shared/utils/types](modules/shared_utils_types) + * [shared/utils/wait](modules/shared_utils_wait) + * [shared/yagna/adapters/activity-api-adapter](modules/shared_yagna_adapters_activity_api_adapter) + * [shared/yagna/adapters/market-api-adapter](modules/shared_yagna_adapters_market_api_adapter) + * [shared/yagna/adapters/network-api-adapter](modules/shared_yagna_adapters_network_api_adapter) + * [shared/yagna/adapters/payment-api-adapter](modules/shared_yagna_adapters_payment_api_adapter) + * [shared/yagna/event-reader](modules/shared_yagna_event_reader) + * [shared/yagna/repository/activity-repository](modules/shared_yagna_repository_activity_repository) + * [shared/yagna/repository/agreement-repository](modules/shared_yagna_repository_agreement_repository) + * [shared/yagna/repository/debit-note-repository](modules/shared_yagna_repository_debit_note_repository) + * [shared/yagna/repository/demand-repository](modules/shared_yagna_repository_demand_repository) + * [shared/yagna/repository/invoice-repository](modules/shared_yagna_repository_invoice_repository) + * [shared/yagna/repository/proposal-repository](modules/shared_yagna_repository_proposal_repository) + * [shared/yagna/yagnaApi](modules/shared_yagna_yagnaApi) \ No newline at end of file