From af42f6ad75aee890fe5653ba8d286745b5353e7e Mon Sep 17 00:00:00 2001 From: Vojtech Simetka Date: Tue, 30 Mar 2021 16:32:40 +0200 Subject: [PATCH] feat: updated api docs to bee-js v0.7.0 --- bee-js | 2 +- docs/api/classes/bee.md | 219 +++--- docs/api/classes/beeargumenterror.md | 2 +- docs/api/classes/beedebug.md | 147 +++- docs/api/classes/beeerror.md | 2 +- docs/api/classes/beerequesterror.md | 2 +- docs/api/classes/beeresponseerror.md | 2 +- .../functions/utils.bytes.bytesatoffset.md | 2 +- docs/api/functions/utils.bytes.bytesequal.md | 2 +- .../utils.bytes.flexbytesatoffset.md | 2 +- docs/api/functions/utils.bytes.isbytes.md | 2 +- docs/api/functions/utils.bytes.isflexbytes.md | 2 +- docs/api/functions/utils.bytes.makebytes.md | 2 +- docs/api/functions/utils.bytes.verifybytes.md | 2 +- .../utils.bytes.verifybytesatoffset.md | 2 +- .../functions/utils.bytes.verifyflexbytes.md | 2 +- .../utils.bytes.wrapbyteswithhelpers.md | 23 + docs/api/functions/utils.data.preparedata.md | 14 +- .../utils.data.preparewebsocketdata.md | 8 +- .../functions/utils.eth.ethtoswarmaddress.md | 2 +- .../functions/utils.eth.fromlittleendian.md | 2 +- docs/api/functions/utils.eth.isethaddress.md | 30 - .../functions/utils.eth.ishexethaddress.md | 30 + .../api/functions/utils.eth.makeethaddress.md | 23 + .../utils.eth.makeethereumwalletsigner.md | 27 + .../functions/utils.eth.makehexethaddress.md | 23 + .../api/functions/utils.eth.tolittleendian.md | 2 +- .../functions/utils.file.filearraybuffer.md | 2 +- docs/api/functions/utils.file.isfile.md | 2 +- .../functions/utils.hex.asserthexstring.md | 36 + .../utils.hex.assertprefixedhexstring.md | 27 + docs/api/functions/utils.hex.bytestohex.md | 22 +- docs/api/functions/utils.hex.hextobytes.md | 15 +- docs/api/functions/utils.hex.inttohex.md | 22 +- docs/api/functions/utils.hex.ishexstring.md | 20 +- .../utils.hex.isprefixedhexstring.md | 26 + docs/api/functions/utils.hex.makehexstring.md | 34 + .../api/functions/utils.hex.striphexprefix.md | 31 - docs/api/functions/utils.hex.verifyhex.md | 27 - docs/api/functions/utils.tar.maketar.md | 2 +- docs/api/index.md | 28 +- docs/api/interfaces/allsettlements.md | 6 +- docs/api/interfaces/balanceresponse.md | 2 +- docs/api/interfaces/beeoptions.md | 17 + docs/api/interfaces/beeresponse.md | 4 +- docs/api/interfaces/bin.md | 41 ++ docs/api/interfaces/cashoutresponse.md | 2 +- docs/api/interfaces/cashoutresult.md | 6 +- docs/api/interfaces/cheque.md | 6 +- .../interfaces/chequebookaddressresponse.md | 2 +- .../interfaces/chequebookbalanceresponse.md | 4 +- docs/api/interfaces/collectionentry.md | 4 +- .../api/interfaces/collectionuploadoptions.md | 12 +- docs/api/interfaces/data.md | 643 ++++++++++++++++++ docs/api/interfaces/deposittokensresponse.md | 2 +- docs/api/interfaces/downloadoptions.md | 2 +- docs/api/interfaces/feedreader.md | 59 ++ docs/api/interfaces/feedwriter.md | 88 +++ docs/api/interfaces/filedata.md | 8 +- docs/api/interfaces/fileheaders.md | 6 +- docs/api/interfaces/fileuploadoptions.md | 12 +- docs/api/interfaces/health.md | 25 + .../interfaces/lastcashoutactionresponse.md | 12 +- .../interfaces/lastchequesforpeerresponse.md | 6 +- docs/api/interfaces/lastchequesresponse.md | 2 +- docs/api/interfaces/nodeaddresses.md | 10 +- docs/api/interfaces/peer.md | 2 +- docs/api/interfaces/peerbalance.md | 4 +- docs/api/interfaces/pingresponse.md | 17 + docs/api/interfaces/pssmessagehandler.md | 14 +- docs/api/interfaces/psssubscription.md | 6 +- docs/api/interfaces/referenceresponse.md | 4 +- docs/api/interfaces/removepeerresponse.md | 25 + docs/api/interfaces/settlements.md | 6 +- docs/api/interfaces/socreader.md | 43 ++ docs/api/interfaces/socwriter.md | 77 +++ docs/api/interfaces/tag.md | 10 +- docs/api/interfaces/topology.md | 86 +++ docs/api/interfaces/uploadheaders.md | 6 +- docs/api/interfaces/uploadoptions.md | 8 +- docs/api/interfaces/utils.bytes.bytes.md | 8 +- docs/api/interfaces/utils.bytes.flexbytes.md | 4 +- docs/api/interfaces/utils.eth.jsonrpc.md | 43 ++ docs/api/interfaces/withdrawtokensresponse.md | 2 +- docs/api/modules/utils.bytes.md | 1 + docs/api/modules/utils.eth.md | 10 +- docs/api/modules/utils.hex.md | 7 +- docs/api/types/address.md | 2 +- docs/api/types/addressprefix.md | 2 +- docs/api/types/brandedstring.md | 10 +- docs/api/types/brandedtype.md | 12 +- docs/api/types/collection.md | 2 +- docs/api/types/flavoredtype.md | 12 +- docs/api/types/privatekeybytes.md | 13 + docs/api/types/publickey.md | 2 +- docs/api/types/publickeybytes.md | 13 + docs/api/types/reference.md | 4 +- docs/api/types/signature.md | 13 + docs/api/types/signer.md | 38 ++ docs/api/types/topic.md | 15 + docs/api/types/utils.eth.ethaddress.md | 15 + docs/api/types/utils.eth.hexethaddress.md | 4 +- docs/api/types/utils.eth.overlayaddress.md | 2 +- docs/api/types/utils.hex.hexstring.md | 18 +- docs/api/types/utils.hex.prefixedhexstring.md | 21 + .../encrypted_hex_reference_length.md | 13 - .../encrypted_reference_bytes_length.md | 13 + .../encrypted_reference_hex_length.md | 13 + docs/api/variables/hex_reference_length.md | 13 - docs/api/variables/reference_bytes_length.md | 13 + docs/api/variables/reference_hex_length.md | 13 + docs/api/variables/signature_bytes_length.md | 13 + docs/api/variables/signature_hex_length.md | 15 + docs/api/variables/supported_bee_version.md | 13 + .../variables/supported_bee_version_exact.md | 13 + docs/api/variables/topic_bytes_length.md | 15 + docs/api/variables/topic_hex_length.md | 13 + typedoc-sidebar.js | 45 +- typedoc.json | 2 +- 119 files changed, 2205 insertions(+), 436 deletions(-) create mode 100644 docs/api/functions/utils.bytes.wrapbyteswithhelpers.md delete mode 100644 docs/api/functions/utils.eth.isethaddress.md create mode 100644 docs/api/functions/utils.eth.ishexethaddress.md create mode 100644 docs/api/functions/utils.eth.makeethaddress.md create mode 100644 docs/api/functions/utils.eth.makeethereumwalletsigner.md create mode 100644 docs/api/functions/utils.eth.makehexethaddress.md create mode 100644 docs/api/functions/utils.hex.asserthexstring.md create mode 100644 docs/api/functions/utils.hex.assertprefixedhexstring.md create mode 100644 docs/api/functions/utils.hex.isprefixedhexstring.md create mode 100644 docs/api/functions/utils.hex.makehexstring.md delete mode 100644 docs/api/functions/utils.hex.striphexprefix.md delete mode 100644 docs/api/functions/utils.hex.verifyhex.md create mode 100644 docs/api/interfaces/beeoptions.md create mode 100644 docs/api/interfaces/bin.md create mode 100644 docs/api/interfaces/data.md create mode 100644 docs/api/interfaces/feedreader.md create mode 100644 docs/api/interfaces/feedwriter.md create mode 100644 docs/api/interfaces/health.md create mode 100644 docs/api/interfaces/pingresponse.md create mode 100644 docs/api/interfaces/removepeerresponse.md create mode 100644 docs/api/interfaces/socreader.md create mode 100644 docs/api/interfaces/socwriter.md create mode 100644 docs/api/interfaces/topology.md create mode 100644 docs/api/interfaces/utils.eth.jsonrpc.md create mode 100644 docs/api/types/privatekeybytes.md create mode 100644 docs/api/types/publickeybytes.md create mode 100644 docs/api/types/signature.md create mode 100644 docs/api/types/signer.md create mode 100644 docs/api/types/topic.md create mode 100644 docs/api/types/utils.eth.ethaddress.md create mode 100644 docs/api/types/utils.hex.prefixedhexstring.md delete mode 100644 docs/api/variables/encrypted_hex_reference_length.md create mode 100644 docs/api/variables/encrypted_reference_bytes_length.md create mode 100644 docs/api/variables/encrypted_reference_hex_length.md delete mode 100644 docs/api/variables/hex_reference_length.md create mode 100644 docs/api/variables/reference_bytes_length.md create mode 100644 docs/api/variables/reference_hex_length.md create mode 100644 docs/api/variables/signature_bytes_length.md create mode 100644 docs/api/variables/signature_hex_length.md create mode 100644 docs/api/variables/supported_bee_version.md create mode 100644 docs/api/variables/supported_bee_version_exact.md create mode 100644 docs/api/variables/topic_bytes_length.md create mode 100644 docs/api/variables/topic_hex_length.md diff --git a/bee-js b/bee-js index 7dfd556b..0ac3a7d3 160000 --- a/bee-js +++ b/bee-js @@ -1 +1 @@ -Subproject commit 7dfd556b2d30a578ffe60406ead9abb6e184107c +Subproject commit 0ac3a7d3e566447da526e79623f788a2eb6aafba diff --git a/docs/api/classes/bee.md b/docs/api/classes/bee.md index afd0876b..4d1f6112 100644 --- a/docs/api/classes/bee.md +++ b/docs/api/classes/bee.md @@ -10,35 +10,56 @@ hide_title: true The Bee class provides a way of interacting with the Bee APIs based on the provided url -**`param`** URL of a running Bee node - ## Constructors ### constructor -\+ **new Bee**(`url`: *string*): [*Bee*](bee.md) +\+ **new Bee**(`url`: *string*, `options?`: [*BeeOptions*](../interfaces/beeoptions.md)): [*Bee*](bee.md) #### Parameters: -Name | Type | -:------ | :------ | -`url` | *string* | +Name | Type | Description | +:------ | :------ | :------ | +`url` | *string* | URL of a running Bee node | +`options?` | [*BeeOptions*](../interfaces/beeoptions.md) | | **Returns:** [*Bee*](bee.md) -Defined in: [bee-js/src/bee.ts:40](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L40) +Defined in: [bee-js/src/bee.ts:50](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L50) ## Properties +### signer + +• `Optional` `Readonly` **signer**: *undefined* \| [*Signer*](../types/signer.md) + +Defined in: [bee-js/src/bee.ts:50](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L50) + +___ + ### url • `Readonly` **url**: *string* +Defined in: [bee-js/src/bee.ts:49](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L49) + ## Methods +### checkConnection + +▸ **checkConnection**(): *Promise* + +Ping the base bee URL. If connection was not successful throw error + +**Returns:** *Promise* + +Defined in: [bee-js/src/bee.ts:514](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L514) + +___ + ### createFeedManifest -▸ **createFeedManifest**(`type`: *sequence* \| *epoch*, `topic`: *string* \| *Uint8Array* \| Topic, `owner`: *string* \| *Uint8Array* \| EthAddress): *Promise* +▸ **createFeedManifest**(`type`: *sequence* \| *epoch*, `topic`: *string* \| *Uint8Array* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\>, `owner`: *string* \| *Uint8Array* \| [*EthAddress*](../types/utils.eth.ethaddress.md)): *Promise*<[*Reference*](../types/reference.md)\> Create feed manifest chunk and return the reference to it @@ -47,12 +68,12 @@ Create feed manifest chunk and return the reference to it Name | Type | Description | :------ | :------ | :------ | `type` | *sequence* \| *epoch* | The type of the feed, can be 'epoch' or 'sequence' | -`topic` | *string* \| *Uint8Array* \| Topic | Topic in hex or bytes | -`owner` | *string* \| *Uint8Array* \| EthAddress | Owner's ethereum address in hex or bytes | +`topic` | *string* \| *Uint8Array* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> | Topic in hex or bytes | +`owner` | *string* \| *Uint8Array* \| [*EthAddress*](../types/utils.eth.ethaddress.md) | Owner's ethereum address in hex or bytes | -**Returns:** *Promise* +**Returns:** *Promise*<[*Reference*](../types/reference.md)\> -Defined in: [bee-js/src/bee.ts:365](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L365) +Defined in: [bee-js/src/bee.ts:418](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L418) ___ @@ -64,13 +85,13 @@ Create new tag **Returns:** *Promise*<[*Tag*](../interfaces/tag.md)\> -Defined in: [bee-js/src/bee.ts:183](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L183) +Defined in: [bee-js/src/bee.ts:222](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L222) ___ ### downloadData -▸ **downloadData**(`reference`: *string*): *Promise* +▸ **downloadData**(`reference`: *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\>): *Promise*<[*Data*](../interfaces/data.md)\> Download data as a byte array @@ -78,17 +99,17 @@ Download data as a byte array Name | Type | Description | :------ | :------ | :------ | -`reference` | *string* | Bee data reference | +`reference` | *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> | Bee data reference | -**Returns:** *Promise* +**Returns:** *Promise*<[*Data*](../interfaces/data.md)\> -Defined in: [bee-js/src/bee.ts:60](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L60) +Defined in: [bee-js/src/bee.ts:87](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L87) ___ ### downloadFile -▸ **downloadFile**(`reference`: *string*): *Promise*<[*FileData*](../interfaces/filedata.md)\> +▸ **downloadFile**(`reference`: *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\>): *Promise*<[*FileData*](../interfaces/filedata.md)<[*Data*](../interfaces/data.md)\>\> Download single file as a byte array @@ -96,17 +117,17 @@ Download single file as a byte array Name | Type | Description | :------ | :------ | :------ | -`reference` | *string* | Bee file reference | +`reference` | *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> | Bee file reference | -**Returns:** *Promise*<[*FileData*](../interfaces/filedata.md)\> +**Returns:** *Promise*<[*FileData*](../interfaces/filedata.md)<[*Data*](../interfaces/data.md)\>\> -Defined in: [bee-js/src/bee.ts:105](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L105) +Defined in: [bee-js/src/bee.ts:136](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L136) ___ ### downloadFileFromCollection -▸ **downloadFileFromCollection**(`reference`: *string*, `path?`: *string*): *Promise*<[*FileData*](../interfaces/filedata.md)\> +▸ **downloadFileFromCollection**(`reference`: *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\>, `path?`: *string*): *Promise*<[*FileData*](../interfaces/filedata.md)<[*Data*](../interfaces/data.md)\>\> Download single file as a byte array from collection given using the path @@ -114,20 +135,20 @@ Download single file as a byte array from collection given using the path Name | Type | Default value | Description | :------ | :------ | :------ | :------ | -`reference` | *string* | - | Bee collection reference | +`reference` | *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> | - | Bee collection reference | `path` | *string* | '' | Path of the requested file in the collection | -**Returns:** *Promise*<[*FileData*](../interfaces/filedata.md)\> +**Returns:** *Promise*<[*FileData*](../interfaces/filedata.md)<[*Data*](../interfaces/data.md)\>\> file in byte array with metadata -Defined in: [bee-js/src/bee.ts:159](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L159) +Defined in: [bee-js/src/bee.ts:194](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L194) ___ ### downloadReadableData -▸ **downloadReadableData**(`reference`: *string*, `axiosOptions?`: AxiosRequestConfig): *Promise* +▸ **downloadReadableData**(`reference`: *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\>, `axiosOptions?`: AxiosRequestConfig): *Promise* Download data as a readable stream @@ -135,18 +156,18 @@ Download data as a readable stream Name | Type | Description | :------ | :------ | :------ | -`reference` | *string* | Bee data reference | +`reference` | *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> | Bee data reference | `axiosOptions?` | AxiosRequestConfig | optional - alter default options of axios HTTP client | **Returns:** *Promise* -Defined in: [bee-js/src/bee.ts:70](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L70) +Defined in: [bee-js/src/bee.ts:99](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L99) ___ ### downloadReadableFile -▸ **downloadReadableFile**(`reference`: *string*): *Promise*<[*FileData*](../interfaces/filedata.md)\> +▸ **downloadReadableFile**(`reference`: *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\>): *Promise*<[*FileData*](../interfaces/filedata.md)\> Download single file as a readable stream @@ -154,17 +175,17 @@ Download single file as a readable stream Name | Type | Description | :------ | :------ | :------ | -`reference` | *string* | Bee file reference | +`reference` | *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> | Bee file reference | **Returns:** *Promise*<[*FileData*](../interfaces/filedata.md)\> -Defined in: [bee-js/src/bee.ts:114](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L114) +Defined in: [bee-js/src/bee.ts:147](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L147) ___ ### downloadReadableFileFromCollection -▸ **downloadReadableFileFromCollection**(`reference`: *string*, `path?`: *string*, `axiosOptions?`: AxiosRequestConfig): *Promise*<[*FileData*](../interfaces/filedata.md)\> +▸ **downloadReadableFileFromCollection**(`reference`: *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\>, `path?`: *string*, `axiosOptions?`: AxiosRequestConfig): *Promise*<[*FileData*](../interfaces/filedata.md)\> Download single file as a readable stream from collection given using the path @@ -172,7 +193,7 @@ Download single file as a readable stream from collection given using the path Name | Type | Default value | Description | :------ | :------ | :------ | :------ | -`reference` | *string* | - | Bee collection reference | +`reference` | *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> | - | Bee collection reference | `path` | *string* | '' | Path of the requested file in the collection | `axiosOptions?` | AxiosRequestConfig | - | optional - alter default options of axios HTTP client | @@ -180,13 +201,27 @@ Name | Type | Default value | Description | file in readable stream with metadata -Defined in: [bee-js/src/bee.ts:172](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L172) +Defined in: [bee-js/src/bee.ts:209](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L209) + +___ + +### isConnected + +▸ **isConnected**(): *Promise* + +Ping the base bee URL. + +**Returns:** *Promise* + +true if succesfull, false on error + +Defined in: [bee-js/src/bee.ts:523](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L523) ___ ### makeFeedReader -▸ **makeFeedReader**(`type`: *sequence* \| *epoch*, `topic`: *string* \| *Uint8Array* \| Topic, `owner`: *string* \| *Uint8Array* \| EthAddress): FeedReader +▸ **makeFeedReader**(`type`: *sequence* \| *epoch*, `topic`: *string* \| *Uint8Array* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\>, `owner`: *string* \| *Uint8Array* \| [*EthAddress*](../types/utils.eth.ethaddress.md)): [*FeedReader*](../interfaces/feedreader.md) Make a new feed reader for downloading feed updates @@ -195,18 +230,18 @@ Make a new feed reader for downloading feed updates Name | Type | Description | :------ | :------ | :------ | `type` | *sequence* \| *epoch* | The type of the feed, can be 'epoch' or 'sequence' | -`topic` | *string* \| *Uint8Array* \| Topic | Topic in hex or bytes | -`owner` | *string* \| *Uint8Array* \| EthAddress | Owner's ethereum address in hex or bytes | +`topic` | *string* \| *Uint8Array* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> | Topic in hex or bytes | +`owner` | *string* \| *Uint8Array* \| [*EthAddress*](../types/utils.eth.ethaddress.md) | Owner's ethereum address in hex or bytes | -**Returns:** FeedReader +**Returns:** [*FeedReader*](../interfaces/feedreader.md) -Defined in: [bee-js/src/bee.ts:385](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L385) +Defined in: [bee-js/src/bee.ts:438](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L438) ___ ### makeFeedTopic -▸ **makeFeedTopic**(`topic`: *string*): Topic +▸ **makeFeedTopic**(`topic`: *string*): [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> Make a new feed topic from a string @@ -219,15 +254,15 @@ Name | Type | Description | :------ | :------ | :------ | `topic` | *string* | The input string | -**Returns:** Topic +**Returns:** [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> -Defined in: [bee-js/src/bee.ts:422](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L422) +Defined in: [bee-js/src/bee.ts:479](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L479) ___ ### makeFeedWriter -▸ **makeFeedWriter**(`type`: *sequence* \| *epoch*, `topic`: *string* \| *Uint8Array* \| Topic, `signer`: *string* \| *Uint8Array* \| Signer): FeedWriter +▸ **makeFeedWriter**(`type`: *sequence* \| *epoch*, `topic`: *string* \| *Uint8Array* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\>, `signer?`: *string* \| *Uint8Array* \| [*Signer*](../types/signer.md)): [*FeedWriter*](../interfaces/feedwriter.md) Make a new feed writer for updating feeds @@ -236,18 +271,18 @@ Make a new feed writer for updating feeds Name | Type | Description | :------ | :------ | :------ | `type` | *sequence* \| *epoch* | The type of the feed, can be 'epoch' or 'sequence' | -`topic` | *string* \| *Uint8Array* \| Topic | Topic in hex or bytes | -`signer` | *string* \| *Uint8Array* \| Signer | The signer's private key or a Signer instance that can sign data | +`topic` | *string* \| *Uint8Array* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> | Topic in hex or bytes | +`signer?` | *string* \| *Uint8Array* \| [*Signer*](../types/signer.md) | The signer's private key or a Signer instance that can sign data | -**Returns:** FeedWriter +**Returns:** [*FeedWriter*](../interfaces/feedwriter.md) -Defined in: [bee-js/src/bee.ts:405](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L405) +Defined in: [bee-js/src/bee.ts:458](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L458) ___ ### makeSOCReader -▸ **makeSOCReader**(`ownerAddress`: *string* \| *Uint8Array* \| EthAddress): SOCReader +▸ **makeSOCReader**(`ownerAddress`: *string* \| *Uint8Array* \| [*EthAddress*](../types/utils.eth.ethaddress.md)): [*SOCReader*](../interfaces/socreader.md) Returns an object for reading single owner chunks @@ -255,17 +290,17 @@ Returns an object for reading single owner chunks Name | Type | Description | :------ | :------ | :------ | -`ownerAddress` | *string* \| *Uint8Array* \| EthAddress | The ethereum address of the owner | +`ownerAddress` | *string* \| *Uint8Array* \| [*EthAddress*](../types/utils.eth.ethaddress.md) | The ethereum address of the owner | -**Returns:** SOCReader +**Returns:** [*SOCReader*](../interfaces/socreader.md) -Defined in: [bee-js/src/bee.ts:431](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L431) +Defined in: [bee-js/src/bee.ts:488](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L488) ___ ### makeSOCWriter -▸ **makeSOCWriter**(`signer`: *string* \| *Uint8Array* \| Signer): SOCWriter +▸ **makeSOCWriter**(`signer?`: *string* \| *Uint8Array* \| [*Signer*](../types/signer.md)): [*SOCWriter*](../interfaces/socwriter.md) Returns an object for reading and writing single owner chunks @@ -273,17 +308,17 @@ Returns an object for reading and writing single owner chunks Name | Type | Description | :------ | :------ | :------ | -`signer` | *string* \| *Uint8Array* \| Signer | The signer's private key or a Signer instance that can sign data | +`signer?` | *string* \| *Uint8Array* \| [*Signer*](../types/signer.md) | The signer's private key or a Signer instance that can sign data | -**Returns:** SOCWriter +**Returns:** [*SOCWriter*](../interfaces/socwriter.md) -Defined in: [bee-js/src/bee.ts:444](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L444) +Defined in: [bee-js/src/bee.ts:501](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L501) ___ ### pinCollection -▸ **pinCollection**(`reference`: *string*): *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> +▸ **pinCollection**(`reference`: *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\>): *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> Pin collection with given reference @@ -291,17 +326,17 @@ Pin collection with given reference Name | Type | Description | :------ | :------ | :------ | -`reference` | *string* | Bee collection reference | +`reference` | *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> | Bee collection reference | **Returns:** *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> -Defined in: [bee-js/src/bee.ts:219](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L219) +Defined in: [bee-js/src/bee.ts:262](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L262) ___ ### pinData -▸ **pinData**(`reference`: *string*): *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> +▸ **pinData**(`reference`: *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\>): *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> Pin data with given reference @@ -309,17 +344,17 @@ Pin data with given reference Name | Type | Description | :------ | :------ | :------ | -`reference` | *string* | Bee data reference | +`reference` | *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> | Bee data reference | **Returns:** *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> -Defined in: [bee-js/src/bee.ts:237](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L237) +Defined in: [bee-js/src/bee.ts:284](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L284) ___ ### pinFile -▸ **pinFile**(`reference`: *string*): *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> +▸ **pinFile**(`reference`: *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\>): *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> Pin file with given reference @@ -327,17 +362,17 @@ Pin file with given reference Name | Type | Description | :------ | :------ | :------ | -`reference` | *string* | Bee file reference | +`reference` | *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> | Bee file reference | **Returns:** *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> -Defined in: [bee-js/src/bee.ts:201](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L201) +Defined in: [bee-js/src/bee.ts:240](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L240) ___ ### pssReceive -▸ **pssReceive**(`topic`: *string*, `timeoutMsec?`: *number*): *Promise* +▸ **pssReceive**(`topic`: *string*, `timeoutMsec?`: *number*): *Promise*<[*Data*](../interfaces/data.md)\> Receive message with Postal Service for Swarm @@ -358,11 +393,11 @@ Name | Type | Default value | Description | `topic` | *string* | - | Topic name | `timeoutMsec` | *number* | 0 | Timeout in milliseconds | -**Returns:** *Promise* +**Returns:** *Promise*<[*Data*](../interfaces/data.md)\> Message in byte array -Defined in: [bee-js/src/bee.ts:331](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L331) +Defined in: [bee-js/src/bee.ts:384](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L384) ___ @@ -383,7 +418,7 @@ Name | Type | Description | **Returns:** *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> -Defined in: [bee-js/src/bee.ts:259](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L259) +Defined in: [bee-js/src/bee.ts:310](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L310) ___ @@ -404,7 +439,7 @@ Name | Type | Description | Subscription to a given topic -Defined in: [bee-js/src/bee.ts:276](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L276) +Defined in: [bee-js/src/bee.ts:327](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L327) ___ @@ -422,13 +457,13 @@ Name | Type | **Returns:** *Promise*<[*Tag*](../interfaces/tag.md)\> -Defined in: [bee-js/src/bee.ts:192](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L192) +Defined in: [bee-js/src/bee.ts:231](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L231) ___ ### unpinCollection -▸ **unpinCollection**(`reference`: *string*): *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> +▸ **unpinCollection**(`reference`: *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\>): *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> Unpin collection with given reference @@ -436,17 +471,17 @@ Unpin collection with given reference Name | Type | Description | :------ | :------ | :------ | -`reference` | *string* | Bee collection reference | +`reference` | *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> | Bee collection reference | **Returns:** *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> -Defined in: [bee-js/src/bee.ts:228](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L228) +Defined in: [bee-js/src/bee.ts:273](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L273) ___ ### unpinData -▸ **unpinData**(`reference`: *string*): *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> +▸ **unpinData**(`reference`: *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\>): *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> Unpin data with given reference @@ -454,17 +489,17 @@ Unpin data with given reference Name | Type | Description | :------ | :------ | :------ | -`reference` | *string* | Bee data reference | +`reference` | *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> | Bee data reference | **Returns:** *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> -Defined in: [bee-js/src/bee.ts:246](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L246) +Defined in: [bee-js/src/bee.ts:295](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L295) ___ ### unpinFile -▸ **unpinFile**(`reference`: *string*): *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> +▸ **unpinFile**(`reference`: *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\>): *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> Unpin file with given reference @@ -472,17 +507,17 @@ Unpin file with given reference Name | Type | Description | :------ | :------ | :------ | -`reference` | *string* | Bee file reference | +`reference` | *string* \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> | Bee file reference | **Returns:** *Promise*<[*BeeResponse*](../interfaces/beeresponse.md)\> -Defined in: [bee-js/src/bee.ts:210](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L210) +Defined in: [bee-js/src/bee.ts:251](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L251) ___ ### uploadData -▸ **uploadData**(`data`: *string* \| *Uint8Array*, `options?`: [*UploadOptions*](../interfaces/uploadoptions.md)): *Promise* +▸ **uploadData**(`data`: *string* \| *Uint8Array*, `options?`: [*UploadOptions*](../interfaces/uploadoptions.md)): *Promise*<[*Reference*](../types/reference.md)\> Upload data to a Bee node @@ -491,19 +526,19 @@ Upload data to a Bee node Name | Type | Description | :------ | :------ | :------ | `data` | *string* \| *Uint8Array* | Data to be uploaded | -`options?` | [*UploadOptions*](../interfaces/uploadoptions.md) | Aditional options like tag, encryption, pinning, content-type | +`options?` | [*UploadOptions*](../interfaces/uploadoptions.md) | Additional options like tag, encryption, pinning, content-type | -**Returns:** *Promise* +**Returns:** *Promise*<[*Reference*](../types/reference.md)\> reference is a content hash of the data -Defined in: [bee-js/src/bee.ts:51](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L51) +Defined in: [bee-js/src/bee.ts:78](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L78) ___ ### uploadFile -▸ **uploadFile**(`data`: *string* \| *Uint8Array* \| *Readable* \| File, `name?`: *string*, `options?`: [*FileUploadOptions*](../interfaces/fileuploadoptions.md)): *Promise* +▸ **uploadFile**(`data`: *string* \| *Uint8Array* \| *Readable* \| File, `name?`: *string*, `options?`: [*FileUploadOptions*](../interfaces/fileuploadoptions.md)): *Promise*<[*Reference*](../types/reference.md)\> Upload single file to a Bee node @@ -515,17 +550,17 @@ Name | Type | Description | `name?` | *string* | Name of the uploaded file (optional) | `options?` | [*FileUploadOptions*](../interfaces/fileuploadoptions.md) | Aditional options like tag, encryption, pinning, content-type | -**Returns:** *Promise* +**Returns:** *Promise*<[*Reference*](../types/reference.md)\> reference is a content hash of the file -Defined in: [bee-js/src/bee.ts:83](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L83) +Defined in: [bee-js/src/bee.ts:114](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L114) ___ ### uploadFiles -▸ **uploadFiles**(`fileList`: FileList \| File[], `options?`: [*CollectionUploadOptions*](../interfaces/collectionuploadoptions.md)): *Promise* +▸ **uploadFiles**(`fileList`: FileList \| File[], `options?`: [*CollectionUploadOptions*](../interfaces/collectionuploadoptions.md)): *Promise*<[*Reference*](../types/reference.md)\> Upload collection of files to a Bee node @@ -538,17 +573,17 @@ Name | Type | Description | `fileList` | FileList \| File[] | list of files to be uploaded | `options?` | [*CollectionUploadOptions*](../interfaces/collectionuploadoptions.md) | Additional options like tag, encryption, pinning | -**Returns:** *Promise* +**Returns:** *Promise*<[*Reference*](../types/reference.md)\> reference of the collection of files -Defined in: [bee-js/src/bee.ts:128](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L128) +Defined in: [bee-js/src/bee.ts:163](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L163) ___ ### uploadFilesFromDirectory -▸ **uploadFilesFromDirectory**(`dir`: *string*, `recursive?`: *boolean*, `options?`: [*CollectionUploadOptions*](../interfaces/collectionuploadoptions.md)): *Promise* +▸ **uploadFilesFromDirectory**(`dir`: *string*, `recursive?`: *boolean*, `options?`: [*CollectionUploadOptions*](../interfaces/collectionuploadoptions.md)): *Promise*<[*Reference*](../types/reference.md)\> Upload collection of files to a Bee node @@ -562,8 +597,8 @@ Name | Type | Default value | Description | `recursive` | *boolean* | true | specifies if the directory should be recursively uploaded | `options?` | [*CollectionUploadOptions*](../interfaces/collectionuploadoptions.md) | - | Additional options like tag, encryption, pinning | -**Returns:** *Promise* +**Returns:** *Promise*<[*Reference*](../types/reference.md)\> reference of the collection of files -Defined in: [bee-js/src/bee.ts:145](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee.ts#L145) +Defined in: [bee-js/src/bee.ts:180](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee.ts#L180) diff --git a/docs/api/classes/beeargumenterror.md b/docs/api/classes/beeargumenterror.md index b7bb6e17..57b9eccc 100644 --- a/docs/api/classes/beeargumenterror.md +++ b/docs/api/classes/beeargumenterror.md @@ -31,7 +31,7 @@ Name | Type | Inherited from: [BeeError](beeerror.md) -Defined in: [bee-js/src/utils/error.ts:7](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/error.ts#L7) +Defined in: [bee-js/src/utils/error.ts:7](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/error.ts#L7) ## Properties diff --git a/docs/api/classes/beedebug.md b/docs/api/classes/beedebug.md index 6cf296a8..0e1a0e24 100644 --- a/docs/api/classes/beedebug.md +++ b/docs/api/classes/beedebug.md @@ -26,7 +26,7 @@ Name | Type | **Returns:** [*BeeDebug*](beedebug.md) -Defined in: [bee-js/src/bee-debug.ts:28](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L28) +Defined in: [bee-js/src/bee-debug.ts:36](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L36) ## Properties @@ -34,6 +34,8 @@ Defined in: [bee-js/src/bee-debug.ts:28](https://github.com/ethersphere/bee-js/b • `Readonly` **url**: *string* +Defined in: [bee-js/src/bee-debug.ts:36](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L36) + ## Methods ### cashoutLastCheque @@ -50,13 +52,13 @@ Name | Type | Description | **Returns:** *Promise*<[*CashoutResponse*](../interfaces/cashoutresponse.md)\> -Defined in: [bee-js/src/bee-debug.ts:134](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L134) +Defined in: [bee-js/src/bee-debug.ts:161](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L161) ___ ### depositTokens -▸ **depositTokens**(`amount`: *number*): *Promise*<[*DepositTokensResponse*](../interfaces/deposittokensresponse.md)\> +▸ **depositTokens**(`amount`: *number* \| BigInt): *Promise*<[*DepositTokensResponse*](../interfaces/deposittokensresponse.md)\> Deposit tokens from overlay address into chequebook @@ -64,11 +66,11 @@ Deposit tokens from overlay address into chequebook Name | Type | Description | :------ | :------ | :------ | -`amount` | *number* | Amount of tokens to deposit | +`amount` | *number* \| BigInt | Amount of tokens to deposit (must be positive integer) | **Returns:** *Promise*<[*DepositTokensResponse*](../interfaces/deposittokensresponse.md)\> -Defined in: [bee-js/src/bee-debug.ts:143](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L143) +Defined in: [bee-js/src/bee-debug.ts:170](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L170) ___ @@ -80,7 +82,7 @@ Get the balances with all known peers including prepaid services **Returns:** *Promise*<[*BalanceResponse*](../interfaces/balanceresponse.md)\> -Defined in: [bee-js/src/bee-debug.ts:57](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L57) +Defined in: [bee-js/src/bee-debug.ts:81](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L81) ___ @@ -92,7 +94,17 @@ Get settlements with all known peers and total amount sent or received **Returns:** *Promise*<[*AllSettlements*](../interfaces/allsettlements.md)\> -Defined in: [bee-js/src/bee-debug.ts:172](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L172) +Defined in: [bee-js/src/bee-debug.ts:207](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L207) + +___ + +### getBlocklist + +▸ **getBlocklist**(): *Promise*<[*Peer*](../interfaces/peer.md)[]\> + +**Returns:** *Promise*<[*Peer*](../interfaces/peer.md)[]\> + +Defined in: [bee-js/src/bee-debug.ts:51](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L51) ___ @@ -100,23 +112,38 @@ ___ ▸ **getChequebookAddress**(): *Promise*<[*ChequebookAddressResponse*](../interfaces/chequebookaddressresponse.md)\> -Get the address of the chequebook contract used +Get the address of the chequebook contract used. + +**Warning:** The address is returned with 0x prefix unlike all other calls. +https://github.com/ethersphere/bee/issues/1443 **Returns:** *Promise*<[*ChequebookAddressResponse*](../interfaces/chequebookaddressresponse.md)\> -Defined in: [bee-js/src/bee-debug.ts:93](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L93) +Defined in: [bee-js/src/bee-debug.ts:120](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L120) ___ -### getChequeubookBalance +### getChequebookBalance -▸ **getChequeubookBalance**(): *Promise*<[*ChequebookBalanceResponse*](../interfaces/chequebookbalanceresponse.md)\> +▸ **getChequebookBalance**(): *Promise*<[*ChequebookBalanceResponse*](../interfaces/chequebookbalanceresponse.md)\> Get the balance of the chequebook **Returns:** *Promise*<[*ChequebookBalanceResponse*](../interfaces/chequebookbalanceresponse.md)\> -Defined in: [bee-js/src/bee-debug.ts:100](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L100) +Defined in: [bee-js/src/bee-debug.ts:127](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L127) + +___ + +### getHealth + +▸ **getHealth**(): *Promise*<[*Health*](../interfaces/health.md)\> + +Get health of node + +**Returns:** *Promise*<[*Health*](../interfaces/health.md)\> + +Defined in: [bee-js/src/bee-debug.ts:214](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L214) ___ @@ -134,7 +161,7 @@ Name | Type | Description | **Returns:** *Promise*<[*LastCashoutActionResponse*](../interfaces/lastcashoutactionresponse.md)\> -Defined in: [bee-js/src/bee-debug.ts:125](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L125) +Defined in: [bee-js/src/bee-debug.ts:152](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L152) ___ @@ -146,7 +173,7 @@ Get last cheques for all peers **Returns:** *Promise*<[*LastChequesResponse*](../interfaces/lastchequesresponse.md)\> -Defined in: [bee-js/src/bee-debug.ts:107](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L107) +Defined in: [bee-js/src/bee-debug.ts:134](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L134) ___ @@ -164,17 +191,17 @@ Name | Type | Description | **Returns:** *Promise*<[*LastChequesForPeerResponse*](../interfaces/lastchequesforpeerresponse.md)\> -Defined in: [bee-js/src/bee-debug.ts:116](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L116) +Defined in: [bee-js/src/bee-debug.ts:143](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L143) ___ -### getOverlayAddress +### getNodeAddresses -▸ **getOverlayAddress**(): *Promise* +▸ **getNodeAddresses**(): *Promise*<[*NodeAddresses*](../interfaces/nodeaddresses.md)\> -**Returns:** *Promise* +**Returns:** *Promise*<[*NodeAddresses*](../interfaces/nodeaddresses.md)\> -Defined in: [bee-js/src/bee-debug.ts:31](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L31) +Defined in: [bee-js/src/bee-debug.ts:47](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L47) ___ @@ -186,7 +213,7 @@ Get the past due consumption balances with all known peers **Returns:** *Promise*<[*BalanceResponse*](../interfaces/balanceresponse.md)\> -Defined in: [bee-js/src/bee-debug.ts:73](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L73) +Defined in: [bee-js/src/bee-debug.ts:97](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L97) ___ @@ -204,7 +231,7 @@ Name | Type | Description | **Returns:** *Promise*<[*PeerBalance*](../interfaces/peerbalance.md)\> -Defined in: [bee-js/src/bee-debug.ts:82](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L82) +Defined in: [bee-js/src/bee-debug.ts:106](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L106) ___ @@ -222,7 +249,7 @@ Name | Type | Description | **Returns:** *Promise*<[*PeerBalance*](../interfaces/peerbalance.md)\> -Defined in: [bee-js/src/bee-debug.ts:66](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L66) +Defined in: [bee-js/src/bee-debug.ts:90](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L90) ___ @@ -234,17 +261,7 @@ Get list of peers for this node **Returns:** *Promise*<[*Peer*](../interfaces/peer.md)[]\> -Defined in: [bee-js/src/bee-debug.ts:46](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L46) - -___ - -### getPssPublicKey - -▸ **getPssPublicKey**(): *Promise* - -**Returns:** *Promise* - -Defined in: [bee-js/src/bee-debug.ts:37](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L37) +Defined in: [bee-js/src/bee-debug.ts:58](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L58) ___ @@ -262,13 +279,69 @@ Name | Type | Description | **Returns:** *Promise*<[*Settlements*](../interfaces/settlements.md)\> -Defined in: [bee-js/src/bee-debug.ts:165](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L165) +Defined in: [bee-js/src/bee-debug.ts:200](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L200) + +___ + +### getTopology + +▸ **getTopology**(): *Promise*<[*Topology*](../interfaces/topology.md)\> + +**Returns:** *Promise*<[*Topology*](../interfaces/topology.md)\> + +Defined in: [bee-js/src/bee-debug.ts:66](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L66) + +___ + +### isSupportedVersion + +▸ **isSupportedVersion**(): *Promise* + +Connnects to a node and checks if it is a supported Bee version by the bee-js + +**Returns:** *Promise* + +true if the Bee node version is supported + +Defined in: [bee-js/src/bee-debug.ts:223](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L223) + +___ + +### pingPeer + +▸ **pingPeer**(`peer`: *string*): *Promise*<[*PingResponse*](../interfaces/pingresponse.md)\> + +#### Parameters: + +Name | Type | +:------ | :------ | +`peer` | *string* | + +**Returns:** *Promise*<[*PingResponse*](../interfaces/pingresponse.md)\> + +Defined in: [bee-js/src/bee-debug.ts:70](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L70) + +___ + +### removePeer + +▸ **removePeer**(`peer`: *string*): *Promise*<[*RemovePeerResponse*](../interfaces/removepeerresponse.md)\> + +#### Parameters: + +Name | Type | +:------ | :------ | +`peer` | *string* | + +**Returns:** *Promise*<[*RemovePeerResponse*](../interfaces/removepeerresponse.md)\> + +Defined in: [bee-js/src/bee-debug.ts:62](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L62) ___ ### withdrawTokens -▸ **withdrawTokens**(`amount`: *number*): *Promise*<[*WithdrawTokensResponse*](../interfaces/withdrawtokensresponse.md)\> +▸ **withdrawTokens**(`amount`: *number* \| BigInt): *Promise*<[*WithdrawTokensResponse*](../interfaces/withdrawtokensresponse.md)\> Withdraw tokens from the chequebook to the overlay address @@ -276,8 +349,8 @@ Withdraw tokens from the chequebook to the overlay address Name | Type | Description | :------ | :------ | :------ | -`amount` | *number* | Amount of tokens to withdraw | +`amount` | *number* \| BigInt | Amount of tokens to withdraw (must be positive integer) | **Returns:** *Promise*<[*WithdrawTokensResponse*](../interfaces/withdrawtokensresponse.md)\> -Defined in: [bee-js/src/bee-debug.ts:152](https://github.com/ethersphere/bee-js/blob/7dfd556/src/bee-debug.ts#L152) +Defined in: [bee-js/src/bee-debug.ts:183](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/bee-debug.ts#L183) diff --git a/docs/api/classes/beeerror.md b/docs/api/classes/beeerror.md index 43742793..9ca8760e 100644 --- a/docs/api/classes/beeerror.md +++ b/docs/api/classes/beeerror.md @@ -34,7 +34,7 @@ Name | Type | **Returns:** [*BeeError*](beeerror.md) -Defined in: [bee-js/src/utils/error.ts:1](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/error.ts#L1) +Defined in: [bee-js/src/utils/error.ts:1](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/error.ts#L1) ## Properties diff --git a/docs/api/classes/beerequesterror.md b/docs/api/classes/beerequesterror.md index 875b16c4..d7395417 100644 --- a/docs/api/classes/beerequesterror.md +++ b/docs/api/classes/beerequesterror.md @@ -30,7 +30,7 @@ Name | Type | Inherited from: [BeeError](beeerror.md) -Defined in: [bee-js/src/utils/error.ts:13](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/error.ts#L13) +Defined in: [bee-js/src/utils/error.ts:13](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/error.ts#L13) ## Properties diff --git a/docs/api/classes/beeresponseerror.md b/docs/api/classes/beeresponseerror.md index 890fea44..2fdde4e7 100644 --- a/docs/api/classes/beeresponseerror.md +++ b/docs/api/classes/beeresponseerror.md @@ -31,7 +31,7 @@ Name | Type | Inherited from: [BeeError](beeerror.md) -Defined in: [bee-js/src/utils/error.ts:19](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/error.ts#L19) +Defined in: [bee-js/src/utils/error.ts:19](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/error.ts#L19) ## Properties diff --git a/docs/api/functions/utils.bytes.bytesatoffset.md b/docs/api/functions/utils.bytes.bytesatoffset.md index 5cb5c50c..5edc5b3c 100644 --- a/docs/api/functions/utils.bytes.bytesatoffset.md +++ b/docs/api/functions/utils.bytes.bytesatoffset.md @@ -30,4 +30,4 @@ Name | Type | Description | **Returns:** [*Bytes*](../interfaces/utils.bytes.bytes.md) -Defined in: [bee-js/src/utils/bytes.ts:88](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/bytes.ts#L88) +Defined in: [bee-js/src/utils/bytes.ts:91](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/bytes.ts#L91) diff --git a/docs/api/functions/utils.bytes.bytesequal.md b/docs/api/functions/utils.bytes.bytesequal.md index ad8bd93d..65c2ef4c 100644 --- a/docs/api/functions/utils.bytes.bytesequal.md +++ b/docs/api/functions/utils.bytes.bytesequal.md @@ -23,4 +23,4 @@ Name | Type | Description | **Returns:** *boolean* -Defined in: [bee-js/src/utils/bytes.ts:115](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/bytes.ts#L115) +Defined in: [bee-js/src/utils/bytes.ts:118](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/bytes.ts#L118) diff --git a/docs/api/functions/utils.bytes.flexbytesatoffset.md b/docs/api/functions/utils.bytes.flexbytesatoffset.md index 1f2e4eec..13424f59 100644 --- a/docs/api/functions/utils.bytes.flexbytesatoffset.md +++ b/docs/api/functions/utils.bytes.flexbytesatoffset.md @@ -32,4 +32,4 @@ Name | Type | Description | **Returns:** [*FlexBytes*](../interfaces/utils.bytes.flexbytes.md) -Defined in: [bee-js/src/utils/bytes.ts:100](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/bytes.ts#L100) +Defined in: [bee-js/src/utils/bytes.ts:103](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/bytes.ts#L103) diff --git a/docs/api/functions/utils.bytes.isbytes.md b/docs/api/functions/utils.bytes.isbytes.md index a971d309..b90032ae 100644 --- a/docs/api/functions/utils.bytes.isbytes.md +++ b/docs/api/functions/utils.bytes.isbytes.md @@ -29,4 +29,4 @@ Name | Type | Description | **Returns:** b is Bytes -Defined in: [bee-js/src/utils/bytes.ts:31](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/bytes.ts#L31) +Defined in: [bee-js/src/utils/bytes.ts:34](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/bytes.ts#L34) diff --git a/docs/api/functions/utils.bytes.isflexbytes.md b/docs/api/functions/utils.bytes.isflexbytes.md index 103d0052..8e5e15a7 100644 --- a/docs/api/functions/utils.bytes.isflexbytes.md +++ b/docs/api/functions/utils.bytes.isflexbytes.md @@ -31,4 +31,4 @@ Name | Type | Description | **Returns:** b is FlexBytes -Defined in: [bee-js/src/utils/bytes.ts:55](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/bytes.ts#L55) +Defined in: [bee-js/src/utils/bytes.ts:58](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/bytes.ts#L58) diff --git a/docs/api/functions/utils.bytes.makebytes.md b/docs/api/functions/utils.bytes.makebytes.md index 05efc1bd..dae2a5d3 100644 --- a/docs/api/functions/utils.bytes.makebytes.md +++ b/docs/api/functions/utils.bytes.makebytes.md @@ -28,4 +28,4 @@ Name | Type | Description | **Returns:** [*Bytes*](../interfaces/utils.bytes.bytes.md) -Defined in: [bee-js/src/utils/bytes.ts:124](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/bytes.ts#L124) +Defined in: [bee-js/src/utils/bytes.ts:127](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/bytes.ts#L127) diff --git a/docs/api/functions/utils.bytes.verifybytes.md b/docs/api/functions/utils.bytes.verifybytes.md index 3543ad89..2b2f7625 100644 --- a/docs/api/functions/utils.bytes.verifybytes.md +++ b/docs/api/functions/utils.bytes.verifybytes.md @@ -29,4 +29,4 @@ Name | Type | Description | **Returns:** [*Bytes*](../interfaces/utils.bytes.bytes.md) \| *never* -Defined in: [bee-js/src/utils/bytes.ts:41](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/bytes.ts#L41) +Defined in: [bee-js/src/utils/bytes.ts:44](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/bytes.ts#L44) diff --git a/docs/api/functions/utils.bytes.verifybytesatoffset.md b/docs/api/functions/utils.bytes.verifybytesatoffset.md index cef7ae29..47e9ae3d 100644 --- a/docs/api/functions/utils.bytes.verifybytesatoffset.md +++ b/docs/api/functions/utils.bytes.verifybytesatoffset.md @@ -30,4 +30,4 @@ Name | Type | Description | **Returns:** [*Bytes*](../interfaces/utils.bytes.bytes.md) -Defined in: [bee-js/src/utils/bytes.ts:135](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/bytes.ts#L135) +Defined in: [bee-js/src/utils/bytes.ts:138](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/bytes.ts#L138) diff --git a/docs/api/functions/utils.bytes.verifyflexbytes.md b/docs/api/functions/utils.bytes.verifyflexbytes.md index 99e3b5e3..33b1a226 100644 --- a/docs/api/functions/utils.bytes.verifyflexbytes.md +++ b/docs/api/functions/utils.bytes.verifyflexbytes.md @@ -31,4 +31,4 @@ Name | Type | Description | **Returns:** [*FlexBytes*](../interfaces/utils.bytes.flexbytes.md) \| *never* -Defined in: [bee-js/src/utils/bytes.ts:70](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/bytes.ts#L70) +Defined in: [bee-js/src/utils/bytes.ts:73](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/bytes.ts#L73) diff --git a/docs/api/functions/utils.bytes.wrapbyteswithhelpers.md b/docs/api/functions/utils.bytes.wrapbyteswithhelpers.md new file mode 100644 index 00000000..489cd082 --- /dev/null +++ b/docs/api/functions/utils.bytes.wrapbyteswithhelpers.md @@ -0,0 +1,23 @@ +--- +id: "utils.bytes.wrapbyteswithhelpers" +title: "Function: wrapBytesWithHelpers" +sidebar_label: "wrapBytesWithHelpers" +custom_edit_url: null +hide_title: true +--- + +# Function: wrapBytesWithHelpers + +[Utils](../modules/utils.md).[Bytes](../modules/utils.bytes.md).wrapBytesWithHelpers + +▸ **wrapBytesWithHelpers**(`data`: Uint8Array): [*Data*](../interfaces/data.md) + +#### Parameters: + +Name | Type | +:------ | :------ | +`data` | Uint8Array | + +**Returns:** [*Data*](../interfaces/data.md) + +Defined in: [bee-js/src/utils/bytes.ts:146](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/bytes.ts#L146) diff --git a/docs/api/functions/utils.data.preparedata.md b/docs/api/functions/utils.data.preparedata.md index 53bc2671..d319eeda 100644 --- a/docs/api/functions/utils.data.preparedata.md +++ b/docs/api/functions/utils.data.preparedata.md @@ -10,14 +10,16 @@ hide_title: true [Utils](../modules/utils.md).[Data](../modules/utils.data.md).prepareData -▸ **prepareData**(`data`: *string* \| ArrayBuffer \| Uint8Array \| Readable): Uint8Array \| Readable +▸ **prepareData**(`data`: *string* \| ArrayBuffer \| Uint8Array \| Readable): Uint8Array \| Readable \| *never* + +Validates input and converts to Uint8Array or Readable #### Parameters: -Name | Type | -:------ | :------ | -`data` | *string* \| ArrayBuffer \| Uint8Array \| Readable | +Name | Type | Description | +:------ | :------ | :------ | +`data` | *string* \| ArrayBuffer \| Uint8Array \| Readable | any string, ArrayBuffer, Uint8Array or Readable | -**Returns:** Uint8Array \| Readable +**Returns:** Uint8Array \| Readable \| *never* -Defined in: [bee-js/src/utils/data.ts:4](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/data.ts#L4) +Defined in: [bee-js/src/utils/data.ts:9](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/data.ts#L9) diff --git a/docs/api/functions/utils.data.preparewebsocketdata.md b/docs/api/functions/utils.data.preparewebsocketdata.md index 8b0aab19..032d85ec 100644 --- a/docs/api/functions/utils.data.preparewebsocketdata.md +++ b/docs/api/functions/utils.data.preparewebsocketdata.md @@ -10,14 +10,14 @@ hide_title: true [Utils](../modules/utils.md).[Data](../modules/utils.data.md).prepareWebsocketData -▸ **prepareWebsocketData**(`data`: Data): Uint8Array +▸ **prepareWebsocketData**(`data`: Data \| Blob): *Promise* \| *never* #### Parameters: Name | Type | :------ | :------ | -`data` | Data | +`data` | Data \| Blob | -**Returns:** Uint8Array +**Returns:** *Promise* \| *never* -Defined in: [bee-js/src/utils/data.ts:14](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/data.ts#L14) +Defined in: [bee-js/src/utils/data.ts:23](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/data.ts#L23) diff --git a/docs/api/functions/utils.eth.ethtoswarmaddress.md b/docs/api/functions/utils.eth.ethtoswarmaddress.md index aaab2c6f..b9924acd 100644 --- a/docs/api/functions/utils.eth.ethtoswarmaddress.md +++ b/docs/api/functions/utils.eth.ethtoswarmaddress.md @@ -25,4 +25,4 @@ Name | Type | Default value | Description | Swarm overlay address -Defined in: [bee-js/src/utils/eth.ts:123](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/eth.ts#L123) +Defined in: [bee-js/src/utils/eth.ts:159](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/eth.ts#L159) diff --git a/docs/api/functions/utils.eth.fromlittleendian.md b/docs/api/functions/utils.eth.fromlittleendian.md index 1db295f4..69877bb7 100644 --- a/docs/api/functions/utils.eth.fromlittleendian.md +++ b/docs/api/functions/utils.eth.fromlittleendian.md @@ -26,4 +26,4 @@ Name | Type | Default value | Description | big-endian encoded hexstring -Defined in: [bee-js/src/utils/eth.ts:100](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/eth.ts#L100) +Defined in: [bee-js/src/utils/eth.ts:136](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/eth.ts#L136) diff --git a/docs/api/functions/utils.eth.isethaddress.md b/docs/api/functions/utils.eth.isethaddress.md deleted file mode 100644 index 2002584c..00000000 --- a/docs/api/functions/utils.eth.isethaddress.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -id: "utils.eth.isethaddress" -title: "Function: isEthAddress" -sidebar_label: "isEthAddress" -custom_edit_url: null -hide_title: true ---- - -# Function: isEthAddress - -[Utils](../modules/utils.md).[Eth](../modules/utils.eth.md).isEthAddress - -▸ **isEthAddress**(`address`: *string* \| [*HexString*](../types/utils.hex.hexstring.md) \| [*HexEthAddress*](../types/utils.eth.hexethaddress.md)): address is BrandedType - -Check if is valid ethereum address - -Pretty much typed version from web3js -https://github.com/ChainSafe/web3.js/blob/1.x/packages/web3-utils/src/utils.js - -#### Parameters: - -Name | Type | Description | -:------ | :------ | :------ | -`address` | *string* \| [*HexString*](../types/utils.hex.hexstring.md) \| [*HexEthAddress*](../types/utils.eth.hexethaddress.md) | Ethereum address as hex string | - -**Returns:** address is BrandedType - -True if is valid eth address - -Defined in: [bee-js/src/utils/eth.ts:54](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/eth.ts#L54) diff --git a/docs/api/functions/utils.eth.ishexethaddress.md b/docs/api/functions/utils.eth.ishexethaddress.md new file mode 100644 index 00000000..8c4a1bcd --- /dev/null +++ b/docs/api/functions/utils.eth.ishexethaddress.md @@ -0,0 +1,30 @@ +--- +id: "utils.eth.ishexethaddress" +title: "Function: isHexEthAddress" +sidebar_label: "isHexEthAddress" +custom_edit_url: null +hide_title: true +--- + +# Function: isHexEthAddress + +[Utils](../modules/utils.md).[Eth](../modules/utils.eth.md).isHexEthAddress + +▸ **isHexEthAddress**(`address`: *string* \| [*HexString*](../types/utils.hex.hexstring.md) \| [*HexEthAddress*](../types/utils.eth.hexethaddress.md)): address is FlavoredType + +Check if is valid ethereum address + +Pretty much typed version from web3js +https://github.com/ChainSafe/web3.js/blob/1.x/packages/web3-utils/src/utils.js + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`address` | *string* \| [*HexString*](../types/utils.hex.hexstring.md) \| [*HexEthAddress*](../types/utils.eth.hexethaddress.md) | Ethereum address as hex string | + +**Returns:** address is FlavoredType + +True if is valid eth address + +Defined in: [bee-js/src/utils/eth.ts:90](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/eth.ts#L90) diff --git a/docs/api/functions/utils.eth.makeethaddress.md b/docs/api/functions/utils.eth.makeethaddress.md new file mode 100644 index 00000000..26b7c5f8 --- /dev/null +++ b/docs/api/functions/utils.eth.makeethaddress.md @@ -0,0 +1,23 @@ +--- +id: "utils.eth.makeethaddress" +title: "Function: makeEthAddress" +sidebar_label: "makeEthAddress" +custom_edit_url: null +hide_title: true +--- + +# Function: makeEthAddress + +[Utils](../modules/utils.md).[Eth](../modules/utils.eth.md).makeEthAddress + +▸ **makeEthAddress**(`address`: [*EthAddress*](../types/utils.eth.ethaddress.md) \| Uint8Array \| *string*): [*EthAddress*](../types/utils.eth.ethaddress.md) + +#### Parameters: + +Name | Type | +:------ | :------ | +`address` | [*EthAddress*](../types/utils.eth.ethaddress.md) \| Uint8Array \| *string* | + +**Returns:** [*EthAddress*](../types/utils.eth.ethaddress.md) + +Defined in: [bee-js/src/utils/eth.ts:12](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/eth.ts#L12) diff --git a/docs/api/functions/utils.eth.makeethereumwalletsigner.md b/docs/api/functions/utils.eth.makeethereumwalletsigner.md new file mode 100644 index 00000000..1a3f627a --- /dev/null +++ b/docs/api/functions/utils.eth.makeethereumwalletsigner.md @@ -0,0 +1,27 @@ +--- +id: "utils.eth.makeethereumwalletsigner" +title: "Function: makeEthereumWalletSigner" +sidebar_label: "makeEthereumWalletSigner" +custom_edit_url: null +hide_title: true +--- + +# Function: makeEthereumWalletSigner + +[Utils](../modules/utils.md).[Eth](../modules/utils.eth.md).makeEthereumWalletSigner + +▸ **makeEthereumWalletSigner**(`provider`: [*JsonRPC*](../interfaces/utils.eth.jsonrpc.md), `ethAddress?`: *string* \| [*HexString*](../types/utils.hex.hexstring.md) \| [*HexEthAddress*](../types/utils.eth.hexethaddress.md)): *Promise*<[*Signer*](../types/signer.md)\> + +Function that takes Ethereum EIP-1193 compatible provider and create an Signer instance that +uses personal_sign method to sign requested data. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`provider` | [*JsonRPC*](../interfaces/utils.eth.jsonrpc.md) | Injected web3 provider like window.ethereum or other compatible with EIP-1193 | +`ethAddress?` | *string* \| [*HexString*](../types/utils.hex.hexstring.md) \| [*HexEthAddress*](../types/utils.eth.hexethaddress.md) | Optional address of the account which the data should be signed with. If not specified eth_requestAccounts requests is used to get the account address. | + +**Returns:** *Promise*<[*Signer*](../types/signer.md)\> + +Defined in: [bee-js/src/utils/eth.ts:189](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/eth.ts#L189) diff --git a/docs/api/functions/utils.eth.makehexethaddress.md b/docs/api/functions/utils.eth.makehexethaddress.md new file mode 100644 index 00000000..198414e6 --- /dev/null +++ b/docs/api/functions/utils.eth.makehexethaddress.md @@ -0,0 +1,23 @@ +--- +id: "utils.eth.makehexethaddress" +title: "Function: makeHexEthAddress" +sidebar_label: "makeHexEthAddress" +custom_edit_url: null +hide_title: true +--- + +# Function: makeHexEthAddress + +[Utils](../modules/utils.md).[Eth](../modules/utils.eth.md).makeHexEthAddress + +▸ **makeHexEthAddress**(`address`: [*EthAddress*](../types/utils.eth.ethaddress.md) \| Uint8Array \| *string*): [*HexEthAddress*](../types/utils.eth.hexethaddress.md) + +#### Parameters: + +Name | Type | +:------ | :------ | +`address` | [*EthAddress*](../types/utils.eth.ethaddress.md) \| Uint8Array \| *string* | + +**Returns:** [*HexEthAddress*](../types/utils.eth.hexethaddress.md) + +Defined in: [bee-js/src/utils/eth.ts:24](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/eth.ts#L24) diff --git a/docs/api/functions/utils.eth.tolittleendian.md b/docs/api/functions/utils.eth.tolittleendian.md index 7ea4a908..115df4c6 100644 --- a/docs/api/functions/utils.eth.tolittleendian.md +++ b/docs/api/functions/utils.eth.tolittleendian.md @@ -26,4 +26,4 @@ Name | Type | Default value | Description | little-endian encoded hexstring -Defined in: [bee-js/src/utils/eth.ts:67](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/eth.ts#L67) +Defined in: [bee-js/src/utils/eth.ts:103](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/eth.ts#L103) diff --git a/docs/api/functions/utils.file.filearraybuffer.md b/docs/api/functions/utils.file.filearraybuffer.md index d70d9676..d150fdcf 100644 --- a/docs/api/functions/utils.file.filearraybuffer.md +++ b/docs/api/functions/utils.file.filearraybuffer.md @@ -23,4 +23,4 @@ Name | Type | Description | **Returns:** *Promise* -Defined in: [bee-js/src/utils/file.ts:29](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/file.ts#L29) +Defined in: [bee-js/src/utils/file.ts:29](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/file.ts#L29) diff --git a/docs/api/functions/utils.file.isfile.md b/docs/api/functions/utils.file.isfile.md index 96f42a94..8d78061b 100644 --- a/docs/api/functions/utils.file.isfile.md +++ b/docs/api/functions/utils.file.isfile.md @@ -24,4 +24,4 @@ Name | Type | **Returns:** file is File -Defined in: [bee-js/src/utils/file.ts:7](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/file.ts#L7) +Defined in: [bee-js/src/utils/file.ts:7](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/file.ts#L7) diff --git a/docs/api/functions/utils.hex.asserthexstring.md b/docs/api/functions/utils.hex.asserthexstring.md new file mode 100644 index 00000000..0ad3a275 --- /dev/null +++ b/docs/api/functions/utils.hex.asserthexstring.md @@ -0,0 +1,36 @@ +--- +id: "utils.hex.asserthexstring" +title: "Function: assertHexString" +sidebar_label: "assertHexString" +custom_edit_url: null +hide_title: true +--- + +# Function: assertHexString + +[Utils](../modules/utils.md).[Hex](../modules/utils.hex.md).assertHexString + +▸ **assertHexString**(`s`: *unknown*, `len?`: *number*): asserts s is FlavoredType + +Verifies if the provided input is a HexString. + +TODO: Make Length mandatory: https://github.com/ethersphere/bee-js/issues/208 + +#### Type parameters: + +Name | Type | Default | +:------ | :------ | :------ | +`Length` | *number* | *number* | + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`s` | *unknown* | string input | +`len?` | *number* | expected length of the HexString | + +**Returns:** asserts s is FlavoredType + +HexString or throws error + +Defined in: [bee-js/src/utils/hex.ts:157](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/hex.ts#L157) diff --git a/docs/api/functions/utils.hex.assertprefixedhexstring.md b/docs/api/functions/utils.hex.assertprefixedhexstring.md new file mode 100644 index 00000000..4dfe2839 --- /dev/null +++ b/docs/api/functions/utils.hex.assertprefixedhexstring.md @@ -0,0 +1,27 @@ +--- +id: "utils.hex.assertprefixedhexstring" +title: "Function: assertPrefixedHexString" +sidebar_label: "assertPrefixedHexString" +custom_edit_url: null +hide_title: true +--- + +# Function: assertPrefixedHexString + +[Utils](../modules/utils.md).[Hex](../modules/utils.hex.md).assertPrefixedHexString + +▸ **assertPrefixedHexString**(`s`: *string*): asserts s is BrandedType + +Verifies if the provided input is a PrefixedHexString. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`s` | *string* | string input | + +**Returns:** asserts s is BrandedType + +HexString or throws error + +Defined in: [bee-js/src/utils/hex.ts:179](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/hex.ts#L179) diff --git a/docs/api/functions/utils.hex.bytestohex.md b/docs/api/functions/utils.hex.bytestohex.md index bfca2ca6..761c9c3a 100644 --- a/docs/api/functions/utils.hex.bytestohex.md +++ b/docs/api/functions/utils.hex.bytestohex.md @@ -10,19 +10,23 @@ hide_title: true [Utils](../modules/utils.md).[Hex](../modules/utils.hex.md).bytesToHex -▸ **bytesToHex**(`bytes`: Uint8Array, `withPrefix?`: *boolean*): [*HexString*](../types/utils.hex.hexstring.md) +▸ **bytesToHex**(`bytes`: Uint8Array, `len?`: Length): [*HexString*](../types/utils.hex.hexstring.md) -Converts array of number or Uint8Array to hex string. +Converts array of number or Uint8Array to HexString without prefix. -Optionally provides '0x' prefix. +#### Type parameters: + +Name | Type | Default | +:------ | :------ | :------ | +`Length` | *number* | *number* | #### Parameters: -Name | Type | Default value | Description | -:------ | :------ | :------ | :------ | -`bytes` | Uint8Array | - | The input array | -`withPrefix` | *boolean* | false | Provides '0x' prefix when true (default: false) | +Name | Type | Description | +:------ | :------ | :------ | +`bytes` | Uint8Array | The input array | +`len?` | Length | The length of the non prefixed HexString | -**Returns:** [*HexString*](../types/utils.hex.hexstring.md) +**Returns:** [*HexString*](../types/utils.hex.hexstring.md) -Defined in: [bee-js/src/utils/hex.ts:41](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/hex.ts#L41) +Defined in: [bee-js/src/utils/hex.ts:89](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/hex.ts#L89) diff --git a/docs/api/functions/utils.hex.hextobytes.md b/docs/api/functions/utils.hex.hextobytes.md index 4f308428..3a9bd19e 100644 --- a/docs/api/functions/utils.hex.hextobytes.md +++ b/docs/api/functions/utils.hex.hextobytes.md @@ -10,16 +10,23 @@ hide_title: true [Utils](../modules/utils.md).[Hex](../modules/utils.hex.md).hexToBytes -▸ **hexToBytes**(`hex`: [*HexString*](../types/utils.hex.hexstring.md)): Uint8Array +▸ **hexToBytes**(`hex`: [*HexString*](../types/utils.hex.hexstring.md)): [*Bytes*](../interfaces/utils.bytes.bytes.md) Converts a hex string to Uint8Array +#### Type parameters: + +Name | Type | Default | +:------ | :------ | :------ | +`Length` | *number* | - | +`LengthHex` | *number* | *number* | + #### Parameters: Name | Type | Description | :------ | :------ | :------ | -`hex` | [*HexString*](../types/utils.hex.hexstring.md) | string input | +`hex` | [*HexString*](../types/utils.hex.hexstring.md) | string input without 0x prefix! | -**Returns:** Uint8Array +**Returns:** [*Bytes*](../interfaces/utils.bytes.bytes.md) -Defined in: [bee-js/src/utils/hex.ts:22](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/hex.ts#L22) +Defined in: [bee-js/src/utils/hex.ts:69](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/hex.ts#L69) diff --git a/docs/api/functions/utils.hex.inttohex.md b/docs/api/functions/utils.hex.inttohex.md index 4df50ee7..a943a396 100644 --- a/docs/api/functions/utils.hex.inttohex.md +++ b/docs/api/functions/utils.hex.inttohex.md @@ -10,19 +10,25 @@ hide_title: true [Utils](../modules/utils.md).[Hex](../modules/utils.hex.md).intToHex -▸ **intToHex**(`int`: *number*, `withPrefix?`: *boolean*): [*HexString*](../types/utils.hex.hexstring.md) +▸ **intToHex**(`int`: *number*, `len?`: Length): [*HexString*](../types/utils.hex.hexstring.md) -Converst integer number to hex string. +Converts integer number to hex string. Optionally provides '0x' prefix or padding +#### Type parameters: + +Name | Type | Default | +:------ | :------ | :------ | +`Length` | *number* | *number* | + #### Parameters: -Name | Type | Default value | Description | -:------ | :------ | :------ | :------ | -`int` | *number* | - | The positive integer to be converted | -`withPrefix` | *boolean* | false | Provides '0x' prefix when true (default: false) | +Name | Type | Description | +:------ | :------ | :------ | +`int` | *number* | The positive integer to be converted | +`len?` | Length | The length of the non prefixed HexString | -**Returns:** [*HexString*](../types/utils.hex.hexstring.md) +**Returns:** [*HexString*](../types/utils.hex.hexstring.md) -Defined in: [bee-js/src/utils/hex.ts:57](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/hex.ts#L57) +Defined in: [bee-js/src/utils/hex.ts:109](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/hex.ts#L109) diff --git a/docs/api/functions/utils.hex.ishexstring.md b/docs/api/functions/utils.hex.ishexstring.md index 81fac8fd..b5115081 100644 --- a/docs/api/functions/utils.hex.ishexstring.md +++ b/docs/api/functions/utils.hex.ishexstring.md @@ -10,16 +10,26 @@ hide_title: true [Utils](../modules/utils.md).[Hex](../modules/utils.hex.md).isHexString -▸ **isHexString**(`s`: *string*): s is BrandedType +▸ **isHexString**(`s`: *unknown*, `len?`: *number*): s is FlavoredType -Type guard for HexStrings +Type guard for HexStrings. +Requires no 0x prefix! + +TODO: Make Length mandatory: https://github.com/ethersphere/bee-js/issues/208 + +#### Type parameters: + +Name | Type | Default | +:------ | :------ | :------ | +`Length` | *number* | *number* | #### Parameters: Name | Type | Description | :------ | :------ | :------ | -`s` | *string* | string input | +`s` | *unknown* | string input | +`len?` | *number* | expected length of the HexString | -**Returns:** s is BrandedType +**Returns:** s is FlavoredType -Defined in: [bee-js/src/utils/hex.ts:74](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/hex.ts#L74) +Defined in: [bee-js/src/utils/hex.ts:134](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/hex.ts#L134) diff --git a/docs/api/functions/utils.hex.isprefixedhexstring.md b/docs/api/functions/utils.hex.isprefixedhexstring.md new file mode 100644 index 00000000..18bde90a --- /dev/null +++ b/docs/api/functions/utils.hex.isprefixedhexstring.md @@ -0,0 +1,26 @@ +--- +id: "utils.hex.isprefixedhexstring" +title: "Function: isPrefixedHexString" +sidebar_label: "isPrefixedHexString" +custom_edit_url: null +hide_title: true +--- + +# Function: isPrefixedHexString + +[Utils](../modules/utils.md).[Hex](../modules/utils.hex.md).isPrefixedHexString + +▸ **isPrefixedHexString**(`s`: *unknown*): s is BrandedType + +Type guard for PrefixedHexStrings. +Does enforce presence of 0x prefix! + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`s` | *unknown* | string input | + +**Returns:** s is BrandedType + +Defined in: [bee-js/src/utils/hex.ts:144](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/hex.ts#L144) diff --git a/docs/api/functions/utils.hex.makehexstring.md b/docs/api/functions/utils.hex.makehexstring.md new file mode 100644 index 00000000..54851601 --- /dev/null +++ b/docs/api/functions/utils.hex.makehexstring.md @@ -0,0 +1,34 @@ +--- +id: "utils.hex.makehexstring" +title: "Function: makeHexString" +sidebar_label: "makeHexString" +custom_edit_url: null +hide_title: true +--- + +# Function: makeHexString + +[Utils](../modules/utils.md).[Hex](../modules/utils.hex.md).makeHexString + +▸ **makeHexString**(`input`: *string* \| *number* \| Uint8Array, `len?`: L): [*HexString*](../types/utils.hex.hexstring.md) + +Creates unprefixed hex string from wide range of data. + +TODO: Make Length mandatory: https://github.com/ethersphere/bee-js/issues/208 + +#### Type parameters: + +Name | Type | +:------ | :------ | +`L` | *number* | + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`input` | *string* \| *number* \| Uint8Array | | +`len?` | L | of the resulting HexString WITHOUT prefix! | + +**Returns:** [*HexString*](../types/utils.hex.hexstring.md) + +Defined in: [bee-js/src/utils/hex.ts:33](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/hex.ts#L33) diff --git a/docs/api/functions/utils.hex.striphexprefix.md b/docs/api/functions/utils.hex.striphexprefix.md deleted file mode 100644 index 133b61c9..00000000 --- a/docs/api/functions/utils.hex.striphexprefix.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -id: "utils.hex.striphexprefix" -title: "Function: stripHexPrefix" -sidebar_label: "stripHexPrefix" -custom_edit_url: null -hide_title: true ---- - -# Function: stripHexPrefix - -[Utils](../modules/utils.md).[Hex](../modules/utils.hex.md).stripHexPrefix - -▸ **stripHexPrefix**(`hex`: T): T - -Strips the '0x' hex prefix from a string - -#### Type parameters: - -Name | Type | -:------ | :------ | -`T` | *string* | - -#### Parameters: - -Name | Type | Description | -:------ | :------ | :------ | -`hex` | T | string input | - -**Returns:** T - -Defined in: [bee-js/src/utils/hex.ts:13](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/hex.ts#L13) diff --git a/docs/api/functions/utils.hex.verifyhex.md b/docs/api/functions/utils.hex.verifyhex.md deleted file mode 100644 index 6c06dace..00000000 --- a/docs/api/functions/utils.hex.verifyhex.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -id: "utils.hex.verifyhex" -title: "Function: verifyHex" -sidebar_label: "verifyHex" -custom_edit_url: null -hide_title: true ---- - -# Function: verifyHex - -[Utils](../modules/utils.md).[Hex](../modules/utils.hex.md).verifyHex - -▸ **verifyHex**(`s`: *string*): [*HexString*](../types/utils.hex.hexstring.md) \| *never* - -Verifies if the provided input is a HexString. - -#### Parameters: - -Name | Type | Description | -:------ | :------ | :------ | -`s` | *string* | string input | - -**Returns:** [*HexString*](../types/utils.hex.hexstring.md) \| *never* - -HexString or throws error - -Defined in: [bee-js/src/utils/hex.ts:85](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/hex.ts#L85) diff --git a/docs/api/functions/utils.tar.maketar.md b/docs/api/functions/utils.tar.maketar.md index 0b87a032..03de505e 100644 --- a/docs/api/functions/utils.tar.maketar.md +++ b/docs/api/functions/utils.tar.maketar.md @@ -20,4 +20,4 @@ Name | Type | **Returns:** Uint8Array -Defined in: [bee-js/src/utils/tar.ts:22](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/tar.ts#L22) +Defined in: [bee-js/src/utils/tar.ts:22](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/tar.ts#L22) diff --git a/docs/api/index.md b/docs/api/index.md index aeb0b772..ab18251a 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -28,7 +28,9 @@ hide_title: true - [AllSettlements](interfaces/allsettlements.md) - [BalanceResponse](interfaces/balanceresponse.md) +- [BeeOptions](interfaces/beeoptions.md) - [BeeResponse](interfaces/beeresponse.md) +- [Bin](interfaces/bin.md) - [CashoutResponse](interfaces/cashoutresponse.md) - [CashoutResult](interfaces/cashoutresult.md) - [Cheque](interfaces/cheque.md) @@ -36,23 +38,32 @@ hide_title: true - [ChequebookBalanceResponse](interfaces/chequebookbalanceresponse.md) - [CollectionEntry](interfaces/collectionentry.md) - [CollectionUploadOptions](interfaces/collectionuploadoptions.md) +- [Data](interfaces/data.md) - [DepositTokensResponse](interfaces/deposittokensresponse.md) - [Dictionary](interfaces/dictionary.md) - [DownloadOptions](interfaces/downloadoptions.md) +- [FeedReader](interfaces/feedreader.md) +- [FeedWriter](interfaces/feedwriter.md) - [FileData](interfaces/filedata.md) - [FileHeaders](interfaces/fileheaders.md) - [FileUploadOptions](interfaces/fileuploadoptions.md) +- [Health](interfaces/health.md) - [LastCashoutActionResponse](interfaces/lastcashoutactionresponse.md) - [LastChequesForPeerResponse](interfaces/lastchequesforpeerresponse.md) - [LastChequesResponse](interfaces/lastchequesresponse.md) - [NodeAddresses](interfaces/nodeaddresses.md) - [Peer](interfaces/peer.md) - [PeerBalance](interfaces/peerbalance.md) +- [PingResponse](interfaces/pingresponse.md) - [PssMessageHandler](interfaces/pssmessagehandler.md) - [PssSubscription](interfaces/psssubscription.md) - [ReferenceResponse](interfaces/referenceresponse.md) +- [RemovePeerResponse](interfaces/removepeerresponse.md) +- [SOCReader](interfaces/socreader.md) +- [SOCWriter](interfaces/socwriter.md) - [Settlements](interfaces/settlements.md) - [Tag](interfaces/tag.md) +- [Topology](interfaces/topology.md) - [UploadHeaders](interfaces/uploadheaders.md) - [UploadOptions](interfaces/uploadoptions.md) - [WithdrawTokensResponse](interfaces/withdrawtokensresponse.md) @@ -65,10 +76,23 @@ hide_title: true - [BrandedType](types/brandedtype.md) - [Collection](types/collection.md) - [FlavoredType](types/flavoredtype.md) +- [PrivateKeyBytes](types/privatekeybytes.md) - [PublicKey](types/publickey.md) +- [PublicKeyBytes](types/publickeybytes.md) - [Reference](types/reference.md) +- [Signature](types/signature.md) +- [Signer](types/signer.md) +- [Topic](types/topic.md) ### Variables -- [ENCRYPTED\_HEX\_REFERENCE\_LENGTH](variables/encrypted_hex_reference_length.md) -- [HEX\_REFERENCE\_LENGTH](variables/hex_reference_length.md) +- [ENCRYPTED\_REFERENCE\_BYTES\_LENGTH](variables/encrypted_reference_bytes_length.md) +- [ENCRYPTED\_REFERENCE\_HEX\_LENGTH](variables/encrypted_reference_hex_length.md) +- [REFERENCE\_BYTES\_LENGTH](variables/reference_bytes_length.md) +- [REFERENCE\_HEX\_LENGTH](variables/reference_hex_length.md) +- [SIGNATURE\_BYTES\_LENGTH](variables/signature_bytes_length.md) +- [SIGNATURE\_HEX\_LENGTH](variables/signature_hex_length.md) +- [SUPPORTED\_BEE\_VERSION](variables/supported_bee_version.md) +- [SUPPORTED\_BEE\_VERSION\_EXACT](variables/supported_bee_version_exact.md) +- [TOPIC\_BYTES\_LENGTH](variables/topic_bytes_length.md) +- [TOPIC\_HEX\_LENGTH](variables/topic_hex_length.md) diff --git a/docs/api/interfaces/allsettlements.md b/docs/api/interfaces/allsettlements.md index 0c1e4836..6a5b55a0 100644 --- a/docs/api/interfaces/allsettlements.md +++ b/docs/api/interfaces/allsettlements.md @@ -14,7 +14,7 @@ hide_title: true • **settlements**: [*Settlements*](settlements.md)[] -Defined in: [bee-js/src/types/debug.ts:10](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L10) +Defined in: [bee-js/src/types/debug.ts:10](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L10) ___ @@ -22,7 +22,7 @@ ___ • **totalreceived**: *number* -Defined in: [bee-js/src/types/debug.ts:8](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L8) +Defined in: [bee-js/src/types/debug.ts:8](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L8) ___ @@ -30,4 +30,4 @@ ___ • **totalsent**: *number* -Defined in: [bee-js/src/types/debug.ts:9](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L9) +Defined in: [bee-js/src/types/debug.ts:9](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L9) diff --git a/docs/api/interfaces/balanceresponse.md b/docs/api/interfaces/balanceresponse.md index df9d32f6..f5af6ab2 100644 --- a/docs/api/interfaces/balanceresponse.md +++ b/docs/api/interfaces/balanceresponse.md @@ -14,4 +14,4 @@ hide_title: true • **balances**: [*PeerBalance*](peerbalance.md)[] -Defined in: [bee-js/src/types/debug.ts:83](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L83) +Defined in: [bee-js/src/types/debug.ts:83](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L83) diff --git a/docs/api/interfaces/beeoptions.md b/docs/api/interfaces/beeoptions.md new file mode 100644 index 00000000..249af241 --- /dev/null +++ b/docs/api/interfaces/beeoptions.md @@ -0,0 +1,17 @@ +--- +id: "beeoptions" +title: "Interface: BeeOptions" +sidebar_label: "BeeOptions" +custom_edit_url: null +hide_title: true +--- + +# Interface: BeeOptions + +## Properties + +### signer + +• `Optional` **signer**: *undefined* \| *string* \| *Uint8Array* \| [*Signer*](../types/signer.md) + +Defined in: [bee-js/src/types/index.ts:28](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L28) diff --git a/docs/api/interfaces/beeresponse.md b/docs/api/interfaces/beeresponse.md index 0ec9814c..92bb4bd0 100644 --- a/docs/api/interfaces/beeresponse.md +++ b/docs/api/interfaces/beeresponse.md @@ -14,7 +14,7 @@ hide_title: true • **code**: *number* -Defined in: [bee-js/src/types/index.ts:93](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L93) +Defined in: [bee-js/src/types/index.ts:119](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L119) ___ @@ -22,4 +22,4 @@ ___ • **message**: *string* -Defined in: [bee-js/src/types/index.ts:92](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L92) +Defined in: [bee-js/src/types/index.ts:118](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L118) diff --git a/docs/api/interfaces/bin.md b/docs/api/interfaces/bin.md new file mode 100644 index 00000000..9717c73c --- /dev/null +++ b/docs/api/interfaces/bin.md @@ -0,0 +1,41 @@ +--- +id: "bin" +title: "Interface: Bin" +sidebar_label: "Bin" +custom_edit_url: null +hide_title: true +--- + +# Interface: Bin + +## Properties + +### connected + +• **connected**: *number* + +Defined in: [bee-js/src/types/debug.ts:98](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L98) + +___ + +### connectedPeers + +• **connectedPeers**: *null* \| [*Peer*](peer.md)[] + +Defined in: [bee-js/src/types/debug.ts:100](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L100) + +___ + +### disconnectedPeers + +• **disconnectedPeers**: *null* \| [*Peer*](peer.md)[] + +Defined in: [bee-js/src/types/debug.ts:99](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L99) + +___ + +### population + +• **population**: *number* + +Defined in: [bee-js/src/types/debug.ts:97](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L97) diff --git a/docs/api/interfaces/cashoutresponse.md b/docs/api/interfaces/cashoutresponse.md index b0175a7f..46f08a82 100644 --- a/docs/api/interfaces/cashoutresponse.md +++ b/docs/api/interfaces/cashoutresponse.md @@ -14,4 +14,4 @@ hide_title: true • **transactionHash**: *string* -Defined in: [bee-js/src/types/debug.ts:51](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L51) +Defined in: [bee-js/src/types/debug.ts:51](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L51) diff --git a/docs/api/interfaces/cashoutresult.md b/docs/api/interfaces/cashoutresult.md index f8d3b0a6..6431a428 100644 --- a/docs/api/interfaces/cashoutresult.md +++ b/docs/api/interfaces/cashoutresult.md @@ -14,7 +14,7 @@ hide_title: true • **bounced**: *boolean* -Defined in: [bee-js/src/types/debug.ts:38](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L38) +Defined in: [bee-js/src/types/debug.ts:38](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L38) ___ @@ -22,7 +22,7 @@ ___ • **lastPayout**: *number* -Defined in: [bee-js/src/types/debug.ts:37](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L37) +Defined in: [bee-js/src/types/debug.ts:37](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L37) ___ @@ -30,4 +30,4 @@ ___ • **recipient**: *string* -Defined in: [bee-js/src/types/debug.ts:36](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L36) +Defined in: [bee-js/src/types/debug.ts:36](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L36) diff --git a/docs/api/interfaces/cheque.md b/docs/api/interfaces/cheque.md index a396d9c8..02036f2a 100644 --- a/docs/api/interfaces/cheque.md +++ b/docs/api/interfaces/cheque.md @@ -14,7 +14,7 @@ hide_title: true • **beneficiary**: *string* -Defined in: [bee-js/src/types/debug.ts:55](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L55) +Defined in: [bee-js/src/types/debug.ts:55](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L55) ___ @@ -22,7 +22,7 @@ ___ • **chequebook**: *string* -Defined in: [bee-js/src/types/debug.ts:56](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L56) +Defined in: [bee-js/src/types/debug.ts:56](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L56) ___ @@ -30,4 +30,4 @@ ___ • **payout**: *number* -Defined in: [bee-js/src/types/debug.ts:57](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L57) +Defined in: [bee-js/src/types/debug.ts:57](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L57) diff --git a/docs/api/interfaces/chequebookaddressresponse.md b/docs/api/interfaces/chequebookaddressresponse.md index 82805fe4..17262dff 100644 --- a/docs/api/interfaces/chequebookaddressresponse.md +++ b/docs/api/interfaces/chequebookaddressresponse.md @@ -14,4 +14,4 @@ hide_title: true • **chequebookaddress**: *string* -Defined in: [bee-js/src/types/debug.ts:27](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L27) +Defined in: [bee-js/src/types/debug.ts:27](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L27) diff --git a/docs/api/interfaces/chequebookbalanceresponse.md b/docs/api/interfaces/chequebookbalanceresponse.md index 68196dd0..7f9ab477 100644 --- a/docs/api/interfaces/chequebookbalanceresponse.md +++ b/docs/api/interfaces/chequebookbalanceresponse.md @@ -14,7 +14,7 @@ hide_title: true • **availableBalance**: *number* -Defined in: [bee-js/src/types/debug.ts:32](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L32) +Defined in: [bee-js/src/types/debug.ts:32](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L32) ___ @@ -22,4 +22,4 @@ ___ • **totalBalance**: *number* -Defined in: [bee-js/src/types/debug.ts:31](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L31) +Defined in: [bee-js/src/types/debug.ts:31](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L31) diff --git a/docs/api/interfaces/collectionentry.md b/docs/api/interfaces/collectionentry.md index d15a9e68..e847a7bc 100644 --- a/docs/api/interfaces/collectionentry.md +++ b/docs/api/interfaces/collectionentry.md @@ -22,7 +22,7 @@ Name | • **data**: T -Defined in: [bee-js/src/types/index.ts:68](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L68) +Defined in: [bee-js/src/types/index.ts:94](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L94) ___ @@ -30,4 +30,4 @@ ___ • **path**: *string* -Defined in: [bee-js/src/types/index.ts:73](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L73) +Defined in: [bee-js/src/types/index.ts:99](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L99) diff --git a/docs/api/interfaces/collectionuploadoptions.md b/docs/api/interfaces/collectionuploadoptions.md index a9776f22..1b65228e 100644 --- a/docs/api/interfaces/collectionuploadoptions.md +++ b/docs/api/interfaces/collectionuploadoptions.md @@ -24,7 +24,7 @@ alter default options of axios HTTP client Inherited from: [UploadOptions](uploadoptions.md).[axiosOptions](uploadoptions.md#axiosoptions) -Defined in: [bee-js/src/types/index.ts:23](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L23) +Defined in: [bee-js/src/types/index.ts:36](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L36) ___ @@ -34,7 +34,7 @@ ___ Inherited from: [UploadOptions](uploadoptions.md).[encrypt](uploadoptions.md#encrypt) -Defined in: [bee-js/src/types/index.ts:20](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L20) +Defined in: [bee-js/src/types/index.ts:33](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L33) ___ @@ -42,7 +42,7 @@ ___ • `Optional` **errorDocument**: *undefined* \| *string* -Defined in: [bee-js/src/types/index.ts:33](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L33) +Defined in: [bee-js/src/types/index.ts:46](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L46) ___ @@ -50,7 +50,7 @@ ___ • `Optional` **indexDocument**: *undefined* \| *string* -Defined in: [bee-js/src/types/index.ts:32](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L32) +Defined in: [bee-js/src/types/index.ts:45](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L45) ___ @@ -60,7 +60,7 @@ ___ Inherited from: [UploadOptions](uploadoptions.md).[pin](uploadoptions.md#pin) -Defined in: [bee-js/src/types/index.ts:19](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L19) +Defined in: [bee-js/src/types/index.ts:32](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L32) ___ @@ -70,4 +70,4 @@ ___ Inherited from: [UploadOptions](uploadoptions.md).[tag](uploadoptions.md#tag) -Defined in: [bee-js/src/types/index.ts:21](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L21) +Defined in: [bee-js/src/types/index.ts:34](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L34) diff --git a/docs/api/interfaces/data.md b/docs/api/interfaces/data.md new file mode 100644 index 00000000..f35a2c88 --- /dev/null +++ b/docs/api/interfaces/data.md @@ -0,0 +1,643 @@ +--- +id: "data" +title: "Interface: Data" +sidebar_label: "Data" +custom_edit_url: null +hide_title: true +--- + +# Interface: Data + +Helper interface that adds utility functions +to work more conveniently with bytes in normal +user scenarios. + +Concretely: text(), hex(), json() + +## Hierarchy + +* *Uint8Array* + + ↳ **Data** + +## Properties + +### BYTES\_PER\_ELEMENT + +• `Readonly` **BYTES\_PER\_ELEMENT**: *number* + +The size in bytes of each element in the array. + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2030 + +___ + +### [Symbol.toStringTag] + +• `Readonly` **[Symbol.toStringTag]**: *Uint8Array* + +Defined in: node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:282 + +___ + +### buffer + +• `Readonly` **buffer**: ArrayBufferLike + +The ArrayBuffer instance referenced by the array. + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2035 + +___ + +### byteLength + +• `Readonly` **byteLength**: *number* + +The length in bytes of the array. + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2040 + +___ + +### byteOffset + +• `Readonly` **byteOffset**: *number* + +The offset in bytes of the array. + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2045 + +___ + +### length + +• `Readonly` **length**: *number* + +The length of the array. + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2144 + +## Methods + +### [Symbol.iterator] + +▸ **[Symbol.iterator]**(): *IterableIterator* + +**Returns:** *IterableIterator* + +Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:279 + +___ + +### copyWithin + +▸ **copyWithin**(`target`: *number*, `start`: *number*, `end?`: *number*): [*Data*](data.md) + +Returns the this object after copying a section of the array identified by start and end +to the same array starting at position target + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`target` | *number* | If target is negative, it is treated as length+target where length is the length of the array. | +`start` | *number* | If start is negative, it is treated as length+start. If end is negative, it is treated as length+end. | +`end?` | *number* | If not specified, length of the this object is used as its default value. | + +**Returns:** [*Data*](data.md) + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2056 + +___ + +### entries + +▸ **entries**(): *IterableIterator*<[*number*, *number*]\> + +Returns an array of key, value pairs for every entry in the array + +**Returns:** *IterableIterator*<[*number*, *number*]\> + +Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:283 + +___ + +### every + +▸ **every**(`predicate`: (`value`: *number*, `index`: *number*, `array`: *Uint8Array*) =\> *unknown*, `thisArg?`: *any*): *boolean* + +Determines whether all the members of an array satisfy the specified test. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`predicate` | (`value`: *number*, `index`: *number*, `array`: *Uint8Array*) =\> *unknown* | A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array. | +`thisArg?` | *any* | An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. | + +**Returns:** *boolean* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2066 + +___ + +### fill + +▸ **fill**(`value`: *number*, `start?`: *number*, `end?`: *number*): [*Data*](data.md) + +Returns the this object after filling the section identified by start and end with value + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`value` | *number* | value to fill array section with | +`start?` | *number* | index to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array. | +`end?` | *number* | index to stop filling the array at. If end is negative, it is treated as length+end. | + +**Returns:** [*Data*](data.md) + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2076 + +___ + +### filter + +▸ **filter**(`predicate`: (`value`: *number*, `index`: *number*, `array`: *Uint8Array*) =\> *any*, `thisArg?`: *any*): *Uint8Array* + +Returns the elements of an array that meet the condition specified in a callback function. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`predicate` | (`value`: *number*, `index`: *number*, `array`: *Uint8Array*) =\> *any* | A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. | +`thisArg?` | *any* | An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. | + +**Returns:** *Uint8Array* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2085 + +___ + +### find + +▸ **find**(`predicate`: (`value`: *number*, `index`: *number*, `obj`: *Uint8Array*) =\> *boolean*, `thisArg?`: *any*): *undefined* \| *number* + +Returns the value of the first element in the array where predicate is true, and undefined +otherwise. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`predicate` | (`value`: *number*, `index`: *number*, `obj`: *Uint8Array*) =\> *boolean* | find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. | +`thisArg?` | *any* | If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead. | + +**Returns:** *undefined* \| *number* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2096 + +___ + +### findIndex + +▸ **findIndex**(`predicate`: (`value`: *number*, `index`: *number*, `obj`: *Uint8Array*) =\> *boolean*, `thisArg?`: *any*): *number* + +Returns the index of the first element in the array where predicate is true, and -1 +otherwise. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`predicate` | (`value`: *number*, `index`: *number*, `obj`: *Uint8Array*) =\> *boolean* | find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1. | +`thisArg?` | *any* | If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead. | + +**Returns:** *number* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2107 + +___ + +### forEach + +▸ **forEach**(`callbackfn`: (`value`: *number*, `index`: *number*, `array`: *Uint8Array*) =\> *void*, `thisArg?`: *any*): *void* + +Performs the specified action for each element in an array. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`callbackfn` | (`value`: *number*, `index`: *number*, `array`: *Uint8Array*) =\> *void* | A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. | +`thisArg?` | *any* | An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. | + +**Returns:** *void* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2116 + +___ + +### hex + +▸ **hex**(): [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *number* }, *HexString*\> + +**Returns:** [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *number* }, *HexString*\> + +Defined in: [bee-js/src/types/index.ts:86](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L86) + +___ + +### includes + +▸ **includes**(`searchElement`: *number*, `fromIndex?`: *number*): *boolean* + +Determines whether an array includes a certain element, returning true or false as appropriate. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`searchElement` | *number* | The element to search for. | +`fromIndex?` | *number* | The position in this array at which to begin searching for searchElement. | + +**Returns:** *boolean* + +Defined in: node_modules/typescript/lib/lib.es2016.array.include.d.ts:54 + +___ + +### indexOf + +▸ **indexOf**(`searchElement`: *number*, `fromIndex?`: *number*): *number* + +Returns the index of the first occurrence of a value in an array. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`searchElement` | *number* | The value to locate in the array. | +`fromIndex?` | *number* | The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. | + +**Returns:** *number* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2124 + +___ + +### join + +▸ **join**(`separator?`: *string*): *string* + +Adds all the elements of an array separated by the specified separator string. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`separator?` | *string* | A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. | + +**Returns:** *string* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2131 + +___ + +### json + +▸ **json**(): *Record* + +**Returns:** *Record* + +Defined in: [bee-js/src/types/index.ts:87](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L87) + +___ + +### keys + +▸ **keys**(): *IterableIterator* + +Returns an list of keys in the array + +**Returns:** *IterableIterator* + +Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:287 + +___ + +### lastIndexOf + +▸ **lastIndexOf**(`searchElement`: *number*, `fromIndex?`: *number*): *number* + +Returns the index of the last occurrence of a value in an array. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`searchElement` | *number* | The value to locate in the array. | +`fromIndex?` | *number* | The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. | + +**Returns:** *number* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2139 + +___ + +### map + +▸ **map**(`callbackfn`: (`value`: *number*, `index`: *number*, `array`: *Uint8Array*) =\> *number*, `thisArg?`: *any*): *Uint8Array* + +Calls a defined callback function on each element of an array, and returns an array that +contains the results. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`callbackfn` | (`value`: *number*, `index`: *number*, `array`: *Uint8Array*) =\> *number* | A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. | +`thisArg?` | *any* | An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. | + +**Returns:** *Uint8Array* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2154 + +___ + +### reduce + +▸ **reduce**(`callbackfn`: (`previousValue`: *number*, `currentValue`: *number*, `currentIndex`: *number*, `array`: *Uint8Array*) =\> *number*): *number* + +Calls the specified callback function for all the elements in an array. The return value of +the callback function is the accumulated result, and is provided as an argument in the next +call to the callback function. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`callbackfn` | (`previousValue`: *number*, `currentValue`: *number*, `currentIndex`: *number*, `array`: *Uint8Array*) =\> *number* | A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. | + +**Returns:** *number* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2166 + +▸ **reduce**(`callbackfn`: (`previousValue`: *number*, `currentValue`: *number*, `currentIndex`: *number*, `array`: *Uint8Array*) =\> *number*, `initialValue`: *number*): *number* + +#### Parameters: + +Name | Type | +:------ | :------ | +`callbackfn` | (`previousValue`: *number*, `currentValue`: *number*, `currentIndex`: *number*, `array`: *Uint8Array*) =\> *number* | +`initialValue` | *number* | + +**Returns:** *number* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2167 + +▸ **reduce**(`callbackfn`: (`previousValue`: U, `currentValue`: *number*, `currentIndex`: *number*, `array`: *Uint8Array*) =\> U, `initialValue`: U): U + +Calls the specified callback function for all the elements in an array. The return value of +the callback function is the accumulated result, and is provided as an argument in the next +call to the callback function. + +#### Type parameters: + +Name | +:------ | +`U` | + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`callbackfn` | (`previousValue`: U, `currentValue`: *number*, `currentIndex`: *number*, `array`: *Uint8Array*) =\> U | A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. | +`initialValue` | U | If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. | + +**Returns:** U + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2179 + +___ + +### reduceRight + +▸ **reduceRight**(`callbackfn`: (`previousValue`: *number*, `currentValue`: *number*, `currentIndex`: *number*, `array`: *Uint8Array*) =\> *number*): *number* + +Calls the specified callback function for all the elements in an array, in descending order. +The return value of the callback function is the accumulated result, and is provided as an +argument in the next call to the callback function. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`callbackfn` | (`previousValue`: *number*, `currentValue`: *number*, `currentIndex`: *number*, `array`: *Uint8Array*) =\> *number* | A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. | + +**Returns:** *number* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2191 + +▸ **reduceRight**(`callbackfn`: (`previousValue`: *number*, `currentValue`: *number*, `currentIndex`: *number*, `array`: *Uint8Array*) =\> *number*, `initialValue`: *number*): *number* + +#### Parameters: + +Name | Type | +:------ | :------ | +`callbackfn` | (`previousValue`: *number*, `currentValue`: *number*, `currentIndex`: *number*, `array`: *Uint8Array*) =\> *number* | +`initialValue` | *number* | + +**Returns:** *number* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2192 + +▸ **reduceRight**(`callbackfn`: (`previousValue`: U, `currentValue`: *number*, `currentIndex`: *number*, `array`: *Uint8Array*) =\> U, `initialValue`: U): U + +Calls the specified callback function for all the elements in an array, in descending order. +The return value of the callback function is the accumulated result, and is provided as an +argument in the next call to the callback function. + +#### Type parameters: + +Name | +:------ | +`U` | + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`callbackfn` | (`previousValue`: U, `currentValue`: *number*, `currentIndex`: *number*, `array`: *Uint8Array*) =\> U | A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. | +`initialValue` | U | If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. | + +**Returns:** U + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2204 + +___ + +### reverse + +▸ **reverse**(): *Uint8Array* + +Reverses the elements in an Array. + +**Returns:** *Uint8Array* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2209 + +___ + +### set + +▸ **set**(`array`: *ArrayLike*, `offset?`: *number*): *void* + +Sets a value or an array of values. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`array` | *ArrayLike* | A typed or untyped array of values to set. | +`offset?` | *number* | The index in the current array at which the values are to be written. | + +**Returns:** *void* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2216 + +___ + +### slice + +▸ **slice**(`start?`: *number*, `end?`: *number*): *Uint8Array* + +Returns a section of an array. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`start?` | *number* | The beginning of the specified portion of the array. | +`end?` | *number* | The end of the specified portion of the array. This is exclusive of the element at the index 'end'. | + +**Returns:** *Uint8Array* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2223 + +___ + +### some + +▸ **some**(`predicate`: (`value`: *number*, `index`: *number*, `array`: *Uint8Array*) =\> *unknown*, `thisArg?`: *any*): *boolean* + +Determines whether the specified callback function returns true for any element of an array. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`predicate` | (`value`: *number*, `index`: *number*, `array`: *Uint8Array*) =\> *unknown* | A function that accepts up to three arguments. The some method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. | +`thisArg?` | *any* | An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. | + +**Returns:** *boolean* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2233 + +___ + +### sort + +▸ **sort**(`compareFn?`: (`a`: *number*, `b`: *number*) =\> *number*): [*Data*](data.md) + +Sorts an array. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`compareFn?` | (`a`: *number*, `b`: *number*) =\> *number* | Function used to determine the order of the elements. It is expected to return a negative value if first argument is less than second argument, zero if they're equal and a positive value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. ```ts [11,2,22,1].sort((a, b) =\> a - b) ``` | + +**Returns:** [*Data*](data.md) + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2244 + +___ + +### subarray + +▸ **subarray**(`begin?`: *number*, `end?`: *number*): *Uint8Array* + +Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements +at begin, inclusive, up to end, exclusive. + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`begin?` | *number* | The index of the beginning of the array. | +`end?` | *number* | The index of the end of the array. | + +**Returns:** *Uint8Array* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2252 + +___ + +### text + +▸ **text**(): *string* + +**Returns:** *string* + +Defined in: [bee-js/src/types/index.ts:85](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L85) + +___ + +### toLocaleString + +▸ **toLocaleString**(): *string* + +Converts a number to a string by using the current locale. + +**Returns:** *string* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2257 + +___ + +### toString + +▸ **toString**(): *string* + +Returns a string representation of an array. + +**Returns:** *string* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2262 + +___ + +### valueOf + +▸ **valueOf**(): *Uint8Array* + +Returns the primitive value of the specified object. + +**Returns:** *Uint8Array* + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:2265 + +___ + +### values + +▸ **values**(): *IterableIterator* + +Returns an list of values in the array + +**Returns:** *IterableIterator* + +Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:291 diff --git a/docs/api/interfaces/deposittokensresponse.md b/docs/api/interfaces/deposittokensresponse.md index bb81c2e2..7120149d 100644 --- a/docs/api/interfaces/deposittokensresponse.md +++ b/docs/api/interfaces/deposittokensresponse.md @@ -14,4 +14,4 @@ hide_title: true • **transactionHash**: *string* -Defined in: [bee-js/src/types/debug.ts:70](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L70) +Defined in: [bee-js/src/types/debug.ts:70](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L70) diff --git a/docs/api/interfaces/downloadoptions.md b/docs/api/interfaces/downloadoptions.md index 0b1e0c1a..361dab1a 100644 --- a/docs/api/interfaces/downloadoptions.md +++ b/docs/api/interfaces/downloadoptions.md @@ -14,4 +14,4 @@ hide_title: true • `Optional` **timeout**: *undefined* \| *number* -Defined in: [bee-js/src/types/index.ts:37](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L37) +Defined in: [bee-js/src/types/index.ts:50](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L50) diff --git a/docs/api/interfaces/feedreader.md b/docs/api/interfaces/feedreader.md new file mode 100644 index 00000000..a9ac8785 --- /dev/null +++ b/docs/api/interfaces/feedreader.md @@ -0,0 +1,59 @@ +--- +id: "feedreader" +title: "Interface: FeedReader" +sidebar_label: "FeedReader" +custom_edit_url: null +hide_title: true +--- + +# Interface: FeedReader + +FeedReader is an interface for downloading feed updates + +## Hierarchy + +* **FeedReader** + + ↳ [*FeedWriter*](feedwriter.md) + +## Properties + +### owner + +• `Readonly` **owner**: [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *40* }, *HexString*\> + +Defined in: [bee-js/src/types/index.ts:143](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L143) + +___ + +### topic + +• `Readonly` **topic**: [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> + +Defined in: [bee-js/src/types/index.ts:144](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L144) + +___ + +### type + +• `Readonly` **type**: *sequence* \| *epoch* + +Defined in: [bee-js/src/types/index.ts:142](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L142) + +## Methods + +### download + +▸ **download**(`options?`: FeedUpdateOptions): *Promise* + +Download the latest feed update + +#### Parameters: + +Name | Type | +:------ | :------ | +`options?` | FeedUpdateOptions | + +**Returns:** *Promise* + +Defined in: [bee-js/src/types/index.ts:148](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L148) diff --git a/docs/api/interfaces/feedwriter.md b/docs/api/interfaces/feedwriter.md new file mode 100644 index 00000000..8cc8300f --- /dev/null +++ b/docs/api/interfaces/feedwriter.md @@ -0,0 +1,88 @@ +--- +id: "feedwriter" +title: "Interface: FeedWriter" +sidebar_label: "FeedWriter" +custom_edit_url: null +hide_title: true +--- + +# Interface: FeedWriter + +FeedWriter is an interface for updating feeds + +## Hierarchy + +* [*FeedReader*](feedreader.md) + + ↳ **FeedWriter** + +## Properties + +### owner + +• `Readonly` **owner**: [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *40* }, *HexString*\> + +Inherited from: [FeedReader](feedreader.md).[owner](feedreader.md#owner) + +Defined in: [bee-js/src/types/index.ts:143](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L143) + +___ + +### topic + +• `Readonly` **topic**: [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> + +Inherited from: [FeedReader](feedreader.md).[topic](feedreader.md#topic) + +Defined in: [bee-js/src/types/index.ts:144](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L144) + +___ + +### type + +• `Readonly` **type**: *sequence* \| *epoch* + +Inherited from: [FeedReader](feedreader.md).[type](feedreader.md#type) + +Defined in: [bee-js/src/types/index.ts:142](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L142) + +## Methods + +### download + +▸ **download**(`options?`: FeedUpdateOptions): *Promise* + +Download the latest feed update + +#### Parameters: + +Name | Type | +:------ | :------ | +`options?` | FeedUpdateOptions | + +**Returns:** *Promise* + +Inherited from: [FeedReader](feedreader.md) + +Defined in: [bee-js/src/types/index.ts:148](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L148) + +___ + +### upload + +▸ **upload**(`reference`: [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> \| PlainChunkReference \| EncryptedChunkReference, `options?`: FeedUploadOptions): *Promise*<[*ReferenceResponse*](referenceresponse.md)\> + +Upload a new feed update + +#### Parameters: + +Name | Type | Description | +:------ | :------ | :------ | +`reference` | [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *64* }, *HexString*\> \| [*FlavoredType*](../types/flavoredtype.md)<*string* & { `length`: *128* }, *HexString*\> \| PlainChunkReference \| EncryptedChunkReference | The reference to be stored in the new update | +`options?` | FeedUploadOptions | Additional options like `at` | + +**Returns:** *Promise*<[*ReferenceResponse*](referenceresponse.md)\> + +The reference of the new update + +Defined in: [bee-js/src/types/index.ts:163](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L163) diff --git a/docs/api/interfaces/filedata.md b/docs/api/interfaces/filedata.md index 37b660e7..fbc2918d 100644 --- a/docs/api/interfaces/filedata.md +++ b/docs/api/interfaces/filedata.md @@ -28,7 +28,7 @@ Name | Inherited from: [FileHeaders](fileheaders.md).[contentType](fileheaders.md#contenttype) -Defined in: [bee-js/src/types/index.ts:57](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L57) +Defined in: [bee-js/src/types/index.ts:70](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L70) ___ @@ -36,7 +36,7 @@ ___ • **data**: T -Defined in: [bee-js/src/types/index.ts:61](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L61) +Defined in: [bee-js/src/types/index.ts:74](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L74) ___ @@ -46,7 +46,7 @@ ___ Inherited from: [FileHeaders](fileheaders.md).[name](fileheaders.md#name) -Defined in: [bee-js/src/types/index.ts:55](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L55) +Defined in: [bee-js/src/types/index.ts:68](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L68) ___ @@ -56,4 +56,4 @@ ___ Inherited from: [FileHeaders](fileheaders.md).[tagUid](fileheaders.md#taguid) -Defined in: [bee-js/src/types/index.ts:56](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L56) +Defined in: [bee-js/src/types/index.ts:69](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L69) diff --git a/docs/api/interfaces/fileheaders.md b/docs/api/interfaces/fileheaders.md index a7a9567a..d7a7cc82 100644 --- a/docs/api/interfaces/fileheaders.md +++ b/docs/api/interfaces/fileheaders.md @@ -20,7 +20,7 @@ hide_title: true • `Optional` **contentType**: *undefined* \| *string* -Defined in: [bee-js/src/types/index.ts:57](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L57) +Defined in: [bee-js/src/types/index.ts:70](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L70) ___ @@ -28,7 +28,7 @@ ___ • `Optional` **name**: *undefined* \| *string* -Defined in: [bee-js/src/types/index.ts:55](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L55) +Defined in: [bee-js/src/types/index.ts:68](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L68) ___ @@ -36,4 +36,4 @@ ___ • `Optional` **tagUid**: *undefined* \| *number* -Defined in: [bee-js/src/types/index.ts:56](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L56) +Defined in: [bee-js/src/types/index.ts:69](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L69) diff --git a/docs/api/interfaces/fileuploadoptions.md b/docs/api/interfaces/fileuploadoptions.md index d4d85a3b..1bd2ce92 100644 --- a/docs/api/interfaces/fileuploadoptions.md +++ b/docs/api/interfaces/fileuploadoptions.md @@ -24,7 +24,7 @@ alter default options of axios HTTP client Inherited from: [UploadOptions](uploadoptions.md).[axiosOptions](uploadoptions.md#axiosoptions) -Defined in: [bee-js/src/types/index.ts:23](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L23) +Defined in: [bee-js/src/types/index.ts:36](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L36) ___ @@ -32,7 +32,7 @@ ___ • `Optional` **contentType**: *undefined* \| *string* -Defined in: [bee-js/src/types/index.ts:28](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L28) +Defined in: [bee-js/src/types/index.ts:41](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L41) ___ @@ -42,7 +42,7 @@ ___ Inherited from: [UploadOptions](uploadoptions.md).[encrypt](uploadoptions.md#encrypt) -Defined in: [bee-js/src/types/index.ts:20](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L20) +Defined in: [bee-js/src/types/index.ts:33](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L33) ___ @@ -52,7 +52,7 @@ ___ Inherited from: [UploadOptions](uploadoptions.md).[pin](uploadoptions.md#pin) -Defined in: [bee-js/src/types/index.ts:19](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L19) +Defined in: [bee-js/src/types/index.ts:32](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L32) ___ @@ -60,7 +60,7 @@ ___ • `Optional` **size**: *undefined* \| *number* -Defined in: [bee-js/src/types/index.ts:27](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L27) +Defined in: [bee-js/src/types/index.ts:40](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L40) ___ @@ -70,4 +70,4 @@ ___ Inherited from: [UploadOptions](uploadoptions.md).[tag](uploadoptions.md#tag) -Defined in: [bee-js/src/types/index.ts:21](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L21) +Defined in: [bee-js/src/types/index.ts:34](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L34) diff --git a/docs/api/interfaces/health.md b/docs/api/interfaces/health.md new file mode 100644 index 00000000..75279372 --- /dev/null +++ b/docs/api/interfaces/health.md @@ -0,0 +1,25 @@ +--- +id: "health" +title: "Interface: Health" +sidebar_label: "Health" +custom_edit_url: null +hide_title: true +--- + +# Interface: Health + +## Properties + +### status + +• **status**: *ok* + +Defined in: [bee-js/src/types/debug.ts:87](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L87) + +___ + +### version + +• **version**: *string* + +Defined in: [bee-js/src/types/debug.ts:88](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L88) diff --git a/docs/api/interfaces/lastcashoutactionresponse.md b/docs/api/interfaces/lastcashoutactionresponse.md index 2c040f03..1da28c58 100644 --- a/docs/api/interfaces/lastcashoutactionresponse.md +++ b/docs/api/interfaces/lastcashoutactionresponse.md @@ -14,7 +14,7 @@ hide_title: true • **beneficiary**: *string* -Defined in: [bee-js/src/types/debug.ts:45](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L45) +Defined in: [bee-js/src/types/debug.ts:45](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L45) ___ @@ -22,7 +22,7 @@ ___ • **chequebook**: *string* -Defined in: [bee-js/src/types/debug.ts:43](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L43) +Defined in: [bee-js/src/types/debug.ts:43](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L43) ___ @@ -30,7 +30,7 @@ ___ • **cumulativePayout**: *number* -Defined in: [bee-js/src/types/debug.ts:44](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L44) +Defined in: [bee-js/src/types/debug.ts:44](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L44) ___ @@ -38,7 +38,7 @@ ___ • **peer**: *string* -Defined in: [bee-js/src/types/debug.ts:42](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L42) +Defined in: [bee-js/src/types/debug.ts:42](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L42) ___ @@ -46,7 +46,7 @@ ___ • **result**: [*CashoutResult*](cashoutresult.md) -Defined in: [bee-js/src/types/debug.ts:47](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L47) +Defined in: [bee-js/src/types/debug.ts:47](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L47) ___ @@ -54,4 +54,4 @@ ___ • **transactionHash**: *string* -Defined in: [bee-js/src/types/debug.ts:46](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L46) +Defined in: [bee-js/src/types/debug.ts:46](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L46) diff --git a/docs/api/interfaces/lastchequesforpeerresponse.md b/docs/api/interfaces/lastchequesforpeerresponse.md index b7dc9323..4e4b4aa8 100644 --- a/docs/api/interfaces/lastchequesforpeerresponse.md +++ b/docs/api/interfaces/lastchequesforpeerresponse.md @@ -14,7 +14,7 @@ hide_title: true • **lastreceived**: [*Cheque*](cheque.md) -Defined in: [bee-js/src/types/debug.ts:62](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L62) +Defined in: [bee-js/src/types/debug.ts:62](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L62) ___ @@ -22,7 +22,7 @@ ___ • **lastsent**: [*Cheque*](cheque.md) -Defined in: [bee-js/src/types/debug.ts:63](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L63) +Defined in: [bee-js/src/types/debug.ts:63](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L63) ___ @@ -30,4 +30,4 @@ ___ • **peer**: *string* -Defined in: [bee-js/src/types/debug.ts:61](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L61) +Defined in: [bee-js/src/types/debug.ts:61](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L61) diff --git a/docs/api/interfaces/lastchequesresponse.md b/docs/api/interfaces/lastchequesresponse.md index 4abbe0f3..58a6e7dc 100644 --- a/docs/api/interfaces/lastchequesresponse.md +++ b/docs/api/interfaces/lastchequesresponse.md @@ -14,4 +14,4 @@ hide_title: true • **lastcheques**: [*LastChequesForPeerResponse*](lastchequesforpeerresponse.md)[] -Defined in: [bee-js/src/types/debug.ts:67](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L67) +Defined in: [bee-js/src/types/debug.ts:67](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L67) diff --git a/docs/api/interfaces/nodeaddresses.md b/docs/api/interfaces/nodeaddresses.md index b576d70b..dd8a7467 100644 --- a/docs/api/interfaces/nodeaddresses.md +++ b/docs/api/interfaces/nodeaddresses.md @@ -14,7 +14,7 @@ hide_title: true • **ethereum**: *string* -Defined in: [bee-js/src/types/debug.ts:16](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L16) +Defined in: [bee-js/src/types/debug.ts:16](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L16) ___ @@ -22,7 +22,7 @@ ___ • **overlay**: *string* -Defined in: [bee-js/src/types/debug.ts:14](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L14) +Defined in: [bee-js/src/types/debug.ts:14](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L14) ___ @@ -30,7 +30,7 @@ ___ • **pss\_public\_key**: *string* -Defined in: [bee-js/src/types/debug.ts:18](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L18) +Defined in: [bee-js/src/types/debug.ts:18](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L18) ___ @@ -38,7 +38,7 @@ ___ • **public\_key**: *string* -Defined in: [bee-js/src/types/debug.ts:17](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L17) +Defined in: [bee-js/src/types/debug.ts:17](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L17) ___ @@ -46,4 +46,4 @@ ___ • **underlay**: *string*[] -Defined in: [bee-js/src/types/debug.ts:15](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L15) +Defined in: [bee-js/src/types/debug.ts:15](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L15) diff --git a/docs/api/interfaces/peer.md b/docs/api/interfaces/peer.md index a0a978c0..55b31f75 100644 --- a/docs/api/interfaces/peer.md +++ b/docs/api/interfaces/peer.md @@ -14,4 +14,4 @@ hide_title: true • **address**: *string* -Defined in: [bee-js/src/types/debug.ts:22](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L22) +Defined in: [bee-js/src/types/debug.ts:22](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L22) diff --git a/docs/api/interfaces/peerbalance.md b/docs/api/interfaces/peerbalance.md index 0af9cab0..0eb79cac 100644 --- a/docs/api/interfaces/peerbalance.md +++ b/docs/api/interfaces/peerbalance.md @@ -14,7 +14,7 @@ hide_title: true • **balance**: *number* -Defined in: [bee-js/src/types/debug.ts:79](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L79) +Defined in: [bee-js/src/types/debug.ts:79](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L79) ___ @@ -22,4 +22,4 @@ ___ • **peer**: *string* -Defined in: [bee-js/src/types/debug.ts:78](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L78) +Defined in: [bee-js/src/types/debug.ts:78](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L78) diff --git a/docs/api/interfaces/pingresponse.md b/docs/api/interfaces/pingresponse.md new file mode 100644 index 00000000..e957f3f8 --- /dev/null +++ b/docs/api/interfaces/pingresponse.md @@ -0,0 +1,17 @@ +--- +id: "pingresponse" +title: "Interface: PingResponse" +sidebar_label: "PingResponse" +custom_edit_url: null +hide_title: true +--- + +# Interface: PingResponse + +## Properties + +### rtt + +• **rtt**: *string* + +Defined in: [bee-js/src/types/debug.ts:131](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L131) diff --git a/docs/api/interfaces/pssmessagehandler.md b/docs/api/interfaces/pssmessagehandler.md index 63b19e6d..3c880f58 100644 --- a/docs/api/interfaces/pssmessagehandler.md +++ b/docs/api/interfaces/pssmessagehandler.md @@ -27,29 +27,29 @@ Name | Type | **Returns:** *void* -Defined in: [bee-js/src/types/index.ts:88](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L88) +Defined in: [bee-js/src/types/index.ts:114](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L114) -Defined in: [bee-js/src/types/index.ts:88](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L88) +Defined in: [bee-js/src/types/index.ts:114](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L114) ___ ### onMessage -• **onMessage**: (`message`: *Uint8Array*, `subscription`: [*PssSubscription*](psssubscription.md)) =\> *void* +• **onMessage**: (`message`: [*Data*](data.md), `subscription`: [*PssSubscription*](psssubscription.md)) =\> *void* #### Type declaration: -▸ (`message`: *Uint8Array*, `subscription`: [*PssSubscription*](psssubscription.md)): *void* +▸ (`message`: [*Data*](data.md), `subscription`: [*PssSubscription*](psssubscription.md)): *void* #### Parameters: Name | Type | :------ | :------ | -`message` | *Uint8Array* | +`message` | [*Data*](data.md) | `subscription` | [*PssSubscription*](psssubscription.md) | **Returns:** *void* -Defined in: [bee-js/src/types/index.ts:87](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L87) +Defined in: [bee-js/src/types/index.ts:113](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L113) -Defined in: [bee-js/src/types/index.ts:87](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L87) +Defined in: [bee-js/src/types/index.ts:113](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L113) diff --git a/docs/api/interfaces/psssubscription.md b/docs/api/interfaces/psssubscription.md index 4ce0b879..65802c03 100644 --- a/docs/api/interfaces/psssubscription.md +++ b/docs/api/interfaces/psssubscription.md @@ -20,9 +20,9 @@ hide_title: true **Returns:** *void* -Defined in: [bee-js/src/types/index.ts:83](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L83) +Defined in: [bee-js/src/types/index.ts:109](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L109) -Defined in: [bee-js/src/types/index.ts:83](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L83) +Defined in: [bee-js/src/types/index.ts:109](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L109) ___ @@ -30,4 +30,4 @@ ___ • `Readonly` **topic**: *string* -Defined in: [bee-js/src/types/index.ts:82](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L82) +Defined in: [bee-js/src/types/index.ts:108](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L108) diff --git a/docs/api/interfaces/referenceresponse.md b/docs/api/interfaces/referenceresponse.md index 25a0c474..916b1284 100644 --- a/docs/api/interfaces/referenceresponse.md +++ b/docs/api/interfaces/referenceresponse.md @@ -12,6 +12,6 @@ hide_title: true ### reference -• **reference**: *string* +• **reference**: [*Reference*](../types/reference.md) -Defined in: [bee-js/src/types/index.ts:97](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L97) +Defined in: [bee-js/src/types/index.ts:123](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L123) diff --git a/docs/api/interfaces/removepeerresponse.md b/docs/api/interfaces/removepeerresponse.md new file mode 100644 index 00000000..0ca1bd47 --- /dev/null +++ b/docs/api/interfaces/removepeerresponse.md @@ -0,0 +1,25 @@ +--- +id: "removepeerresponse" +title: "Interface: RemovePeerResponse" +sidebar_label: "RemovePeerResponse" +custom_edit_url: null +hide_title: true +--- + +# Interface: RemovePeerResponse + +## Properties + +### code + +• **code**: *0* + +Defined in: [bee-js/src/types/debug.ts:93](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L93) + +___ + +### message + +• **message**: *string* + +Defined in: [bee-js/src/types/debug.ts:92](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L92) diff --git a/docs/api/interfaces/settlements.md b/docs/api/interfaces/settlements.md index f892a222..d73ca694 100644 --- a/docs/api/interfaces/settlements.md +++ b/docs/api/interfaces/settlements.md @@ -14,7 +14,7 @@ hide_title: true • **peer**: *string* -Defined in: [bee-js/src/types/debug.ts:2](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L2) +Defined in: [bee-js/src/types/debug.ts:2](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L2) ___ @@ -22,7 +22,7 @@ ___ • **received**: *number* -Defined in: [bee-js/src/types/debug.ts:3](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L3) +Defined in: [bee-js/src/types/debug.ts:3](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L3) ___ @@ -30,4 +30,4 @@ ___ • **sent**: *number* -Defined in: [bee-js/src/types/debug.ts:4](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L4) +Defined in: [bee-js/src/types/debug.ts:4](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L4) diff --git a/docs/api/interfaces/socreader.md b/docs/api/interfaces/socreader.md new file mode 100644 index 00000000..f63b4f70 --- /dev/null +++ b/docs/api/interfaces/socreader.md @@ -0,0 +1,43 @@ +--- +id: "socreader" +title: "Interface: SOCReader" +sidebar_label: "SOCReader" +custom_edit_url: null +hide_title: true +--- + +# Interface: SOCReader + +Interface for downloading single owner chunks + +## Hierarchy + +* **SOCReader** + + ↳ [*SOCWriter*](socwriter.md) + +## Properties + +### download + +• **download**: (`identifier`: Identifier) =\> *Promise* + +Downloads a single owner chunk + +**`param`** The identifier of the chunk + +#### Type declaration: + +▸ (`identifier`: Identifier): *Promise* + +#### Parameters: + +Name | Type | +:------ | :------ | +`identifier` | Identifier | + +**Returns:** *Promise* + +Defined in: [bee-js/src/types/index.ts:175](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L175) + +Defined in: [bee-js/src/types/index.ts:175](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L175) diff --git a/docs/api/interfaces/socwriter.md b/docs/api/interfaces/socwriter.md new file mode 100644 index 00000000..6ca1a624 --- /dev/null +++ b/docs/api/interfaces/socwriter.md @@ -0,0 +1,77 @@ +--- +id: "socwriter" +title: "Interface: SOCWriter" +sidebar_label: "SOCWriter" +custom_edit_url: null +hide_title: true +--- + +# Interface: SOCWriter + +Interface for downloading and uploading single owner chunks + +## Hierarchy + +* [*SOCReader*](socreader.md) + + ↳ **SOCWriter** + +## Properties + +### download + +• **download**: (`identifier`: Identifier) =\> *Promise* + +Downloads a single owner chunk + +**`param`** The identifier of the chunk + +#### Type declaration: + +▸ (`identifier`: Identifier): *Promise* + +#### Parameters: + +Name | Type | +:------ | :------ | +`identifier` | Identifier | + +**Returns:** *Promise* + +Defined in: [bee-js/src/types/index.ts:175](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L175) + +Inherited from: [SOCReader](socreader.md).[download](socreader.md#download) + +Defined in: [bee-js/src/types/index.ts:175](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L175) + +___ + +### upload + +• **upload**: (`identifier`: Identifier, `data`: *Uint8Array*, `options?`: [*UploadOptions*](uploadoptions.md)) =\> *Promise*<[*ReferenceResponse*](referenceresponse.md)\> + +Uploads a single owner chunk + +**`param`** The identifier of the chunk + +**`param`** The chunk payload data + +**`param`** Upload options + +#### Type declaration: + +▸ (`identifier`: Identifier, `data`: *Uint8Array*, `options?`: [*UploadOptions*](uploadoptions.md)): *Promise*<[*ReferenceResponse*](referenceresponse.md)\> + +#### Parameters: + +Name | Type | +:------ | :------ | +`identifier` | Identifier | +`data` | *Uint8Array* | +`options?` | [*UploadOptions*](uploadoptions.md) | + +**Returns:** *Promise*<[*ReferenceResponse*](referenceresponse.md)\> + +Defined in: [bee-js/src/types/index.ts:189](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L189) + +Defined in: [bee-js/src/types/index.ts:189](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L189) diff --git a/docs/api/interfaces/tag.md b/docs/api/interfaces/tag.md index 3399c79d..6bbbcc6e 100644 --- a/docs/api/interfaces/tag.md +++ b/docs/api/interfaces/tag.md @@ -14,7 +14,7 @@ hide_title: true • **processed**: *number* -Defined in: [bee-js/src/types/index.ts:48](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L48) +Defined in: [bee-js/src/types/index.ts:61](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L61) ___ @@ -22,7 +22,7 @@ ___ • **startedAt**: *string* -Defined in: [bee-js/src/types/index.ts:51](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L51) +Defined in: [bee-js/src/types/index.ts:64](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L64) ___ @@ -30,7 +30,7 @@ ___ • **synced**: *number* -Defined in: [bee-js/src/types/index.ts:49](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L49) +Defined in: [bee-js/src/types/index.ts:62](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L62) ___ @@ -38,7 +38,7 @@ ___ • **total**: *number* -Defined in: [bee-js/src/types/index.ts:47](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L47) +Defined in: [bee-js/src/types/index.ts:60](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L60) ___ @@ -46,4 +46,4 @@ ___ • **uid**: *number* -Defined in: [bee-js/src/types/index.ts:50](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L50) +Defined in: [bee-js/src/types/index.ts:63](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L63) diff --git a/docs/api/interfaces/topology.md b/docs/api/interfaces/topology.md new file mode 100644 index 00000000..8416544d --- /dev/null +++ b/docs/api/interfaces/topology.md @@ -0,0 +1,86 @@ +--- +id: "topology" +title: "Interface: Topology" +sidebar_label: "Topology" +custom_edit_url: null +hide_title: true +--- + +# Interface: Topology + +## Properties + +### baseAddr + +• **baseAddr**: *string* + +Defined in: [bee-js/src/types/debug.ts:104](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L104) + +___ + +### bins + +• **bins**: *object* + +#### Type declaration: + +Name | Type | +:------ | :------ | +`bin_0` | [*Bin*](bin.md) | +`bin_1` | [*Bin*](bin.md) | +`bin_10` | [*Bin*](bin.md) | +`bin_11` | [*Bin*](bin.md) | +`bin_12` | [*Bin*](bin.md) | +`bin_13` | [*Bin*](bin.md) | +`bin_14` | [*Bin*](bin.md) | +`bin_15` | [*Bin*](bin.md) | +`bin_2` | [*Bin*](bin.md) | +`bin_3` | [*Bin*](bin.md) | +`bin_4` | [*Bin*](bin.md) | +`bin_5` | [*Bin*](bin.md) | +`bin_6` | [*Bin*](bin.md) | +`bin_7` | [*Bin*](bin.md) | +`bin_8` | [*Bin*](bin.md) | +`bin_9` | [*Bin*](bin.md) | + +Defined in: [bee-js/src/types/debug.ts:110](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L110) + +___ + +### connected + +• **connected**: *number* + +Defined in: [bee-js/src/types/debug.ts:106](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L106) + +___ + +### depth + +• **depth**: *number* + +Defined in: [bee-js/src/types/debug.ts:109](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L109) + +___ + +### nnLowWatermark + +• **nnLowWatermark**: *number* + +Defined in: [bee-js/src/types/debug.ts:108](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L108) + +___ + +### population + +• **population**: *number* + +Defined in: [bee-js/src/types/debug.ts:105](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L105) + +___ + +### timestamp + +• **timestamp**: *string* + +Defined in: [bee-js/src/types/debug.ts:107](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L107) diff --git a/docs/api/interfaces/uploadheaders.md b/docs/api/interfaces/uploadheaders.md index d90b39b7..b9407117 100644 --- a/docs/api/interfaces/uploadheaders.md +++ b/docs/api/interfaces/uploadheaders.md @@ -14,7 +14,7 @@ hide_title: true • `Optional` **swarm-encrypt**: *undefined* \| *string* -Defined in: [bee-js/src/types/index.ts:41](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L41) +Defined in: [bee-js/src/types/index.ts:54](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L54) ___ @@ -22,7 +22,7 @@ ___ • `Optional` **swarm-pin**: *undefined* \| *string* -Defined in: [bee-js/src/types/index.ts:40](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L40) +Defined in: [bee-js/src/types/index.ts:53](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L53) ___ @@ -30,4 +30,4 @@ ___ • `Optional` **swarm-tag**: *undefined* \| *string* -Defined in: [bee-js/src/types/index.ts:42](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L42) +Defined in: [bee-js/src/types/index.ts:55](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L55) diff --git a/docs/api/interfaces/uploadoptions.md b/docs/api/interfaces/uploadoptions.md index 75a2dff9..511ed88f 100644 --- a/docs/api/interfaces/uploadoptions.md +++ b/docs/api/interfaces/uploadoptions.md @@ -24,7 +24,7 @@ hide_title: true alter default options of axios HTTP client -Defined in: [bee-js/src/types/index.ts:23](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L23) +Defined in: [bee-js/src/types/index.ts:36](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L36) ___ @@ -32,7 +32,7 @@ ___ • `Optional` **encrypt**: *undefined* \| *boolean* -Defined in: [bee-js/src/types/index.ts:20](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L20) +Defined in: [bee-js/src/types/index.ts:33](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L33) ___ @@ -40,7 +40,7 @@ ___ • `Optional` **pin**: *undefined* \| *boolean* -Defined in: [bee-js/src/types/index.ts:19](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L19) +Defined in: [bee-js/src/types/index.ts:32](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L32) ___ @@ -48,4 +48,4 @@ ___ • `Optional` **tag**: *undefined* \| *number* -Defined in: [bee-js/src/types/index.ts:21](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L21) +Defined in: [bee-js/src/types/index.ts:34](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L34) diff --git a/docs/api/interfaces/utils.bytes.bytes.md b/docs/api/interfaces/utils.bytes.bytes.md index 7c2f87be..dafd32cc 100644 --- a/docs/api/interfaces/utils.bytes.bytes.md +++ b/docs/api/interfaces/utils.bytes.bytes.md @@ -10,12 +10,6 @@ hide_title: true [Utils](../modules/utils.md).[Bytes](../modules/utils.bytes.md).Bytes -Helper type for dealing with fixed size byte arrays. - -It changes the type of `length` property of `Uint8Array` to the -generic `Length` type parameter which is runtime compatible with -the original, because it extends from the `number` type. - ## Type parameters Name | Type | @@ -82,7 +76,7 @@ ___ • `Readonly` **length**: Length -Defined in: [bee-js/src/utils/bytes.ts:9](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/bytes.ts#L9) +Defined in: [bee-js/src/utils/bytes.ts:12](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/bytes.ts#L12) ## Methods diff --git a/docs/api/interfaces/utils.bytes.flexbytes.md b/docs/api/interfaces/utils.bytes.flexbytes.md index e6212421..690c45cf 100644 --- a/docs/api/interfaces/utils.bytes.flexbytes.md +++ b/docs/api/interfaces/utils.bytes.flexbytes.md @@ -55,7 +55,7 @@ ___ • `Readonly` **\_\_max\_\_**: Max -Defined in: [bee-js/src/utils/bytes.ts:22](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/bytes.ts#L22) +Defined in: [bee-js/src/utils/bytes.ts:25](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/bytes.ts#L25) ___ @@ -63,7 +63,7 @@ ___ • `Readonly` **\_\_min\_\_**: Min -Defined in: [bee-js/src/utils/bytes.ts:21](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/bytes.ts#L21) +Defined in: [bee-js/src/utils/bytes.ts:24](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/bytes.ts#L24) ___ diff --git a/docs/api/interfaces/utils.eth.jsonrpc.md b/docs/api/interfaces/utils.eth.jsonrpc.md new file mode 100644 index 00000000..85c05078 --- /dev/null +++ b/docs/api/interfaces/utils.eth.jsonrpc.md @@ -0,0 +1,43 @@ +--- +id: "utils.eth.jsonrpc" +title: "Interface: JsonRPC" +sidebar_label: "JsonRPC" +custom_edit_url: null +hide_title: true +--- + +# Interface: JsonRPC + +[Utils](../modules/utils.md).[Eth](../modules/utils.eth.md).JsonRPC + +## Methods + +### request + +▸ `Optional`**request**(`args`: RequestArguments): *Promise* + +#### Parameters: + +Name | Type | +:------ | :------ | +`args` | RequestArguments | + +**Returns:** *Promise* + +Defined in: [bee-js/src/utils/eth.ts:178](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/eth.ts#L178) + +___ + +### sendAsync + +▸ `Optional`**sendAsync**(`args`: RequestArguments): *Promise* + +#### Parameters: + +Name | Type | +:------ | :------ | +`args` | RequestArguments | + +**Returns:** *Promise* + +Defined in: [bee-js/src/utils/eth.ts:179](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/eth.ts#L179) diff --git a/docs/api/interfaces/withdrawtokensresponse.md b/docs/api/interfaces/withdrawtokensresponse.md index 38fff574..b5fc8a77 100644 --- a/docs/api/interfaces/withdrawtokensresponse.md +++ b/docs/api/interfaces/withdrawtokensresponse.md @@ -14,4 +14,4 @@ hide_title: true • **transactionHash**: *string* -Defined in: [bee-js/src/types/debug.ts:74](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/debug.ts#L74) +Defined in: [bee-js/src/types/debug.ts:74](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/debug.ts#L74) diff --git a/docs/api/modules/utils.bytes.md b/docs/api/modules/utils.bytes.md index d4fd1aee..169646a4 100644 --- a/docs/api/modules/utils.bytes.md +++ b/docs/api/modules/utils.bytes.md @@ -28,3 +28,4 @@ hide_title: true - [verifyBytes](../functions/utils.bytes.verifybytes.md) - [verifyBytesAtOffset](../functions/utils.bytes.verifybytesatoffset.md) - [verifyFlexBytes](../functions/utils.bytes.verifyflexbytes.md) +- [wrapBytesWithHelpers](../functions/utils.bytes.wrapbyteswithhelpers.md) diff --git a/docs/api/modules/utils.eth.md b/docs/api/modules/utils.eth.md index 650f8490..03d6a6d2 100644 --- a/docs/api/modules/utils.eth.md +++ b/docs/api/modules/utils.eth.md @@ -12,8 +12,13 @@ hide_title: true ## Table of contents +### Interfaces + +- [JsonRPC](../interfaces/utils.eth.jsonrpc.md) + ### Type aliases +- [EthAddress](../types/utils.eth.ethaddress.md) - [HexEthAddress](../types/utils.eth.hexethaddress.md) - [OverlayAddress](../types/utils.eth.overlayaddress.md) @@ -21,5 +26,8 @@ hide_title: true - [ethToSwarmAddress](../functions/utils.eth.ethtoswarmaddress.md) - [fromLittleEndian](../functions/utils.eth.fromlittleendian.md) -- [isEthAddress](../functions/utils.eth.isethaddress.md) +- [isHexEthAddress](../functions/utils.eth.ishexethaddress.md) +- [makeEthAddress](../functions/utils.eth.makeethaddress.md) +- [makeEthereumWalletSigner](../functions/utils.eth.makeethereumwalletsigner.md) +- [makeHexEthAddress](../functions/utils.eth.makehexethaddress.md) - [toLittleEndian](../functions/utils.eth.tolittleendian.md) diff --git a/docs/api/modules/utils.hex.md b/docs/api/modules/utils.hex.md index 627669f5..37a83786 100644 --- a/docs/api/modules/utils.hex.md +++ b/docs/api/modules/utils.hex.md @@ -15,12 +15,15 @@ hide_title: true ### Type aliases - [HexString](../types/utils.hex.hexstring.md) +- [PrefixedHexString](../types/utils.hex.prefixedhexstring.md) ### Functions +- [assertHexString](../functions/utils.hex.asserthexstring.md) +- [assertPrefixedHexString](../functions/utils.hex.assertprefixedhexstring.md) - [bytesToHex](../functions/utils.hex.bytestohex.md) - [hexToBytes](../functions/utils.hex.hextobytes.md) - [intToHex](../functions/utils.hex.inttohex.md) - [isHexString](../functions/utils.hex.ishexstring.md) -- [stripHexPrefix](../functions/utils.hex.striphexprefix.md) -- [verifyHex](../functions/utils.hex.verifyhex.md) +- [isPrefixedHexString](../functions/utils.hex.isprefixedhexstring.md) +- [makeHexString](../functions/utils.hex.makehexstring.md) diff --git a/docs/api/types/address.md b/docs/api/types/address.md index eb97171c..fc41b891 100644 --- a/docs/api/types/address.md +++ b/docs/api/types/address.md @@ -10,4 +10,4 @@ hide_title: true Ƭ **Address**: *string* -Defined in: [bee-js/src/types/index.ts:12](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L12) +Defined in: [bee-js/src/types/index.ts:24](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L24) diff --git a/docs/api/types/addressprefix.md b/docs/api/types/addressprefix.md index 8988f431..3edc3f48 100644 --- a/docs/api/types/addressprefix.md +++ b/docs/api/types/addressprefix.md @@ -10,4 +10,4 @@ hide_title: true Ƭ **AddressPrefix**: [*Address*](address.md) -Defined in: [bee-js/src/types/index.ts:13](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L13) +Defined in: [bee-js/src/types/index.ts:25](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L25) diff --git a/docs/api/types/brandedstring.md b/docs/api/types/brandedstring.md index e931b521..ceefdb90 100644 --- a/docs/api/types/brandedstring.md +++ b/docs/api/types/brandedstring.md @@ -1,19 +1,19 @@ --- id: "brandedstring" -title: "Type alias: BrandedString" +title: "Type alias: BrandedString" sidebar_label: "BrandedString" custom_edit_url: null hide_title: true --- -# Type alias: BrandedString +# Type alias: BrandedString -Ƭ **BrandedString**: [*BrandedType*](brandedtype.md) +Ƭ **BrandedString**: [*BrandedType*](brandedtype.md) #### Type parameters: Name | :------ | -`N` | +`Name` | -Defined in: [bee-js/src/types/index.ts:107](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L107) +Defined in: [bee-js/src/types/index.ts:242](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L242) diff --git a/docs/api/types/brandedtype.md b/docs/api/types/brandedtype.md index 3add6155..b9a2b77d 100644 --- a/docs/api/types/brandedtype.md +++ b/docs/api/types/brandedtype.md @@ -1,14 +1,14 @@ --- id: "brandedtype" -title: "Type alias: BrandedType" +title: "Type alias: BrandedType" sidebar_label: "BrandedType" custom_edit_url: null hide_title: true --- -# Type alias: BrandedType +# Type alias: BrandedType -Ƭ **BrandedType**: T & { `__tag__`: N } +Ƭ **BrandedType**: Type & { `__tag__`: Name } These type are used to create new nominal types @@ -18,7 +18,7 @@ See https://spin.atomicobject.com/2018/01/15/typescript-flexible-nominal-typing/ Name | :------ | -`T` | -`N` | +`Type` | +`Name` | -Defined in: [bee-js/src/types/index.ts:105](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L105) +Defined in: [bee-js/src/types/index.ts:240](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L240) diff --git a/docs/api/types/collection.md b/docs/api/types/collection.md index 9045fe15..df5f3326 100644 --- a/docs/api/types/collection.md +++ b/docs/api/types/collection.md @@ -18,4 +18,4 @@ Name | :------ | `T` | -Defined in: [bee-js/src/types/index.ts:79](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L79) +Defined in: [bee-js/src/types/index.ts:105](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L105) diff --git a/docs/api/types/flavoredtype.md b/docs/api/types/flavoredtype.md index f3c534ca..e19258c3 100644 --- a/docs/api/types/flavoredtype.md +++ b/docs/api/types/flavoredtype.md @@ -1,20 +1,20 @@ --- id: "flavoredtype" -title: "Type alias: FlavoredType" +title: "Type alias: FlavoredType" sidebar_label: "FlavoredType" custom_edit_url: null hide_title: true --- -# Type alias: FlavoredType +# Type alias: FlavoredType -Ƭ **FlavoredType**: T & { `__tag__?`: N } +Ƭ **FlavoredType**: Type & { `__tag__?`: Name } #### Type parameters: Name | :------ | -`T` | -`N` | +`Type` | +`Name` | -Defined in: [bee-js/src/types/index.ts:109](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L109) +Defined in: [bee-js/src/types/index.ts:244](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L244) diff --git a/docs/api/types/privatekeybytes.md b/docs/api/types/privatekeybytes.md new file mode 100644 index 00000000..fea1e4c1 --- /dev/null +++ b/docs/api/types/privatekeybytes.md @@ -0,0 +1,13 @@ +--- +id: "privatekeybytes" +title: "Type alias: PrivateKeyBytes" +sidebar_label: "PrivateKeyBytes" +custom_edit_url: null +hide_title: true +--- + +# Type alias: PrivateKeyBytes + +Ƭ **PrivateKeyBytes**: [*Bytes*](../interfaces/utils.bytes.bytes.md)<*32*\> + +Defined in: [bee-js/src/types/index.ts:200](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L200) diff --git a/docs/api/types/publickey.md b/docs/api/types/publickey.md index 423bc5b6..f56bfd79 100644 --- a/docs/api/types/publickey.md +++ b/docs/api/types/publickey.md @@ -10,4 +10,4 @@ hide_title: true Ƭ **PublicKey**: *string* -Defined in: [bee-js/src/types/index.ts:10](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L10) +Defined in: [bee-js/src/types/index.ts:22](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L22) diff --git a/docs/api/types/publickeybytes.md b/docs/api/types/publickeybytes.md new file mode 100644 index 00000000..a7b9638a --- /dev/null +++ b/docs/api/types/publickeybytes.md @@ -0,0 +1,13 @@ +--- +id: "publickeybytes" +title: "Type alias: PublicKeyBytes" +sidebar_label: "PublicKeyBytes" +custom_edit_url: null +hide_title: true +--- + +# Type alias: PublicKeyBytes + +Ƭ **PublicKeyBytes**: [*Bytes*](../interfaces/utils.bytes.bytes.md)<*32*\> \| [*Bytes*](../interfaces/utils.bytes.bytes.md)<*64*\> + +Defined in: [bee-js/src/types/index.ts:201](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L201) diff --git a/docs/api/types/reference.md b/docs/api/types/reference.md index ba1e7903..7eaac755 100644 --- a/docs/api/types/reference.md +++ b/docs/api/types/reference.md @@ -8,6 +8,6 @@ hide_title: true # Type alias: Reference -Ƭ **Reference**: *string* +Ƭ **Reference**: [*HexString*](utils.hex.hexstring.md)<*typeof* [*REFERENCE\_HEX\_LENGTH*](../variables/reference_hex_length.md)\> \| [*HexString*](utils.hex.hexstring.md)<*typeof* [*ENCRYPTED\_REFERENCE\_HEX\_LENGTH*](../variables/encrypted_reference_hex_length.md)\> -Defined in: [bee-js/src/types/index.ts:9](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L9) +Defined in: [bee-js/src/types/index.ts:21](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L21) diff --git a/docs/api/types/signature.md b/docs/api/types/signature.md new file mode 100644 index 00000000..f65f5dcb --- /dev/null +++ b/docs/api/types/signature.md @@ -0,0 +1,13 @@ +--- +id: "signature" +title: "Type alias: Signature" +sidebar_label: "Signature" +custom_edit_url: null +hide_title: true +--- + +# Type alias: Signature + +Ƭ **Signature**: [*Bytes*](../interfaces/utils.bytes.bytes.md)<*typeof* [*SIGNATURE\_BYTES\_LENGTH*](../variables/signature_bytes_length.md)\> + +Defined in: [bee-js/src/types/index.ts:199](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L199) diff --git a/docs/api/types/signer.md b/docs/api/types/signer.md new file mode 100644 index 00000000..dabcc2c4 --- /dev/null +++ b/docs/api/types/signer.md @@ -0,0 +1,38 @@ +--- +id: "signer" +title: "Type alias: Signer" +sidebar_label: "Signer" +custom_edit_url: null +hide_title: true +--- + +# Type alias: Signer + +Ƭ **Signer**: *object* + +Interface for implementing Ethereum compatible signing. + +In order to be compatible with Ethereum and its signing method `personal_sign`, the data +that are passed to sign() function should be prefixed with: `\x19Ethereum Signed Message:\n${data.length}`, hashed +and only then signed. +If you are wrapping another signer tool/library (like Metamask or some other Ethereum wallet), you might not have +to do this prefixing manually if you use the `personal_sign` method. Check documentation of the tool! +If you are writing your own storage for keys, then you have to prefix the data manually otherwise the Bee node +will reject the chunks signed by you! + +For example see the hashWithEthereumPrefix() function. + +**`property`** sign The sign function that can be sync or async. This function takes non-prefixed data. See above. + +**`property`** address The ethereum address of the signer in bytes. + +**`see`** hashWithEthereumPrefix + +#### Type declaration: + +Name | Type | +:------ | :------ | +`address` | [*EthAddress*](utils.eth.ethaddress.md) | +`sign` | SyncSigner \| AsyncSigner | + +Defined in: [bee-js/src/types/index.ts:230](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L230) diff --git a/docs/api/types/topic.md b/docs/api/types/topic.md new file mode 100644 index 00000000..8dc70d8c --- /dev/null +++ b/docs/api/types/topic.md @@ -0,0 +1,15 @@ +--- +id: "topic" +title: "Type alias: Topic" +sidebar_label: "Topic" +custom_edit_url: null +hide_title: true +--- + +# Type alias: Topic + +Ƭ **Topic**: [*HexString*](utils.hex.hexstring.md)<*typeof* [*TOPIC\_HEX\_LENGTH*](../variables/topic_hex_length.md)\> + +Hex string of length 64 chars without prefix that specifies topics for feed. + +Defined in: [bee-js/src/types/index.ts:136](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L136) diff --git a/docs/api/types/utils.eth.ethaddress.md b/docs/api/types/utils.eth.ethaddress.md new file mode 100644 index 00000000..478f327f --- /dev/null +++ b/docs/api/types/utils.eth.ethaddress.md @@ -0,0 +1,15 @@ +--- +id: "utils.eth.ethaddress" +title: "Type alias: EthAddress" +sidebar_label: "EthAddress" +custom_edit_url: null +hide_title: true +--- + +# Type alias: EthAddress + +[Utils](../modules/utils.md).[Eth](../modules/utils.eth.md).EthAddress + +Ƭ **EthAddress**: [*Bytes*](../interfaces/utils.bytes.bytes.md)<*20*\> + +Defined in: [bee-js/src/utils/eth.ts:7](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/eth.ts#L7) diff --git a/docs/api/types/utils.eth.hexethaddress.md b/docs/api/types/utils.eth.hexethaddress.md index ec17552b..a9dd7ce2 100644 --- a/docs/api/types/utils.eth.hexethaddress.md +++ b/docs/api/types/utils.eth.hexethaddress.md @@ -10,6 +10,6 @@ hide_title: true [Utils](../modules/utils.md).[Eth](../modules/utils.eth.md).HexEthAddress -Ƭ **HexEthAddress**: [*BrandedString*](brandedstring.md)<*HexEthAddress*\> +Ƭ **HexEthAddress**: [*HexString*](utils.hex.hexstring.md)<*40*\> -Defined in: [bee-js/src/utils/eth.ts:4](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/eth.ts#L4) +Defined in: [bee-js/src/utils/eth.ts:8](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/eth.ts#L8) diff --git a/docs/api/types/utils.eth.overlayaddress.md b/docs/api/types/utils.eth.overlayaddress.md index b8f84574..be0fbb28 100644 --- a/docs/api/types/utils.eth.overlayaddress.md +++ b/docs/api/types/utils.eth.overlayaddress.md @@ -12,4 +12,4 @@ hide_title: true Ƭ **OverlayAddress**: [*BrandedString*](brandedstring.md)<*OverlayAddress*\> -Defined in: [bee-js/src/utils/eth.ts:5](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/eth.ts#L5) +Defined in: [bee-js/src/utils/eth.ts:6](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/eth.ts#L6) diff --git a/docs/api/types/utils.hex.hexstring.md b/docs/api/types/utils.hex.hexstring.md index ac3ad294..7344cdbb 100644 --- a/docs/api/types/utils.hex.hexstring.md +++ b/docs/api/types/utils.hex.hexstring.md @@ -1,17 +1,25 @@ --- id: "utils.hex.hexstring" -title: "Type alias: HexString" +title: "Type alias: HexString" sidebar_label: "HexString" custom_edit_url: null hide_title: true --- -# Type alias: HexString +# Type alias: HexString [Utils](../modules/utils.md).[Hex](../modules/utils.hex.md).HexString -Ƭ **HexString**: [*BrandedString*](brandedstring.md)<*HexString*\> +Ƭ **HexString**: [*FlavoredType*](flavoredtype.md)<*string* & { `length`: Length }, *HexString*\> -Nominal type to represent hex strings +Nominal type to represent hex strings WITHOUT '0x' prefix. +For example for 32 bytes hex representation you have to use 64 length. +TODO: Make Length mandatory: https://github.com/ethersphere/bee-js/issues/208 -Defined in: [bee-js/src/utils/hex.ts:6](https://github.com/ethersphere/bee-js/blob/7dfd556/src/utils/hex.ts#L6) +#### Type parameters: + +Name | Type | Default | +:------ | :------ | :------ | +`Length` | *number* | *number* | + +Defined in: [bee-js/src/utils/hex.ts:9](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/hex.ts#L9) diff --git a/docs/api/types/utils.hex.prefixedhexstring.md b/docs/api/types/utils.hex.prefixedhexstring.md new file mode 100644 index 00000000..0cb53263 --- /dev/null +++ b/docs/api/types/utils.hex.prefixedhexstring.md @@ -0,0 +1,21 @@ +--- +id: "utils.hex.prefixedhexstring" +title: "Type alias: PrefixedHexString" +sidebar_label: "PrefixedHexString" +custom_edit_url: null +hide_title: true +--- + +# Type alias: PrefixedHexString + +[Utils](../modules/utils.md).[Hex](../modules/utils.hex.md).PrefixedHexString + +Ƭ **PrefixedHexString**: [*BrandedType*](brandedtype.md) + +Type for HexString with prefix. +The main hex type used internally should be non-prefixed HexString +and therefore this type should be used as least as possible. +Because of that it does not contain the Length property as the variables +should be validated and converted to HexString ASAP. + +Defined in: [bee-js/src/utils/hex.ts:23](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/utils/hex.ts#L23) diff --git a/docs/api/variables/encrypted_hex_reference_length.md b/docs/api/variables/encrypted_hex_reference_length.md deleted file mode 100644 index 82697dc3..00000000 --- a/docs/api/variables/encrypted_hex_reference_length.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -id: "encrypted_hex_reference_length" -title: "Variable: ENCRYPTED_HEX_REFERENCE_LENGTH" -sidebar_label: "ENCRYPTED_HEX_REFERENCE_LENGTH" -custom_edit_url: null -hide_title: true ---- - -# Variable: ENCRYPTED\_HEX\_REFERENCE\_LENGTH - -• `Const` **ENCRYPTED\_HEX\_REFERENCE\_LENGTH**: *number* - -Defined in: [bee-js/src/types/index.ts:16](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L16) diff --git a/docs/api/variables/encrypted_reference_bytes_length.md b/docs/api/variables/encrypted_reference_bytes_length.md new file mode 100644 index 00000000..b9686c02 --- /dev/null +++ b/docs/api/variables/encrypted_reference_bytes_length.md @@ -0,0 +1,13 @@ +--- +id: "encrypted_reference_bytes_length" +title: "Variable: ENCRYPTED_REFERENCE_BYTES_LENGTH" +sidebar_label: "ENCRYPTED_REFERENCE_BYTES_LENGTH" +custom_edit_url: null +hide_title: true +--- + +# Variable: ENCRYPTED\_REFERENCE\_BYTES\_LENGTH + +• `Const` **ENCRYPTED\_REFERENCE\_BYTES\_LENGTH**: *64*= 64 + +Defined in: [bee-js/src/types/index.ts:19](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L19) diff --git a/docs/api/variables/encrypted_reference_hex_length.md b/docs/api/variables/encrypted_reference_hex_length.md new file mode 100644 index 00000000..8aa2e279 --- /dev/null +++ b/docs/api/variables/encrypted_reference_hex_length.md @@ -0,0 +1,13 @@ +--- +id: "encrypted_reference_hex_length" +title: "Variable: ENCRYPTED_REFERENCE_HEX_LENGTH" +sidebar_label: "ENCRYPTED_REFERENCE_HEX_LENGTH" +custom_edit_url: null +hide_title: true +--- + +# Variable: ENCRYPTED\_REFERENCE\_HEX\_LENGTH + +• `Const` **ENCRYPTED\_REFERENCE\_HEX\_LENGTH**: *128*= 128 + +Defined in: [bee-js/src/types/index.ts:17](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L17) diff --git a/docs/api/variables/hex_reference_length.md b/docs/api/variables/hex_reference_length.md deleted file mode 100644 index e23ba77e..00000000 --- a/docs/api/variables/hex_reference_length.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -id: "hex_reference_length" -title: "Variable: HEX_REFERENCE_LENGTH" -sidebar_label: "HEX_REFERENCE_LENGTH" -custom_edit_url: null -hide_title: true ---- - -# Variable: HEX\_REFERENCE\_LENGTH - -• `Const` **HEX\_REFERENCE\_LENGTH**: *64*= 64 - -Defined in: [bee-js/src/types/index.ts:15](https://github.com/ethersphere/bee-js/blob/7dfd556/src/types/index.ts#L15) diff --git a/docs/api/variables/reference_bytes_length.md b/docs/api/variables/reference_bytes_length.md new file mode 100644 index 00000000..372c0d21 --- /dev/null +++ b/docs/api/variables/reference_bytes_length.md @@ -0,0 +1,13 @@ +--- +id: "reference_bytes_length" +title: "Variable: REFERENCE_BYTES_LENGTH" +sidebar_label: "REFERENCE_BYTES_LENGTH" +custom_edit_url: null +hide_title: true +--- + +# Variable: REFERENCE\_BYTES\_LENGTH + +• `Const` **REFERENCE\_BYTES\_LENGTH**: *32*= 32 + +Defined in: [bee-js/src/types/index.ts:18](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L18) diff --git a/docs/api/variables/reference_hex_length.md b/docs/api/variables/reference_hex_length.md new file mode 100644 index 00000000..8c40203f --- /dev/null +++ b/docs/api/variables/reference_hex_length.md @@ -0,0 +1,13 @@ +--- +id: "reference_hex_length" +title: "Variable: REFERENCE_HEX_LENGTH" +sidebar_label: "REFERENCE_HEX_LENGTH" +custom_edit_url: null +hide_title: true +--- + +# Variable: REFERENCE\_HEX\_LENGTH + +• `Const` **REFERENCE\_HEX\_LENGTH**: *64*= 64 + +Defined in: [bee-js/src/types/index.ts:16](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L16) diff --git a/docs/api/variables/signature_bytes_length.md b/docs/api/variables/signature_bytes_length.md new file mode 100644 index 00000000..078b3da4 --- /dev/null +++ b/docs/api/variables/signature_bytes_length.md @@ -0,0 +1,13 @@ +--- +id: "signature_bytes_length" +title: "Variable: SIGNATURE_BYTES_LENGTH" +sidebar_label: "SIGNATURE_BYTES_LENGTH" +custom_edit_url: null +hide_title: true +--- + +# Variable: SIGNATURE\_BYTES\_LENGTH + +• `Const` **SIGNATURE\_BYTES\_LENGTH**: *65*= 65 + +Defined in: [bee-js/src/types/index.ts:197](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L197) diff --git a/docs/api/variables/signature_hex_length.md b/docs/api/variables/signature_hex_length.md new file mode 100644 index 00000000..4ab0411d --- /dev/null +++ b/docs/api/variables/signature_hex_length.md @@ -0,0 +1,15 @@ +--- +id: "signature_hex_length" +title: "Variable: SIGNATURE_HEX_LENGTH" +sidebar_label: "SIGNATURE_HEX_LENGTH" +custom_edit_url: null +hide_title: true +--- + +# Variable: SIGNATURE\_HEX\_LENGTH + +• `Const` **SIGNATURE\_HEX\_LENGTH**: *130*= 130 + +Ethereum compatible signing interfaces and definitions + +Defined in: [bee-js/src/types/index.ts:196](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L196) diff --git a/docs/api/variables/supported_bee_version.md b/docs/api/variables/supported_bee_version.md new file mode 100644 index 00000000..930a9089 --- /dev/null +++ b/docs/api/variables/supported_bee_version.md @@ -0,0 +1,13 @@ +--- +id: "supported_bee_version" +title: "Variable: SUPPORTED_BEE_VERSION" +sidebar_label: "SUPPORTED_BEE_VERSION" +custom_edit_url: null +hide_title: true +--- + +# Variable: SUPPORTED\_BEE\_VERSION + +• `Const` **SUPPORTED\_BEE\_VERSION**: *string* + +Defined in: [bee-js/src/modules/debug/status.ts:5](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/modules/debug/status.ts#L5) diff --git a/docs/api/variables/supported_bee_version_exact.md b/docs/api/variables/supported_bee_version_exact.md new file mode 100644 index 00000000..beac50ec --- /dev/null +++ b/docs/api/variables/supported_bee_version_exact.md @@ -0,0 +1,13 @@ +--- +id: "supported_bee_version_exact" +title: "Variable: SUPPORTED_BEE_VERSION_EXACT" +sidebar_label: "SUPPORTED_BEE_VERSION_EXACT" +custom_edit_url: null +hide_title: true +--- + +# Variable: SUPPORTED\_BEE\_VERSION\_EXACT + +• `Const` **SUPPORTED\_BEE\_VERSION\_EXACT**: *string* + +Defined in: [bee-js/src/modules/debug/status.ts:4](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/modules/debug/status.ts#L4) diff --git a/docs/api/variables/topic_bytes_length.md b/docs/api/variables/topic_bytes_length.md new file mode 100644 index 00000000..2ccb9a8e --- /dev/null +++ b/docs/api/variables/topic_bytes_length.md @@ -0,0 +1,15 @@ +--- +id: "topic_bytes_length" +title: "Variable: TOPIC_BYTES_LENGTH" +sidebar_label: "TOPIC_BYTES_LENGTH" +custom_edit_url: null +hide_title: true +--- + +# Variable: TOPIC\_BYTES\_LENGTH + +• `Const` **TOPIC\_BYTES\_LENGTH**: *32*= 32 + +Writers and Readers interfaces + +Defined in: [bee-js/src/types/index.ts:130](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L130) diff --git a/docs/api/variables/topic_hex_length.md b/docs/api/variables/topic_hex_length.md new file mode 100644 index 00000000..0232a9e4 --- /dev/null +++ b/docs/api/variables/topic_hex_length.md @@ -0,0 +1,13 @@ +--- +id: "topic_hex_length" +title: "Variable: TOPIC_HEX_LENGTH" +sidebar_label: "TOPIC_HEX_LENGTH" +custom_edit_url: null +hide_title: true +--- + +# Variable: TOPIC\_HEX\_LENGTH + +• `Const` **TOPIC\_HEX\_LENGTH**: *64*= 64 + +Defined in: [bee-js/src/types/index.ts:131](https://github.com/ethersphere/bee-js/blob/0ac3a7d/src/types/index.ts#L131) diff --git a/typedoc-sidebar.js b/typedoc-sidebar.js index ee16c5c3..e641f626 100644 --- a/typedoc-sidebar.js +++ b/typedoc-sidebar.js @@ -31,9 +31,12 @@ module.exports = [ "items": [ "api/interfaces/utils.bytes.bytes", "api/interfaces/utils.bytes.flexbytes", + "api/interfaces/utils.eth.jsonrpc", "api/interfaces/allsettlements", "api/interfaces/balanceresponse", + "api/interfaces/beeoptions", "api/interfaces/beeresponse", + "api/interfaces/bin", "api/interfaces/cashoutresponse", "api/interfaces/cashoutresult", "api/interfaces/cheque", @@ -41,23 +44,32 @@ module.exports = [ "api/interfaces/chequebookbalanceresponse", "api/interfaces/collectionentry", "api/interfaces/collectionuploadoptions", + "api/interfaces/data", "api/interfaces/deposittokensresponse", "api/interfaces/dictionary", "api/interfaces/downloadoptions", + "api/interfaces/feedreader", + "api/interfaces/feedwriter", "api/interfaces/filedata", "api/interfaces/fileheaders", "api/interfaces/fileuploadoptions", + "api/interfaces/health", "api/interfaces/lastcashoutactionresponse", "api/interfaces/lastchequesforpeerresponse", "api/interfaces/lastchequesresponse", "api/interfaces/nodeaddresses", "api/interfaces/peer", "api/interfaces/peerbalance", + "api/interfaces/pingresponse", "api/interfaces/pssmessagehandler", "api/interfaces/psssubscription", "api/interfaces/referenceresponse", + "api/interfaces/removepeerresponse", + "api/interfaces/socreader", + "api/interfaces/socwriter", "api/interfaces/settlements", "api/interfaces/tag", + "api/interfaces/topology", "api/interfaces/uploadheaders", "api/interfaces/uploadoptions", "api/interfaces/withdrawtokensresponse" @@ -67,25 +79,40 @@ module.exports = [ "type": "category", "label": "Type aliases", "items": [ + "api/types/utils.eth.ethaddress", "api/types/utils.eth.hexethaddress", "api/types/utils.eth.overlayaddress", "api/types/utils.hex.hexstring", + "api/types/utils.hex.prefixedhexstring", "api/types/address", "api/types/addressprefix", "api/types/brandedstring", "api/types/brandedtype", "api/types/collection", "api/types/flavoredtype", + "api/types/privatekeybytes", "api/types/publickey", - "api/types/reference" + "api/types/publickeybytes", + "api/types/reference", + "api/types/signature", + "api/types/signer", + "api/types/topic" ] }, { "type": "category", "label": "Variables", "items": [ - "api/variables/encrypted_hex_reference_length", - "api/variables/hex_reference_length" + "api/variables/encrypted_reference_bytes_length", + "api/variables/encrypted_reference_hex_length", + "api/variables/reference_bytes_length", + "api/variables/reference_hex_length", + "api/variables/signature_bytes_length", + "api/variables/signature_hex_length", + "api/variables/supported_bee_version", + "api/variables/supported_bee_version_exact", + "api/variables/topic_bytes_length", + "api/variables/topic_hex_length" ] }, { @@ -101,20 +128,26 @@ module.exports = [ "api/functions/utils.bytes.verifybytes", "api/functions/utils.bytes.verifybytesatoffset", "api/functions/utils.bytes.verifyflexbytes", + "api/functions/utils.bytes.wrapbyteswithhelpers", "api/functions/utils.data.preparedata", "api/functions/utils.data.preparewebsocketdata", "api/functions/utils.eth.ethtoswarmaddress", "api/functions/utils.eth.fromlittleendian", - "api/functions/utils.eth.isethaddress", + "api/functions/utils.eth.ishexethaddress", + "api/functions/utils.eth.makeethaddress", + "api/functions/utils.eth.makeethereumwalletsigner", + "api/functions/utils.eth.makehexethaddress", "api/functions/utils.eth.tolittleendian", "api/functions/utils.file.filearraybuffer", "api/functions/utils.file.isfile", + "api/functions/utils.hex.asserthexstring", + "api/functions/utils.hex.assertprefixedhexstring", "api/functions/utils.hex.bytestohex", "api/functions/utils.hex.hextobytes", "api/functions/utils.hex.inttohex", "api/functions/utils.hex.ishexstring", - "api/functions/utils.hex.striphexprefix", - "api/functions/utils.hex.verifyhex", + "api/functions/utils.hex.isprefixedhexstring", + "api/functions/utils.hex.makehexstring", "api/functions/utils.tar.maketar" ] } diff --git a/typedoc.json b/typedoc.json index f860eedf..d96b9bcd 100644 --- a/typedoc.json +++ b/typedoc.json @@ -6,5 +6,5 @@ "out": "api", "allReflectionsHaveOwnDocument": true, "entryPoints": ["./bee-js/src/index.ts"], - "tsconfig": "./bee-js/tsconfig.typedoc.json" + "tsconfig": "./bee-js/tsconfig.json" }