Skip to content

Commit 982c96d

Browse files
authored
feat: Update golem-js API Reference for branch beta
1 parent 305e193 commit 982c96d

File tree

200 files changed

+4917
-4812
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+4917
-4812
lines changed

src/navigation/jsreference.js

Lines changed: 159 additions & 123 deletions
Large diffs are not rendered by default.

src/pages/docs/golem-js/reference/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ distributed, computational loads through Golem Network.
5050

5151
## System requirements
5252

53-
To use `golem-js`, it is necessary to have yagna installed, with a **minimum version requirement of v0.13.2**. Yagna is a
53+
To use `golem-js`, it is necessary to have yagna installed, with a **recommended minimum version of v0.14.0**. Yagna is a
5454
service that communicates and performs operations on the Golem Network, upon your requests via the SDK. You
5555
can [follow these instructions](https://docs.golem.network/docs/creators/javascript/quickstarts/quickstart#install-yagna-2)
5656
to set it up.
@@ -72,13 +72,13 @@ yagna service run
7272

7373
# IN SEPARATE TERMINAL (if not daemonized)
7474
# Initialize your requestor
75-
yagna payment init --sender --network goerli
75+
yagna payment init --sender --network holesky
7676

7777
# Request funds on the test network
78-
yagna payment fund --network goerli
78+
yagna payment fund --network holesky
7979

8080
# Check the status of the funds
81-
yagna payment status --network goerli
81+
yagna payment status --network holesky
8282
```
8383

8484
#### Obtain your `app-key` to use with SDK

src/pages/docs/golem-js/reference/classes/activity_activity.Activity.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ As part of a given activity, it is possible to execute exe script commands and c
1515

1616
### Properties
1717

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

3233
## Properties
3334

35+
### events
36+
37+
`Readonly` **events**: `EventEmitter`\<[`ActivityEvents`](../interfaces/activity_activity.ActivityEvents), `any`\>
38+
39+
#### Defined in
40+
41+
[src/activity/activity.ts:59](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/activity.ts#L59)
42+
43+
___
44+
3445
### id
3546

3647
`Readonly` **id**: `string`
@@ -39,7 +50,7 @@ activity ID
3950

4051
#### Defined in
4152

42-
[src/activity/activity.ts:62](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L62)
53+
[src/activity/activity.ts:69](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/activity.ts#L69)
4354

4455
___
4556

@@ -51,19 +62,19 @@ Agreement
5162

5263
#### Defined in
5364

54-
[src/activity/activity.ts:63](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L63)
65+
[src/activity/activity.ts:70](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/activity.ts#L70)
5566

5667
___
5768

5869
### yagnaApi
5970

60-
`Protected` `Readonly` **yagnaApi**: [`YagnaApi`](../modules/utils_yagna_yagna#yagnaapi)
71+
`Protected` `Readonly` **yagnaApi**: [`YagnaApi`](utils_yagna_yagnaApi.YagnaApi)
6172

62-
[YagnaApi](../modules/utils_yagna_yagna#yagnaapi)
73+
[YagnaApi](utils_yagna_yagnaApi.YagnaApi)
6374

6475
#### Defined in
6576

66-
[src/activity/activity.ts:64](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L64)
77+
[src/activity/activity.ts:71](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/activity.ts#L71)
6778

6879
___
6980

@@ -75,7 +86,7 @@ ___
7586

7687
#### Defined in
7788

78-
[src/activity/activity.ts:65](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L65)
89+
[src/activity/activity.ts:72](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/activity.ts#L72)
7990

8091
## Methods
8192

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

@@ -102,7 +113,7 @@ Activity
102113

103114
#### Defined in
104115

105-
[src/activity/activity.ts:79](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L79)
116+
[src/activity/activity.ts:86](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/activity.ts#L86)
106117

107118
___
108119

@@ -116,13 +127,13 @@ ___
116127

117128
#### Defined in
118129

119-
[src/activity/activity.ts:89](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L89)
130+
[src/activity/activity.ts:96](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/activity.ts#L96)
120131

121132
___
122133

123134
### execute
124135

125-
**execute**(`script`, `stream?`, `timeout?`): `Promise`\<`Readable`\>
136+
**execute**(`script`, `stream?`, `timeout?`, `maxRetries?`): `Promise`\<`Readable`\>
126137

127138
Execute script
128139

@@ -133,14 +144,15 @@ Execute script
133144
| `script` | [`ExeScriptRequest`](../interfaces/activity_activity.ExeScriptRequest) | exe script request |
134145
| `stream?` | `boolean` | define type of getting results from execution (polling or streaming) |
135146
| `timeout?` | `number` | execution timeout |
147+
| `maxRetries?` | `number` | maximum number of retries retrieving results when an error occurs, default: 10 |
136148

137149
#### Returns
138150

139151
`Promise`\<`Readable`\>
140152

141153
#### Defined in
142154

143-
[src/activity/activity.ts:100](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L100)
155+
[src/activity/activity.ts:108](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/activity.ts#L108)
144156

145157
___
146158

@@ -158,7 +170,7 @@ boolean
158170

159171
#### Defined in
160172

161-
[src/activity/activity.ts:138](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L138)
173+
[src/activity/activity.ts:149](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/activity.ts#L149)
162174

163175
___
164176

@@ -180,7 +192,7 @@ Error when cannot query the state
180192

181193
#### Defined in
182194

183-
[src/activity/activity.ts:150](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L150)
195+
[src/activity/activity.ts:161](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/activity.ts#L161)
184196

185197
___
186198

@@ -200,4 +212,4 @@ ___
200212

201213
#### Defined in
202214

203-
[src/activity/activity.ts:176](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/activity.ts#L176)
215+
[src/activity/activity.ts:192](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/activity.ts#L192)

src/pages/docs/golem-js/reference/classes/activity_results.Result.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type: "JS API Reference"
6363

6464
#### Defined in
6565

66-
[src/activity/results.ts:40](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L40)
66+
[src/activity/results.ts:38](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/results.ts#L38)
6767

6868
## Properties
6969

@@ -79,7 +79,7 @@ Index of script command
7979

8080
#### Defined in
8181

82-
[src/activity/results.ts:31](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L31)
82+
[src/activity/results.ts:29](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/results.ts#L29)
8383

8484
___
8585

@@ -95,13 +95,13 @@ The datetime of the event on which the result was received
9595

9696
#### Defined in
9797

98-
[src/activity/results.ts:32](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L32)
98+
[src/activity/results.ts:30](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/results.ts#L30)
9999

100100
___
101101

102102
### result
103103

104-
**result**: `ExeScriptCommandResultResultEnum`
104+
**result**: ``"Ok"`` \| ``"Error"``
105105

106106
If is success
107107

@@ -111,7 +111,7 @@ If is success
111111

112112
#### Defined in
113113

114-
[src/activity/results.ts:33](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L33)
114+
[src/activity/results.ts:31](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/results.ts#L31)
115115

116116
___
117117

@@ -127,7 +127,7 @@ stdout of script command
127127

128128
#### Defined in
129129

130-
[src/activity/results.ts:34](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L34)
130+
[src/activity/results.ts:32](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/results.ts#L32)
131131

132132
___
133133

@@ -143,7 +143,7 @@ stderr of script command
143143

144144
#### Defined in
145145

146-
[src/activity/results.ts:35](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L35)
146+
[src/activity/results.ts:33](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/results.ts#L33)
147147

148148
___
149149

@@ -159,7 +159,7 @@ an error message if the result is not successful
159159

160160
#### Defined in
161161

162-
[src/activity/results.ts:36](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L36)
162+
[src/activity/results.ts:34](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/results.ts#L34)
163163

164164
___
165165

@@ -175,7 +175,7 @@ Is batch of already finished
175175

176176
#### Defined in
177177

178-
[src/activity/results.ts:37](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L37)
178+
[src/activity/results.ts:35](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/results.ts#L35)
179179

180180
___
181181

@@ -191,7 +191,7 @@ In case the command was related to upload or download, this will contain the tra
191191

192192
#### Defined in
193193

194-
[src/activity/results.ts:38](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L38)
194+
[src/activity/results.ts:36](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/results.ts#L36)
195195

196196
## Methods
197197

@@ -213,4 +213,4 @@ Helper method making JSON-like output results more accessible
213213

214214
#### Defined in
215215

216-
[src/activity/results.ts:54](https://github.com/golemfactory/golem-js/blob/7cee55b/src/activity/results.ts#L54)
216+
[src/activity/results.ts:52](https://github.com/golemfactory/golem-js/blob/4e8615d/src/activity/results.ts#L52)

src/pages/docs/golem-js/reference/classes/agreement_service.AgreementCandidate.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type: "JS API Reference"
3737

3838
#### Defined in
3939

40-
[src/agreement/service.ts:15](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L15)
40+
[src/agreement/service.ts:15](https://github.com/golemfactory/golem-js/blob/4e8615d/src/agreement/service.ts#L15)
4141

4242
## Properties
4343

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

4848
#### Defined in
4949

50-
[src/agreement/service.ts:14](https://github.com/golemfactory/golem-js/blob/7cee55b/src/agreement/service.ts#L14)
50+
[src/agreement/service.ts:14](https://github.com/golemfactory/golem-js/blob/4e8615d/src/agreement/service.ts#L14)
5151

5252
___
5353

@@ -57,4 +57,4 @@ ___
5757

5858
#### Defined in
5959

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

src/pages/docs/golem-js/reference/classes/error_golem_error.GolemAbortError.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ CTRL+C abort error
5555

5656
#### Defined in
5757

58-
[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5)
58+
[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/4e8615d/src/error/golem-error.ts#L5)
5959

6060
## Properties
6161

@@ -71,4 +71,4 @@ The previous error, if any, that led to this error.
7171

7272
#### Defined in
7373

74-
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L10)
74+
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/4e8615d/src/error/golem-error.ts#L10)

src/pages/docs/golem-js/reference/classes/error_golem_error.GolemConfigError.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Api key not defined
5555

5656
#### Defined in
5757

58-
[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5)
58+
[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/4e8615d/src/error/golem-error.ts#L5)
5959

6060
## Properties
6161

@@ -71,4 +71,4 @@ The previous error, if any, that led to this error.
7171

7272
#### Defined in
7373

74-
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L10)
74+
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/4e8615d/src/error/golem-error.ts#L10)

src/pages/docs/golem-js/reference/classes/error_golem_error.GolemError.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Error.constructor
5959

6060
#### Defined in
6161

62-
[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5)
62+
[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/4e8615d/src/error/golem-error.ts#L5)
6363

6464
## Properties
6565

@@ -71,4 +71,4 @@ The previous error, if any, that led to this error.
7171

7272
#### Defined in
7373

74-
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L10)
74+
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/4e8615d/src/error/golem-error.ts#L10)

src/pages/docs/golem-js/reference/classes/error_golem_error.GolemInternalError.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ JSON.parse(undefined) -> Error: Unexpected token u in JSON at position 0
5555

5656
#### Defined in
5757

58-
[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L5)
58+
[src/error/golem-error.ts:5](https://github.com/golemfactory/golem-js/blob/4e8615d/src/error/golem-error.ts#L5)
5959

6060
## Properties
6161

@@ -71,4 +71,4 @@ The previous error, if any, that led to this error.
7171

7272
#### Defined in
7373

74-
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L10)
74+
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/4e8615d/src/error/golem-error.ts#L10)

src/pages/docs/golem-js/reference/classes/error_golem_error.GolemModuleError.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ additionally containing an error code specific to a given subdomain
1818

1919
**`GolemModuleError`**
2020

21+
↳↳ [`GolemReputationError`](experimental_reputation_error.GolemReputationError)
22+
2123
↳↳ [`GolemMarketError`](market_error.GolemMarketError)
2224

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

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

27-
↳↳ [`GolemWorkError`](task_error.GolemWorkError)
29+
↳↳ [`GolemWorkError`](work_error.GolemWorkError)
2830

2931
## Table of contents
3032

@@ -48,7 +50,7 @@ additionally containing an error code specific to a given subdomain
4850
| Name | Type |
4951
| :------ | :------ |
5052
| `message` | `string` |
51-
| `code` | `number` |
53+
| `code` | `string` \| `number` |
5254
| `previous?` | `Error` |
5355

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

6264
#### Defined in
6365

64-
[src/error/golem-error.ts:64](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L64)
66+
[src/error/golem-error.ts:64](https://github.com/golemfactory/golem-js/blob/4e8615d/src/error/golem-error.ts#L64)
6567

6668
## Properties
6769

6870
### code
6971

70-
**code**: `number`
72+
**code**: `string` \| `number`
7173

7274
#### Defined in
7375

74-
[src/error/golem-error.ts:66](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L66)
76+
[src/error/golem-error.ts:66](https://github.com/golemfactory/golem-js/blob/4e8615d/src/error/golem-error.ts#L66)
7577

7678
___
7779

@@ -87,4 +89,4 @@ The previous error, if any, that led to this error.
8789

8890
#### Defined in
8991

90-
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/7cee55b/src/error/golem-error.ts#L10)
92+
[src/error/golem-error.ts:10](https://github.com/golemfactory/golem-js/blob/4e8615d/src/error/golem-error.ts#L10)

0 commit comments

Comments
 (0)