Skip to content

Commit 4a7869f

Browse files
authored
feat: bee-js 0.11.0 api reference (#63)
1 parent 23ed21b commit 4a7869f

File tree

126 files changed

+574
-402
lines changed

Some content is hidden

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

126 files changed

+574
-402
lines changed

bee-js

Submodule bee-js updated 69 files

docs/api/classes/bee.md

Lines changed: 80 additions & 59 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/7260ee1/src/utils/error.ts#L7)
34+
Defined in: [bee-js/src/utils/error.ts:7](https://github.com/ethersphere/bee-js/blob/430becc/src/utils/error.ts#L7)
3535

3636
## Properties
3737

docs/api/classes/beedebug.md

Lines changed: 68 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,51 +26,55 @@ 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/7260ee1/src/bee-debug.ts#L36)
29+
Defined in: [bee-js/src/bee-debug.ts:37](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L37)
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/7260ee1/src/bee-debug.ts#L36)
37+
Defined in: [bee-js/src/bee-debug.ts:37](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L37)
3838

3939
## Methods
4040

4141
### cashoutLastCheque
4242

43-
**cashoutLastCheque**(`address`: *string*): *Promise*<[*CashoutResponse*](../interfaces/cashoutresponse.md)\>
43+
**cashoutLastCheque**(`address`: *string* \| [*Address*](../types/address.md), `options?`: [*CashoutOptions*](../interfaces/cashoutoptions.md)): *Promise*<string\>
4444

4545
Cashout the last cheque for the peer
4646

4747
#### Parameters:
4848

4949
Name | Type | Description |
5050
:------ | :------ | :------ |
51-
`address` | *string* | Swarm address of peer |
51+
`address` | *string* \| [*Address*](../types/address.md) | Swarm address of peer |
52+
`options?` | [*CashoutOptions*](../interfaces/cashoutoptions.md) | |
5253

53-
**Returns:** *Promise*<[*CashoutResponse*](../interfaces/cashoutresponse.md)\>
54+
**Returns:** *Promise*<string\>
5455

55-
Defined in: [bee-js/src/bee-debug.ts:169](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L169)
56+
Defined in: [bee-js/src/bee-debug.ts:177](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L177)
5657

5758
___
5859

5960
### depositTokens
6061

61-
**depositTokens**(`amount`: *number* \| *bigint*): *Promise*<[*DepositTokensResponse*](../interfaces/deposittokensresponse.md)\>
62+
**depositTokens**(`amount`: *number* \| *bigint*, `gasPrice?`: *bigint*): *Promise*<string\>
6263

6364
Deposit tokens from overlay address into chequebook
6465

6566
#### Parameters:
6667

6768
Name | Type | Description |
6869
:------ | :------ | :------ |
69-
`amount` | *number* \| *bigint* | Amount of tokens to deposit (must be positive integer) |
70+
`amount` | *number* \| *bigint* | Amount of tokens to deposit (must be positive integer) |
71+
`gasPrice?` | *bigint* | Gas Price in WEI for the transaction call |
7072

71-
**Returns:** *Promise*<[*DepositTokensResponse*](../interfaces/deposittokensresponse.md)\>
73+
**Returns:** *Promise*<string\>
7274

73-
Defined in: [bee-js/src/bee-debug.ts:178](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L178)
75+
string Hash of the transaction
76+
77+
Defined in: [bee-js/src/bee-debug.ts:198](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L198)
7478

7579
___
7680

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

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

85-
Defined in: [bee-js/src/bee-debug.ts:81](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L81)
89+
Defined in: [bee-js/src/bee-debug.ts:86](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L86)
8690

8791
___
8892

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

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

97-
Defined in: [bee-js/src/bee-debug.ts:217](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L217)
101+
Defined in: [bee-js/src/bee-debug.ts:243](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L243)
98102

99103
___
100104

@@ -104,7 +108,19 @@ ___
104108

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

107-
Defined in: [bee-js/src/bee-debug.ts:51](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L51)
111+
Defined in: [bee-js/src/bee-debug.ts:52](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L52)
112+
113+
___
114+
115+
### getChainState
116+
117+
**getChainState**(): *Promise*<[*ChainState*](../interfaces/chainstate.md)\>
118+
119+
Get chain state
120+
121+
**Returns:** *Promise*<[*ChainState*](../interfaces/chainstate.md)\>
122+
123+
Defined in: [bee-js/src/bee-debug.ts:273](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L273)
108124

109125
___
110126

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

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

122-
Defined in: [bee-js/src/bee-debug.ts:124](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L124)
138+
Defined in: [bee-js/src/bee-debug.ts:129](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L129)
123139

124140
___
125141

@@ -131,7 +147,7 @@ Get the balance of the chequebook
131147

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

134-
Defined in: [bee-js/src/bee-debug.ts:131](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L131)
150+
Defined in: [bee-js/src/bee-debug.ts:136](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L136)
135151

136152
___
137153

@@ -143,7 +159,7 @@ Get health of node
143159

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

146-
Defined in: [bee-js/src/bee-debug.ts:224](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L224)
162+
Defined in: [bee-js/src/bee-debug.ts:250](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L250)
147163

148164
___
149165

@@ -161,7 +177,7 @@ Name | Type | Description |
161177

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

164-
Defined in: [bee-js/src/bee-debug.ts:158](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L158)
180+
Defined in: [bee-js/src/bee-debug.ts:163](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L163)
165181

166182
___
167183

@@ -173,7 +189,7 @@ Get last cheques for all peers
173189

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

176-
Defined in: [bee-js/src/bee-debug.ts:138](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L138)
192+
Defined in: [bee-js/src/bee-debug.ts:143](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L143)
177193

178194
___
179195

@@ -191,7 +207,7 @@ Name | Type | Description |
191207

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

194-
Defined in: [bee-js/src/bee-debug.ts:147](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L147)
210+
Defined in: [bee-js/src/bee-debug.ts:152](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L152)
195211

196212
___
197213

@@ -201,7 +217,7 @@ ___
201217

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

204-
Defined in: [bee-js/src/bee-debug.ts:47](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L47)
220+
Defined in: [bee-js/src/bee-debug.ts:48](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L48)
205221

206222
___
207223

@@ -213,7 +229,7 @@ Get the past due consumption balances with all known peers
213229

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

216-
Defined in: [bee-js/src/bee-debug.ts:99](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L99)
232+
Defined in: [bee-js/src/bee-debug.ts:104](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L104)
217233

218234
___
219235

@@ -231,7 +247,7 @@ Name | Type | Description |
231247

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

234-
Defined in: [bee-js/src/bee-debug.ts:108](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L108)
250+
Defined in: [bee-js/src/bee-debug.ts:113](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L113)
235251

236252
___
237253

@@ -249,7 +265,7 @@ Name | Type | Description |
249265

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

252-
Defined in: [bee-js/src/bee-debug.ts:90](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L90)
268+
Defined in: [bee-js/src/bee-debug.ts:95](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L95)
253269

254270
___
255271

@@ -261,7 +277,19 @@ Get list of peers for this node
261277

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

264-
Defined in: [bee-js/src/bee-debug.ts:58](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L58)
280+
Defined in: [bee-js/src/bee-debug.ts:59](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L59)
281+
282+
___
283+
284+
### getReserveState
285+
286+
**getReserveState**(): *Promise*<[*ReserveState*](../interfaces/reservestate.md)\>
287+
288+
Get reserve state
289+
290+
**Returns:** *Promise*<[*ReserveState*](../interfaces/reservestate.md)\>
291+
292+
Defined in: [bee-js/src/bee-debug.ts:266](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L266)
265293

266294
___
267295

@@ -279,7 +307,7 @@ Name | Type | Description |
279307

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

282-
Defined in: [bee-js/src/bee-debug.ts:208](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L208)
310+
Defined in: [bee-js/src/bee-debug.ts:234](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L234)
283311

284312
___
285313

@@ -289,7 +317,7 @@ ___
289317

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

292-
Defined in: [bee-js/src/bee-debug.ts:66](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L66)
320+
Defined in: [bee-js/src/bee-debug.ts:69](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L69)
293321

294322
___
295323

@@ -303,54 +331,57 @@ Connnects to a node and checks if it is a supported Bee version by the bee-js
303331

304332
true if the Bee node version is supported
305333

306-
Defined in: [bee-js/src/bee-debug.ts:233](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L233)
334+
Defined in: [bee-js/src/bee-debug.ts:259](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L259)
307335

308336
___
309337

310338
### pingPeer
311339

312-
**pingPeer**(`peer`: *string*): *Promise*<[*PingResponse*](../interfaces/pingresponse.md)\>
340+
**pingPeer**(`peer`: *string* \| [*Address*](../types/address.md)): *Promise*<[*PingResponse*](../interfaces/pingresponse.md)\>
313341

314342
#### Parameters:
315343

316344
Name | Type |
317345
:------ | :------ |
318-
`peer` | *string* |
346+
`peer` | *string* \| [*Address*](../types/address.md) |
319347

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

322-
Defined in: [bee-js/src/bee-debug.ts:70](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L70)
350+
Defined in: [bee-js/src/bee-debug.ts:73](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L73)
323351

324352
___
325353

326354
### removePeer
327355

328-
**removePeer**(`peer`: *string*): *Promise*<[*RemovePeerResponse*](../interfaces/removepeerresponse.md)\>
356+
**removePeer**(`peer`: *string* \| [*Address*](../types/address.md)): *Promise*<[*RemovePeerResponse*](../interfaces/removepeerresponse.md)\>
329357

330358
#### Parameters:
331359

332360
Name | Type |
333361
:------ | :------ |
334-
`peer` | *string* |
362+
`peer` | *string* \| [*Address*](../types/address.md) |
335363

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

338-
Defined in: [bee-js/src/bee-debug.ts:62](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L62)
366+
Defined in: [bee-js/src/bee-debug.ts:63](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L63)
339367

340368
___
341369

342370
### withdrawTokens
343371

344-
**withdrawTokens**(`amount`: *number* \| *bigint*): *Promise*<[*WithdrawTokensResponse*](../interfaces/withdrawtokensresponse.md)\>
372+
**withdrawTokens**(`amount`: *number* \| *bigint*, `gasPrice?`: *bigint*): *Promise*<string\>
345373

346374
Withdraw tokens from the chequebook to the overlay address
347375

348376
#### Parameters:
349377

350378
Name | Type | Description |
351379
:------ | :------ | :------ |
352-
`amount` | *number* \| *bigint* | Amount of tokens to withdraw (must be positive integer) |
380+
`amount` | *number* \| *bigint* | Amount of tokens to withdraw (must be positive integer) |
381+
`gasPrice?` | *bigint* | Gas Price in WEI for the transaction call |
382+
383+
**Returns:** *Promise*<string\>
353384

354-
**Returns:** *Promise*<[*WithdrawTokensResponse*](../interfaces/withdrawtokensresponse.md)\>
385+
string Hash of the transaction
355386

356-
Defined in: [bee-js/src/bee-debug.ts:191](https://github.com/ethersphere/bee-js/blob/7260ee1/src/bee-debug.ts#L191)
387+
Defined in: [bee-js/src/bee-debug.ts:215](https://github.com/ethersphere/bee-js/blob/430becc/src/bee-debug.ts#L215)

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/7260ee1/src/utils/error.ts#L1)
37+
Defined in: [bee-js/src/utils/error.ts:1](https://github.com/ethersphere/bee-js/blob/430becc/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/7260ee1/src/utils/error.ts#L13)
33+
Defined in: [bee-js/src/utils/error.ts:13](https://github.com/ethersphere/bee-js/blob/430becc/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/7260ee1/src/utils/error.ts#L19)
34+
Defined in: [bee-js/src/utils/error.ts:19](https://github.com/ethersphere/bee-js/blob/430becc/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/7260ee1/src/utils/bytes.ts#L44)
32+
Defined in: [bee-js/src/utils/bytes.ts:44](https://github.com/ethersphere/bee-js/blob/430becc/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/7260ee1/src/utils/bytes.ts#L72)
34+
Defined in: [bee-js/src/utils/bytes.ts:72](https://github.com/ethersphere/bee-js/blob/430becc/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/7260ee1/src/utils/bytes.ts#L91)
33+
Defined in: [bee-js/src/utils/bytes.ts:91](https://github.com/ethersphere/bee-js/blob/430becc/src/utils/bytes.ts#L91)

0 commit comments

Comments
 (0)