Default Values in the JS SDK
The JS SDK is designed to streamline the experience for developers by providing default values for various options. These default settings cater to the majority of typical use cases. However, understanding that there may be unique scenarios where you might need to tweak these settings, the SDK allows for customization.
Below is a summary of the default values, their significance, and the associated parameters that can be adjusted as per your requirements:
executorOptions
Timeout for executing one task in ms.
taskTimeout
Timeout for executing one task in ms.
logger
Logger module to handle SDK logs.
logLevel
Log level: `debug`, `info`, `warn`, `log`, `error`.
enableLogging
This option enables logging, set to `false` to completely disable logging (even if a logger is provided).
yagnaOptions
apiKey
`apiKey` enables access to yagna rest API.
basePath
URL of yagna REST API.
maxTaskRetries
The maximum number of retries when the job failed on the provider.
activityPreparingTimeout
Timeout for preparing activity - creating and deploying commands in ms.
packagePackageOptions
engine
Type of the payload (`vm`, `wasm`).
minMemGib
Minimum size of RAM in GB.
minStorageGib
Minimum size of storage in GB.
minCpuThreads
Minimum no of threads.
minCpuCores
Minimum no of CPU cores.
capabilities
Set of capabilities providers offer, see manifest and demand documentation of details.
MarketOptions
debitNotesAcceptanceTimeout
Minimal time we reserve to accept debit notes, prosales with shorter time will be rejected in min.
proposalFilter
Filter to decide what proposal to accept (from these that match the demand).
TaskServiceOptions
maxParallelTasks
Max no of parallel tasks when the TaskExecutor is running tasks from a list (see `map()` and `forEach()`).
PaymentOptions
network
Defines on that blockchain the payment will be performed, `goerli` is a test network where test GLM is used, `polygon`.
budget
The amount that is allocated for all tasks scheduled by an executor in GLM/tGLM.
paymentTimeout
Max time the executor script will await invoices from providers after tasks are complete in ms.
allocationExpires
Duration after which allocation expires in msec, valid allocation is required to accept invoices.
debitNoteFilter
Filter containing rules for debitNotes acceptance.
invoiceFilter
Filter containing rules for Invoice acceptance.
AgreementServiceOptions
agreementSelector
Decide which agreements will be used for the next task provided by the iterator, pool contains existing agreements and potential new agreements from available proposals.
Activity
activityExecuteTimeout
Execution time for script (one command or batch) in ms.