Skip to content

Commit 9199a93

Browse files
authored
feat: bee-js 0.9.0 api reference (#60)
1 parent e8621be commit 9199a93

File tree

117 files changed

+487
-502
lines changed

Some content is hidden

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

117 files changed

+487
-502
lines changed

bee-js

Submodule bee-js updated 53 files

docs/api/classes/bee.md

Lines changed: 124 additions & 236 deletions
Large diffs are not rendered by default.

docs/api/classes/beeargumenterror.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Name | Type |
3131

3232
Inherited from: [BeeError](beeerror.md)
3333

34-
Defined in: [bee-js/src/utils/error.ts:7](https://github.com/ethersphere/bee-js/blob/9a547fe/src/utils/error.ts#L7)
34+
Defined in: [bee-js/src/utils/error.ts:7](https://github.com/ethersphere/bee-js/blob/7260ee1/src/utils/error.ts#L7)
3535

3636
## Properties
3737

docs/api/classes/beedebug.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ Name | Type |
2626

2727
**Returns:** [*BeeDebug*](beedebug.md)
2828

29-
Defined in: [bee-js/src/bee-debug.ts:36](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L36)
29+
Defined in: [bee-js/src/bee-debug.ts:36](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L36)
3030

3131
## Properties
3232

3333
### url
3434

3535
`Readonly` **url**: *string*
3636

37-
Defined in: [bee-js/src/bee-debug.ts:36](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L36)
37+
Defined in: [bee-js/src/bee-debug.ts:36](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L36)
3838

3939
## Methods
4040

@@ -52,25 +52,25 @@ Name | Type | Description |
5252

5353
**Returns:** *Promise*<[*CashoutResponse*](../interfaces/cashoutresponse.md)\>
5454

55-
Defined in: [bee-js/src/bee-debug.ts:161](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L161)
55+
Defined in: [bee-js/src/bee-debug.ts:169](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L169)
5656

5757
___
5858

5959
### depositTokens
6060

61-
**depositTokens**(`amount`: *number* \| BigInt): *Promise*<[*DepositTokensResponse*](../interfaces/deposittokensresponse.md)\>
61+
**depositTokens**(`amount`: *number* \| *bigint*): *Promise*<[*DepositTokensResponse*](../interfaces/deposittokensresponse.md)\>
6262

6363
Deposit tokens from overlay address into chequebook
6464

6565
#### Parameters:
6666

6767
Name | Type | Description |
6868
:------ | :------ | :------ |
69-
`amount` | *number* \| BigInt | Amount of tokens to deposit (must be positive integer) |
69+
`amount` | *number* \| *bigint* | Amount of tokens to deposit (must be positive integer) |
7070

7171
**Returns:** *Promise*<[*DepositTokensResponse*](../interfaces/deposittokensresponse.md)\>
7272

73-
Defined in: [bee-js/src/bee-debug.ts:170](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L170)
73+
Defined in: [bee-js/src/bee-debug.ts:178](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L178)
7474

7575
___
7676

@@ -82,7 +82,7 @@ Get the balances with all known peers including prepaid services
8282

8383
**Returns:** *Promise*<[*BalanceResponse*](../interfaces/balanceresponse.md)\>
8484

85-
Defined in: [bee-js/src/bee-debug.ts:81](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L81)
85+
Defined in: [bee-js/src/bee-debug.ts:81](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L81)
8686

8787
___
8888

@@ -94,7 +94,7 @@ Get settlements with all known peers and total amount sent or received
9494

9595
**Returns:** *Promise*<[*AllSettlements*](../interfaces/allsettlements.md)\>
9696

97-
Defined in: [bee-js/src/bee-debug.ts:207](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L207)
97+
Defined in: [bee-js/src/bee-debug.ts:217](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L217)
9898

9999
___
100100

@@ -104,7 +104,7 @@ ___
104104

105105
**Returns:** *Promise*<[*Peer*](../interfaces/peer.md)[]\>
106106

107-
Defined in: [bee-js/src/bee-debug.ts:51](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L51)
107+
Defined in: [bee-js/src/bee-debug.ts:51](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L51)
108108

109109
___
110110

@@ -119,7 +119,7 @@ https://github.com/ethersphere/bee/issues/1443
119119

120120
**Returns:** *Promise*<[*ChequebookAddressResponse*](../interfaces/chequebookaddressresponse.md)\>
121121

122-
Defined in: [bee-js/src/bee-debug.ts:120](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L120)
122+
Defined in: [bee-js/src/bee-debug.ts:124](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L124)
123123

124124
___
125125

@@ -131,7 +131,7 @@ Get the balance of the chequebook
131131

132132
**Returns:** *Promise*<[*ChequebookBalanceResponse*](../interfaces/chequebookbalanceresponse.md)\>
133133

134-
Defined in: [bee-js/src/bee-debug.ts:127](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L127)
134+
Defined in: [bee-js/src/bee-debug.ts:131](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L131)
135135

136136
___
137137

@@ -143,25 +143,25 @@ Get health of node
143143

144144
**Returns:** *Promise*<[*Health*](../interfaces/health.md)\>
145145

146-
Defined in: [bee-js/src/bee-debug.ts:214](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L214)
146+
Defined in: [bee-js/src/bee-debug.ts:224](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L224)
147147

148148
___
149149

150150
### getLastCashoutAction
151151

152-
**getLastCashoutAction**(`address`: *string*): *Promise*<[*LastCashoutActionResponse*](../interfaces/lastcashoutactionresponse.md)\>
152+
**getLastCashoutAction**(`address`: *string* \| [*Address*](../types/address.md)): *Promise*<[*LastCashoutActionResponse*](../interfaces/lastcashoutactionresponse.md)\>
153153

154154
Get last cashout action for the peer
155155

156156
#### Parameters:
157157

158158
Name | Type | Description |
159159
:------ | :------ | :------ |
160-
`address` | *string* | Swarm address of peer |
160+
`address` | *string* \| [*Address*](../types/address.md) | Swarm address of peer |
161161

162162
**Returns:** *Promise*<[*LastCashoutActionResponse*](../interfaces/lastcashoutactionresponse.md)\>
163163

164-
Defined in: [bee-js/src/bee-debug.ts:152](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L152)
164+
Defined in: [bee-js/src/bee-debug.ts:158](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L158)
165165

166166
___
167167

@@ -173,25 +173,25 @@ Get last cheques for all peers
173173

174174
**Returns:** *Promise*<[*LastChequesResponse*](../interfaces/lastchequesresponse.md)\>
175175

176-
Defined in: [bee-js/src/bee-debug.ts:134](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L134)
176+
Defined in: [bee-js/src/bee-debug.ts:138](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L138)
177177

178178
___
179179

180180
### getLastChequesForPeer
181181

182-
**getLastChequesForPeer**(`address`: *string*): *Promise*<[*LastChequesForPeerResponse*](../interfaces/lastchequesforpeerresponse.md)\>
182+
**getLastChequesForPeer**(`address`: *string* \| [*Address*](../types/address.md)): *Promise*<[*LastChequesForPeerResponse*](../interfaces/lastchequesforpeerresponse.md)\>
183183

184184
Get last cheques for the peer
185185

186186
#### Parameters:
187187

188188
Name | Type | Description |
189189
:------ | :------ | :------ |
190-
`address` | *string* | Swarm address of peer |
190+
`address` | *string* \| [*Address*](../types/address.md) | Swarm address of peer |
191191

192192
**Returns:** *Promise*<[*LastChequesForPeerResponse*](../interfaces/lastchequesforpeerresponse.md)\>
193193

194-
Defined in: [bee-js/src/bee-debug.ts:143](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L143)
194+
Defined in: [bee-js/src/bee-debug.ts:147](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L147)
195195

196196
___
197197

@@ -201,7 +201,7 @@ ___
201201

202202
**Returns:** *Promise*<[*NodeAddresses*](../interfaces/nodeaddresses.md)\>
203203

204-
Defined in: [bee-js/src/bee-debug.ts:47](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L47)
204+
Defined in: [bee-js/src/bee-debug.ts:47](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L47)
205205

206206
___
207207

@@ -213,43 +213,43 @@ Get the past due consumption balances with all known peers
213213

214214
**Returns:** *Promise*<[*BalanceResponse*](../interfaces/balanceresponse.md)\>
215215

216-
Defined in: [bee-js/src/bee-debug.ts:97](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L97)
216+
Defined in: [bee-js/src/bee-debug.ts:99](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L99)
217217

218218
___
219219

220220
### getPastDueConsumptionPeerBalance
221221

222-
**getPastDueConsumptionPeerBalance**(`address`: *string*): *Promise*<[*PeerBalance*](../interfaces/peerbalance.md)\>
222+
**getPastDueConsumptionPeerBalance**(`address`: *string* \| [*Address*](../types/address.md)): *Promise*<[*PeerBalance*](../interfaces/peerbalance.md)\>
223223

224224
Get the past due consumption balance with a specific peer
225225

226226
#### Parameters:
227227

228228
Name | Type | Description |
229229
:------ | :------ | :------ |
230-
`address` | *string* | Swarm address of peer |
230+
`address` | *string* \| [*Address*](../types/address.md) | Swarm address of peer |
231231

232232
**Returns:** *Promise*<[*PeerBalance*](../interfaces/peerbalance.md)\>
233233

234-
Defined in: [bee-js/src/bee-debug.ts:106](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L106)
234+
Defined in: [bee-js/src/bee-debug.ts:108](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L108)
235235

236236
___
237237

238238
### getPeerBalance
239239

240-
**getPeerBalance**(`address`: *string*): *Promise*<[*PeerBalance*](../interfaces/peerbalance.md)\>
240+
**getPeerBalance**(`address`: *string* \| [*Address*](../types/address.md)): *Promise*<[*PeerBalance*](../interfaces/peerbalance.md)\>
241241

242242
Get the balances with a specific peer including prepaid services
243243

244244
#### Parameters:
245245

246246
Name | Type | Description |
247247
:------ | :------ | :------ |
248-
`address` | *string* | Swarm address of peer |
248+
`address` | *string* \| [*Address*](../types/address.md) | Swarm address of peer |
249249

250250
**Returns:** *Promise*<[*PeerBalance*](../interfaces/peerbalance.md)\>
251251

252-
Defined in: [bee-js/src/bee-debug.ts:90](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L90)
252+
Defined in: [bee-js/src/bee-debug.ts:90](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L90)
253253

254254
___
255255

@@ -261,25 +261,25 @@ Get list of peers for this node
261261

262262
**Returns:** *Promise*<[*Peer*](../interfaces/peer.md)[]\>
263263

264-
Defined in: [bee-js/src/bee-debug.ts:58](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L58)
264+
Defined in: [bee-js/src/bee-debug.ts:58](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L58)
265265

266266
___
267267

268268
### getSettlements
269269

270-
**getSettlements**(`address`: *string*): *Promise*<[*Settlements*](../interfaces/settlements.md)\>
270+
**getSettlements**(`address`: *string* \| [*Address*](../types/address.md)): *Promise*<[*Settlements*](../interfaces/settlements.md)\>
271271

272272
Get amount of sent and received from settlements with a peer
273273

274274
#### Parameters:
275275

276276
Name | Type | Description |
277277
:------ | :------ | :------ |
278-
`address` | *string* | Swarm address of peer |
278+
`address` | *string* \| [*Address*](../types/address.md) | Swarm address of peer |
279279

280280
**Returns:** *Promise*<[*Settlements*](../interfaces/settlements.md)\>
281281

282-
Defined in: [bee-js/src/bee-debug.ts:200](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L200)
282+
Defined in: [bee-js/src/bee-debug.ts:208](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L208)
283283

284284
___
285285

@@ -289,7 +289,7 @@ ___
289289

290290
**Returns:** *Promise*<[*Topology*](../interfaces/topology.md)\>
291291

292-
Defined in: [bee-js/src/bee-debug.ts:66](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L66)
292+
Defined in: [bee-js/src/bee-debug.ts:66](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L66)
293293

294294
___
295295

@@ -303,7 +303,7 @@ Connnects to a node and checks if it is a supported Bee version by the bee-js
303303

304304
true if the Bee node version is supported
305305

306-
Defined in: [bee-js/src/bee-debug.ts:223](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L223)
306+
Defined in: [bee-js/src/bee-debug.ts:233](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L233)
307307

308308
___
309309

@@ -319,7 +319,7 @@ Name | Type |
319319

320320
**Returns:** *Promise*<[*PingResponse*](../interfaces/pingresponse.md)\>
321321

322-
Defined in: [bee-js/src/bee-debug.ts:70](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L70)
322+
Defined in: [bee-js/src/bee-debug.ts:70](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L70)
323323

324324
___
325325

@@ -335,22 +335,22 @@ Name | Type |
335335

336336
**Returns:** *Promise*<[*RemovePeerResponse*](../interfaces/removepeerresponse.md)\>
337337

338-
Defined in: [bee-js/src/bee-debug.ts:62](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L62)
338+
Defined in: [bee-js/src/bee-debug.ts:62](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L62)
339339

340340
___
341341

342342
### withdrawTokens
343343

344-
**withdrawTokens**(`amount`: *number* \| BigInt): *Promise*<[*WithdrawTokensResponse*](../interfaces/withdrawtokensresponse.md)\>
344+
**withdrawTokens**(`amount`: *number* \| *bigint*): *Promise*<[*WithdrawTokensResponse*](../interfaces/withdrawtokensresponse.md)\>
345345

346346
Withdraw tokens from the chequebook to the overlay address
347347

348348
#### Parameters:
349349

350350
Name | Type | Description |
351351
:------ | :------ | :------ |
352-
`amount` | *number* \| BigInt | Amount of tokens to withdraw (must be positive integer) |
352+
`amount` | *number* \| *bigint* | Amount of tokens to withdraw (must be positive integer) |
353353

354354
**Returns:** *Promise*<[*WithdrawTokensResponse*](../interfaces/withdrawtokensresponse.md)\>
355355

356-
Defined in: [bee-js/src/bee-debug.ts:183](https://github.com/ethersphere/bee-js/blob/9a547fe/src/bee-debug.ts#L183)
356+
Defined in: [bee-js/src/bee-debug.ts:191](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L191)

docs/api/classes/beeerror.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Name | Type |
3434

3535
**Returns:** [*BeeError*](beeerror.md)
3636

37-
Defined in: [bee-js/src/utils/error.ts:1](https://github.com/ethersphere/bee-js/blob/9a547fe/src/utils/error.ts#L1)
37+
Defined in: [bee-js/src/utils/error.ts:1](https://github.com/ethersphere/bee-js/blob/7260ee1/src/utils/error.ts#L1)
3838

3939
## Properties
4040

docs/api/classes/beerequesterror.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Name | Type |
3030

3131
Inherited from: [BeeError](beeerror.md)
3232

33-
Defined in: [bee-js/src/utils/error.ts:13](https://github.com/ethersphere/bee-js/blob/9a547fe/src/utils/error.ts#L13)
33+
Defined in: [bee-js/src/utils/error.ts:13](https://github.com/ethersphere/bee-js/blob/7260ee1/src/utils/error.ts#L13)
3434

3535
## Properties
3636

docs/api/classes/beeresponseerror.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Name | Type |
3131

3232
Inherited from: [BeeError](beeerror.md)
3333

34-
Defined in: [bee-js/src/utils/error.ts:19](https://github.com/ethersphere/bee-js/blob/9a547fe/src/utils/error.ts#L19)
34+
Defined in: [bee-js/src/utils/error.ts:19](https://github.com/ethersphere/bee-js/blob/7260ee1/src/utils/error.ts#L19)
3535

3636
## Properties
3737

docs/api/functions/utils.bytes.assertbytes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ Name | Type | Description |
2929

3030
**Returns:** asserts b is Bytes<Length\>
3131

32-
Defined in: [bee-js/src/utils/bytes.ts:44](https://github.com/ethersphere/bee-js/blob/9a547fe/src/utils/bytes.ts#L44)
32+
Defined in: [bee-js/src/utils/bytes.ts:44](https://github.com/ethersphere/bee-js/blob/7260ee1/src/utils/bytes.ts#L44)

docs/api/functions/utils.bytes.assertflexbytes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ Name | Type | Description |
3131

3232
**Returns:** asserts b is FlexBytes<Min, Max\>
3333

34-
Defined in: [bee-js/src/utils/bytes.ts:72](https://github.com/ethersphere/bee-js/blob/9a547fe/src/utils/bytes.ts#L72)
34+
Defined in: [bee-js/src/utils/bytes.ts:72](https://github.com/ethersphere/bee-js/blob/7260ee1/src/utils/bytes.ts#L72)

docs/api/functions/utils.bytes.bytesatoffset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ Name | Type | Description |
3030

3131
**Returns:** [*Bytes*](../interfaces/utils.bytes.bytes.md)<Length\>
3232

33-
Defined in: [bee-js/src/utils/bytes.ts:91](https://github.com/ethersphere/bee-js/blob/9a547fe/src/utils/bytes.ts#L91)
33+
Defined in: [bee-js/src/utils/bytes.ts:91](https://github.com/ethersphere/bee-js/blob/7260ee1/src/utils/bytes.ts#L91)

0 commit comments

Comments
 (0)