Skip to content

Commit

Permalink
feat: Update golem-js API Reference for branch beta
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptobench authored Mar 23, 2024
1 parent 305e193 commit 07dc751
Show file tree
Hide file tree
Showing 200 changed files with 4,907 additions and 4,816 deletions.
282 changes: 159 additions & 123 deletions src/navigation/jsreference.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/pages/docs/golem-js/reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ distributed, computational loads through Golem Network.

## System requirements

To use `golem-js`, it is necessary to have yagna installed, with a **minimum version requirement of v0.13.2**. Yagna is a
To use `golem-js`, it is necessary to have yagna installed, with a **recommended minimum version of v0.14.0**. 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.
Expand All @@ -72,13 +72,13 @@ yagna service run

# 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ As part of a given activity, it is possible to execute exe script commands and c

### Properties

- [events](activity_activity.Activity#events)
- [id](activity_activity.Activity#id)
- [agreement](activity_activity.Activity#agreement)
- [yagnaApi](activity_activity.Activity#yagnaapi)
Expand All @@ -31,6 +32,16 @@ As part of a given activity, it is possible to execute exe script commands and c

## Properties

### events

`Readonly` **events**: `EventEmitter`\<[`ActivityEvents`](../interfaces/activity_activity.ActivityEvents), `any`\>

#### Defined in

[src/activity/activity.ts:59](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/activity/activity.ts#L59)

___

### id

`Readonly` **id**: `string`
Expand All @@ -39,7 +50,7 @@ activity ID

#### Defined in

[src/activity/activity.ts:62](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L62)
[src/activity/activity.ts:69](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/activity/activity.ts#L69)

___

Expand All @@ -51,19 +62,19 @@ Agreement

#### Defined in

[src/activity/activity.ts:63](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L63)
[src/activity/activity.ts:70](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/activity/activity.ts#L70)

___

### yagnaApi

`Protected` `Readonly` **yagnaApi**: [`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi)
`Protected` `Readonly` **yagnaApi**: [`YagnaApi`](utils_yagna_yagnaApi.YagnaApi)

[YagnaApi](../modules/utils_yagna_yagna#yagnaapi)
[YagnaApi](utils_yagna_yagnaApi.YagnaApi)

#### Defined in

[src/activity/activity.ts:64](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L64)
[src/activity/activity.ts:71](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/activity/activity.ts#L71)

___

Expand All @@ -75,7 +86,7 @@ ___

#### Defined in

[src/activity/activity.ts:65](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L65)
[src/activity/activity.ts:72](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/activity/activity.ts#L72)

## Methods

Expand All @@ -90,7 +101,7 @@ Create activity for given agreement ID
| Name | Type | Default value | Description |
| :------ | :------ | :------ | :------ |
| `agreement` | `Agreement` | `undefined` | |
| `yagnaApi` | [`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi) | `undefined` | |
| `yagnaApi` | [`YagnaApi`](utils_yagna_yagnaApi.YagnaApi) | `undefined` | |
| `options?` | [`ActivityOptions`](../interfaces/activity_activity.ActivityOptions) | `undefined` | [ActivityOptions](../interfaces/activity_activity.ActivityOptions) |
| `secure` | `boolean` | `false` | defines if activity will be secure type |

Expand All @@ -102,7 +113,7 @@ Activity

#### Defined in

[src/activity/activity.ts:79](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L79)
[src/activity/activity.ts:86](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/activity/activity.ts#L86)

___

Expand All @@ -116,7 +127,7 @@ ___

#### Defined in

[src/activity/activity.ts:89](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L89)
[src/activity/activity.ts:96](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/activity/activity.ts#L96)

___

Expand All @@ -140,7 +151,7 @@ Execute script

#### Defined in

[src/activity/activity.ts:100](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L100)
[src/activity/activity.ts:107](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/activity/activity.ts#L107)

___

Expand All @@ -158,7 +169,7 @@ boolean

#### Defined in

[src/activity/activity.ts:138](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L138)
[src/activity/activity.ts:143](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/activity/activity.ts#L143)

___

Expand All @@ -180,7 +191,7 @@ Error when cannot query the state

#### Defined in

[src/activity/activity.ts:150](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L150)
[src/activity/activity.ts:155](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/activity/activity.ts#L155)

___

Expand All @@ -200,4 +211,4 @@ ___

#### Defined in

[src/activity/activity.ts:176](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L176)
[src/activity/activity.ts:186](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/activity/activity.ts#L186)
Original file line number Diff line number Diff line change
Expand Up @@ -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/8e8b5ef/src/activity/results.ts#L38)

## Properties

Expand All @@ -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/8e8b5ef/src/activity/results.ts#L29)

___

Expand All @@ -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/8e8b5ef/src/activity/results.ts#L30)

___

### result

**result**: `ExeScriptCommandResultResultEnum`
**result**: ``"Ok"`` \| ``"Error"``

If is success

Expand All @@ -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/8e8b5ef/src/activity/results.ts#L31)

___

Expand All @@ -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/8e8b5ef/src/activity/results.ts#L32)

___

Expand All @@ -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/8e8b5ef/src/activity/results.ts#L33)

___

Expand All @@ -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/8e8b5ef/src/activity/results.ts#L34)

___

Expand All @@ -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/8e8b5ef/src/activity/results.ts#L35)

___

Expand All @@ -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/8e8b5ef/src/activity/results.ts#L36)

## Methods

Expand All @@ -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/8e8b5ef/src/activity/results.ts#L52)
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type: "JS API Reference"

#### Defined in

[src/agreement/service.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L15)
[src/agreement/service.ts:15](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/agreement/service.ts#L15)

## Properties

Expand All @@ -47,7 +47,7 @@ type: "JS API Reference"

#### Defined in

[src/agreement/service.ts:14](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L14)
[src/agreement/service.ts:14](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/agreement/service.ts#L14)

___

Expand All @@ -57,4 +57,4 @@ ___

#### Defined in

[src/agreement/service.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L15)
[src/agreement/service.ts:15](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/agreement/service.ts#L15)
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CTRL+C abort error

#### Defined in

[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5)
[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/error/golem-error.ts#L5)

## Properties

Expand All @@ -71,4 +71,4 @@ 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)
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/error/golem-error.ts#L10)
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Api key not defined

#### Defined in

[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5)
[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/error/golem-error.ts#L5)

## Properties

Expand All @@ -71,4 +71,4 @@ 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)
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/error/golem-error.ts#L10)
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Error.constructor

#### Defined in

[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5)
[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/error/golem-error.ts#L5)

## Properties

Expand All @@ -71,4 +71,4 @@ 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)
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/error/golem-error.ts#L10)
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ JSON.parse(undefined) -> Error: Unexpected token u in JSON at position 0

#### Defined in

[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5)
[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/error/golem-error.ts#L5)

## Properties

Expand All @@ -71,4 +71,4 @@ 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)
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/error/golem-error.ts#L10)
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ additionally containing an error code specific to a given subdomain

**`GolemModuleError`**

↳↳ [`GolemReputationError`](experimental_reputation_error.GolemReputationError)

↳↳ [`GolemMarketError`](market_error.GolemMarketError)

↳↳ [`GolemNetworkError`](network_error.GolemNetworkError)

↳↳ [`GolemPaymentError`](payment_error.GolemPaymentError)

↳↳ [`GolemWorkError`](task_error.GolemWorkError)
↳↳ [`GolemWorkError`](work_error.GolemWorkError)

## Table of contents

Expand All @@ -48,7 +50,7 @@ additionally containing an error code specific to a given subdomain
| Name | Type |
| :------ | :------ |
| `message` | `string` |
| `code` | `number` |
| `code` | `string` \| `number` |
| `previous?` | `Error` |

#### Returns
Expand All @@ -61,17 +63,17 @@ additionally containing an error code specific to a given subdomain

#### Defined in

[src/error/golem-error.ts:64](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L64)
[src/error/golem-error.ts:64](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/error/golem-error.ts#L64)

## Properties

### code

**code**: `number`
**code**: `string` \| `number`

#### Defined in

[src/error/golem-error.ts:66](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L66)
[src/error/golem-error.ts:66](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/error/golem-error.ts#L66)

___

Expand All @@ -87,4 +89,4 @@ 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)
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/error/golem-error.ts#L10)
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Represents errors resulting from yagna’s errors or provider failure

#### Defined in

[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5)
[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/error/golem-error.ts#L5)

## Properties

Expand All @@ -68,4 +68,4 @@ 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)
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/8e8b5ef/src/error/golem-error.ts#L10)
Loading

0 comments on commit 07dc751

Please sign in to comment.