diff --git a/docs/api/classes/BatchId.md b/docs/api/classes/BatchId.md index 59d61a3e..5f9e3e71 100644 --- a/docs/api/classes/BatchId.md +++ b/docs/api/classes/BatchId.md @@ -1,6 +1,6 @@ # Class: BatchId -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/batch-id.d.cts:5 +Defined in: [core-sdk/src/bytes/batch-id.ts:6](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/batch-id.ts#L6) A 32-byte postage batch identifier. @@ -14,7 +14,7 @@ A 32-byte postage batch identifier. > **new BatchId**(`bytes`): `BatchId` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/batch-id.d.cts:7 +Defined in: [core-sdk/src/bytes/batch-id.ts:9](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/batch-id.ts#L9) #### Parameters @@ -36,7 +36,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/batch-id.d.cts > `readonly` **length**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 +Defined in: [core-sdk/src/bytes/bytes.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L19) #### Inherited from @@ -48,7 +48,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 > `readonly` `static` **LENGTH**: `32` = `32` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/batch-id.d.cts:6 +Defined in: [core-sdk/src/bytes/batch-id.ts:7](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/batch-id.ts#L7) ## Methods @@ -56,7 +56,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/batch-id.d.cts > **equals**(`other`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L166) Byte-wise equality against another Bytes instance, raw bytes, or hex string. @@ -80,7 +80,7 @@ Byte-wise equality against another Bytes instance, raw bytes, or hex string. > **offset**(`index`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:33 +Defined in: [core-sdk/src/bytes/bytes.ts:110](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L110) Returns a copy of the bytes from `index` to the end. @@ -104,7 +104,7 @@ Returns a copy of the bytes from `index` to the end. > **represent**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:69 +Defined in: [core-sdk/src/bytes/bytes.ts:173](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L173) Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes.md#tohex). @@ -122,7 +122,7 @@ Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes. > **toBase32**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:49 +Defined in: [core-sdk/src/bytes/bytes.ts:138](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L138) Encodes as a padded base32 string. @@ -140,7 +140,7 @@ Encodes as a padded base32 string. > **toBase64**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:45 +Defined in: [core-sdk/src/bytes/bytes.ts:131](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L131) Encodes as a padded base64 string. @@ -158,7 +158,7 @@ Encodes as a padded base64 string. > **toHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:41 +Defined in: [core-sdk/src/bytes/bytes.ts:124](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L124) Encodes as a lowercase hex string, with no `0x` prefix. @@ -176,7 +176,7 @@ Encodes as a lowercase hex string, with no `0x` prefix. > **toJSON**(): `unknown` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:61 +Defined in: [core-sdk/src/bytes/bytes.ts:159](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L159) Decodes the bytes as UTF-8 JSON. @@ -194,7 +194,7 @@ Decodes the bytes as UTF-8 JSON. > **toString**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:53 +Defined in: [core-sdk/src/bytes/bytes.ts:145](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L145) Same as [toHex](Bytes.md#tohex). @@ -212,7 +212,7 @@ Same as [toHex](Bytes.md#tohex). > **toUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:37 +Defined in: [core-sdk/src/bytes/bytes.ts:117](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L117) Returns a copy of the underlying bytes. @@ -230,7 +230,7 @@ Returns a copy of the underlying bytes. > **toUtf8**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:57 +Defined in: [core-sdk/src/bytes/bytes.ts:152](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L152) Decodes the bytes as UTF-8 text. @@ -248,7 +248,7 @@ Decodes the bytes as UTF-8 text. > `static` **concat**(...`arrays`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:20 +Defined in: [core-sdk/src/bytes/bytes.ts:75](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L75) Concatenates any number of byte arrays (or Bytes instances) into one new array. @@ -272,7 +272,7 @@ Concatenates any number of byte arrays (or Bytes instances) into one new array. > `static` **fromSlice**(`bytes`, `start`, `length?`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:29 +Defined in: [core-sdk/src/bytes/bytes.ts:100](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L100) Wraps a slice of `bytes` starting at `start`, running to the end unless `length` is given. @@ -305,7 +305,7 @@ Wraps a slice of `bytes` starting at `start`, running to the end unless > `static` **fromUtf8**(`utf8`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:24 +Defined in: [core-sdk/src/bytes/bytes.ts:92](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L92) Wraps the UTF-8 encoding of a string. @@ -329,7 +329,7 @@ Wraps the UTF-8 encoding of a string. > `static` **keccak256**(`bytes`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:16 +Defined in: [core-sdk/src/bytes/bytes.ts:68](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L68) Hashes `bytes` with keccak256 and wraps the 32-byte digest. diff --git a/docs/api/classes/Bytes.md b/docs/api/classes/Bytes.md index 0c63ec63..2e59c163 100644 --- a/docs/api/classes/Bytes.md +++ b/docs/api/classes/Bytes.md @@ -1,6 +1,6 @@ # Class: Bytes -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:5 +Defined in: [core-sdk/src/bytes/bytes.ts:17](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L17) Base wrapper around a byte array, accepting a Uint8Array, ArrayBuffer, hex string, or another Bytes instance, with an optional length check. @@ -26,7 +26,7 @@ string, or another Bytes instance, with an optional length check. > **new Bytes**(`bytes`, `byteLength?`): `Bytes` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:12 +Defined in: [core-sdk/src/bytes/bytes.ts:25](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L25) #### Parameters @@ -51,7 +51,7 @@ If given, throws unless the resulting length matches > `readonly` **length**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 +Defined in: [core-sdk/src/bytes/bytes.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L19) ## Methods @@ -59,7 +59,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 > **equals**(`other`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L166) Byte-wise equality against another Bytes instance, raw bytes, or hex string. @@ -79,7 +79,7 @@ Byte-wise equality against another Bytes instance, raw bytes, or hex string. > **offset**(`index`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:33 +Defined in: [core-sdk/src/bytes/bytes.ts:110](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L110) Returns a copy of the bytes from `index` to the end. @@ -99,7 +99,7 @@ Returns a copy of the bytes from `index` to the end. > **represent**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:69 +Defined in: [core-sdk/src/bytes/bytes.ts:173](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L173) Human-readable representation, used by debuggers/loggers. Same as [toHex](#tohex). @@ -113,7 +113,7 @@ Human-readable representation, used by debuggers/loggers. Same as [toHex](#tohex > **toBase32**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:49 +Defined in: [core-sdk/src/bytes/bytes.ts:138](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L138) Encodes as a padded base32 string. @@ -127,7 +127,7 @@ Encodes as a padded base32 string. > **toBase64**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:45 +Defined in: [core-sdk/src/bytes/bytes.ts:131](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L131) Encodes as a padded base64 string. @@ -141,7 +141,7 @@ Encodes as a padded base64 string. > **toHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:41 +Defined in: [core-sdk/src/bytes/bytes.ts:124](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L124) Encodes as a lowercase hex string, with no `0x` prefix. @@ -155,7 +155,7 @@ Encodes as a lowercase hex string, with no `0x` prefix. > **toJSON**(): `unknown` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:61 +Defined in: [core-sdk/src/bytes/bytes.ts:159](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L159) Decodes the bytes as UTF-8 JSON. @@ -169,7 +169,7 @@ Decodes the bytes as UTF-8 JSON. > **toString**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:53 +Defined in: [core-sdk/src/bytes/bytes.ts:145](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L145) Same as [toHex](#tohex). @@ -183,7 +183,7 @@ Same as [toHex](#tohex). > **toUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:37 +Defined in: [core-sdk/src/bytes/bytes.ts:117](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L117) Returns a copy of the underlying bytes. @@ -197,7 +197,7 @@ Returns a copy of the underlying bytes. > **toUtf8**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:57 +Defined in: [core-sdk/src/bytes/bytes.ts:152](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L152) Decodes the bytes as UTF-8 text. @@ -211,7 +211,7 @@ Decodes the bytes as UTF-8 text. > `static` **concat**(...`arrays`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:20 +Defined in: [core-sdk/src/bytes/bytes.ts:75](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L75) Concatenates any number of byte arrays (or Bytes instances) into one new array. @@ -231,7 +231,7 @@ Concatenates any number of byte arrays (or Bytes instances) into one new array. > `static` **fromSlice**(`bytes`, `start`, `length?`): `Bytes` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:29 +Defined in: [core-sdk/src/bytes/bytes.ts:100](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L100) Wraps a slice of `bytes` starting at `start`, running to the end unless `length` is given. @@ -260,7 +260,7 @@ Wraps a slice of `bytes` starting at `start`, running to the end unless > `static` **fromUtf8**(`utf8`): `Bytes` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:24 +Defined in: [core-sdk/src/bytes/bytes.ts:92](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L92) Wraps the UTF-8 encoding of a string. @@ -280,7 +280,7 @@ Wraps the UTF-8 encoding of a string. > `static` **keccak256**(`bytes`): `Bytes` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:16 +Defined in: [core-sdk/src/bytes/bytes.ts:68](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L68) Hashes `bytes` with keccak256 and wraps the 32-byte digest. diff --git a/docs/api/classes/ChunkBuilder.md b/docs/api/classes/ChunkBuilder.md index 70989ebf..15ce64bd 100644 --- a/docs/api/classes/ChunkBuilder.md +++ b/docs/api/classes/ChunkBuilder.md @@ -1,6 +1,6 @@ # Class: ChunkBuilder -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:8 +Defined in: [core-sdk/src/chunk/splitter.ts:16](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L16) A chunk (up to 4096 bytes of payload) being filled in by a ChunkSplitter, before it's sealed. Unlike the immutable CAC [Chunk](../interfaces/Chunk.md), this is a @@ -12,7 +12,7 @@ mutable buffer - only `hash()`/`encryptedHash()`/`build()` finalize it. > **new ChunkBuilder**(`span?`): `ChunkBuilder` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:11 +Defined in: [core-sdk/src/chunk/splitter.ts:20](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L20) #### Parameters @@ -30,7 +30,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts > **span**: `bigint` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:9 +Defined in: [core-sdk/src/chunk/splitter.ts:17](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L17) *** @@ -38,7 +38,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts > **writer**: `Uint8ArrayWriter` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:10 +Defined in: [core-sdk/src/chunk/splitter.ts:18](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L18) ## Methods @@ -46,7 +46,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts > **build**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:15 +Defined in: [core-sdk/src/chunk/splitter.ts:28](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L28) Returns the raw chunk bytes: 8-byte span || 4096-byte payload buffer. @@ -60,7 +60,7 @@ Returns the raw chunk bytes: 8-byte span || 4096-byte payload buffer. > **encryptedHash**(`key?`): `object` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:24 +Defined in: [core-sdk/src/chunk/splitter.ts:43](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L43) Encrypts this chunk with `key` (generating a random one if omitted) and returns the resulting address alongside the key used. @@ -89,7 +89,7 @@ returns the resulting address alongside the key used. > **hash**(): [`Reference`](Reference.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:19 +Defined in: [core-sdk/src/chunk/splitter.ts:35](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L35) Computes the unencrypted BMT address of this chunk. diff --git a/docs/api/classes/ChunkSplitter.md b/docs/api/classes/ChunkSplitter.md index 35fddb49..2eeee9f0 100644 --- a/docs/api/classes/ChunkSplitter.md +++ b/docs/api/classes/ChunkSplitter.md @@ -1,6 +1,6 @@ # Class: ChunkSplitter -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:40 +Defined in: [core-sdk/src/chunk/splitter.ts:66](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L66) Splits arbitrary data into a tree of 4096-byte chunks (the inverse of ChunkJoiner), calling `onBatch` with each level's sealed chunks as they @@ -13,7 +13,7 @@ Reed-Solomon parity chunks. > **new ChunkSplitter**(`onBatch`, `maxShards?`, `encrypted?`, `onIntermediateChunk?`): `ChunkSplitter` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:62 +Defined in: [core-sdk/src/chunk/splitter.ts:90](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L90) #### Parameters @@ -54,7 +54,7 @@ sealed, so callers can tag it (e.g. encoding a redundancy level into its span). > `readonly` `static` **NOOP**: (`_`) => `Promise`\<`ChunkEntry`[]\> -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:41 +Defined in: [core-sdk/src/chunk/splitter.ts:67](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L67) #### Parameters @@ -72,7 +72,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts > **append**(`data`, `level?`, `spanIncrement?`): `Promise`\<`void`\> -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:81 +Defined in: [core-sdk/src/chunk/splitter.ts:132](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L132) Appends more data to the tree, sealing and elevating chunks as needed. `level`/`spanIncrement` are internal - callers building a tree from raw @@ -102,7 +102,7 @@ input data should always call this at the default level 0. > **finalize**(`level?`): `Promise`\<[`ChunkBuilder`](ChunkBuilder.md)\> -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:89 +Defined in: [core-sdk/src/chunk/splitter.ts:217](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L217) Seals every level and returns the tree's root chunk. `level` is internal - callers should always start at the default level 0. @@ -123,7 +123,7 @@ internal - callers should always start at the default level 0. > `static` **encryptedRoot**(`data`): `Promise`\<\{ `address`: [`Reference`](Reference.md); `key`: `Uint8Array`; \}\> -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:72 +Defined in: [core-sdk/src/chunk/splitter.ts:119](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L119) Splits `data` into an encrypted chunk tree (no upload callback) and returns the root's encrypted address and key. @@ -144,7 +144,7 @@ returns the root's encrypted address and key. > `static` **root**(`data`): `Promise`\<[`ChunkBuilder`](ChunkBuilder.md)\> -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/splitter.d.cts:67 +Defined in: [core-sdk/src/chunk/splitter.ts:108](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/splitter.ts#L108) Splits `data` into a chunk tree (no redundancy, no encryption, no upload callback) and returns just its root chunk. diff --git a/docs/api/classes/EthAddress.md b/docs/api/classes/EthAddress.md index d0b99ea8..ba0f3b56 100644 --- a/docs/api/classes/EthAddress.md +++ b/docs/api/classes/EthAddress.md @@ -1,6 +1,6 @@ # Class: EthAddress -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/eth-address.d.cts:5 +Defined in: [core-sdk/src/bytes/eth-address.ts:7](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/eth-address.ts#L7) A 20-byte Ethereum address. @@ -14,7 +14,7 @@ A 20-byte Ethereum address. > **new EthAddress**(`bytes`): `EthAddress` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/eth-address.d.cts:7 +Defined in: [core-sdk/src/bytes/eth-address.ts:10](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/eth-address.ts#L10) #### Parameters @@ -36,7 +36,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/eth-address.d. > `readonly` **length**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 +Defined in: [core-sdk/src/bytes/bytes.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L19) #### Inherited from @@ -48,7 +48,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 > `readonly` `static` **LENGTH**: `20` = `20` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/eth-address.d.cts:6 +Defined in: [core-sdk/src/bytes/eth-address.ts:8](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/eth-address.ts#L8) ## Methods @@ -56,7 +56,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/eth-address.d. > **equals**(`other`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L166) Byte-wise equality against another Bytes instance, raw bytes, or hex string. @@ -80,7 +80,7 @@ Byte-wise equality against another Bytes instance, raw bytes, or hex string. > **offset**(`index`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:33 +Defined in: [core-sdk/src/bytes/bytes.ts:110](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L110) Returns a copy of the bytes from `index` to the end. @@ -104,7 +104,7 @@ Returns a copy of the bytes from `index` to the end. > **represent**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:69 +Defined in: [core-sdk/src/bytes/bytes.ts:173](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L173) Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes.md#tohex). @@ -122,7 +122,7 @@ Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes. > **toBase32**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:49 +Defined in: [core-sdk/src/bytes/bytes.ts:138](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L138) Encodes as a padded base32 string. @@ -140,7 +140,7 @@ Encodes as a padded base32 string. > **toBase64**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:45 +Defined in: [core-sdk/src/bytes/bytes.ts:131](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L131) Encodes as a padded base64 string. @@ -158,7 +158,7 @@ Encodes as a padded base64 string. > **toChecksum**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/eth-address.d.cts:11 +Defined in: [core-sdk/src/bytes/eth-address.ts:17](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/eth-address.ts#L17) EIP-55 checksum-cased hex representation (e.g. `0x5aAe...`). @@ -172,7 +172,7 @@ EIP-55 checksum-cased hex representation (e.g. `0x5aAe...`). > **toHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:41 +Defined in: [core-sdk/src/bytes/bytes.ts:124](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L124) Encodes as a lowercase hex string, with no `0x` prefix. @@ -190,7 +190,7 @@ Encodes as a lowercase hex string, with no `0x` prefix. > **toJSON**(): `unknown` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:61 +Defined in: [core-sdk/src/bytes/bytes.ts:159](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L159) Decodes the bytes as UTF-8 JSON. @@ -208,7 +208,7 @@ Decodes the bytes as UTF-8 JSON. > **toString**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:53 +Defined in: [core-sdk/src/bytes/bytes.ts:145](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L145) Same as [toHex](Bytes.md#tohex). @@ -226,7 +226,7 @@ Same as [toHex](Bytes.md#tohex). > **toUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:37 +Defined in: [core-sdk/src/bytes/bytes.ts:117](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L117) Returns a copy of the underlying bytes. @@ -244,7 +244,7 @@ Returns a copy of the underlying bytes. > **toUtf8**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:57 +Defined in: [core-sdk/src/bytes/bytes.ts:152](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L152) Decodes the bytes as UTF-8 text. @@ -262,7 +262,7 @@ Decodes the bytes as UTF-8 text. > `static` **concat**(...`arrays`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:20 +Defined in: [core-sdk/src/bytes/bytes.ts:75](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L75) Concatenates any number of byte arrays (or Bytes instances) into one new array. @@ -286,7 +286,7 @@ Concatenates any number of byte arrays (or Bytes instances) into one new array. > `static` **fromSlice**(`bytes`, `start`, `length?`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:29 +Defined in: [core-sdk/src/bytes/bytes.ts:100](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L100) Wraps a slice of `bytes` starting at `start`, running to the end unless `length` is given. @@ -319,7 +319,7 @@ Wraps a slice of `bytes` starting at `start`, running to the end unless > `static` **fromUtf8**(`utf8`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:24 +Defined in: [core-sdk/src/bytes/bytes.ts:92](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L92) Wraps the UTF-8 encoding of a string. @@ -343,7 +343,7 @@ Wraps the UTF-8 encoding of a string. > `static` **keccak256**(`bytes`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:16 +Defined in: [core-sdk/src/bytes/bytes.ts:68](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L68) Hashes `bytes` with keccak256 and wraps the 32-byte digest. diff --git a/docs/api/classes/FeedIndex.md b/docs/api/classes/FeedIndex.md index bdafa7ce..05320365 100644 --- a/docs/api/classes/FeedIndex.md +++ b/docs/api/classes/FeedIndex.md @@ -1,6 +1,6 @@ # Class: FeedIndex -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/feed-index.d.cts:5 +Defined in: [core-sdk/src/bytes/feed-index.ts:9](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/feed-index.ts#L9) An 8-byte, big-endian sequential feed update index. @@ -14,7 +14,7 @@ An 8-byte, big-endian sequential feed update index. > **new FeedIndex**(`bytes`): `FeedIndex` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/feed-index.d.cts:9 +Defined in: [core-sdk/src/bytes/feed-index.ts:14](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/feed-index.ts#L14) #### Parameters @@ -36,7 +36,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/feed-index.d.c > `readonly` **length**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 +Defined in: [core-sdk/src/bytes/bytes.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L19) #### Inherited from @@ -48,7 +48,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 > `readonly` `static` **LENGTH**: `8` = `8` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/feed-index.d.cts:6 +Defined in: [core-sdk/src/bytes/feed-index.ts:10](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/feed-index.ts#L10) *** @@ -56,7 +56,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/feed-index.d.c > `readonly` `static` **MINUS\_ONE**: `FeedIndex` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/feed-index.d.cts:8 +Defined in: [core-sdk/src/bytes/feed-index.ts:12](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/feed-index.ts#L12) Sentinel index (all bits set) some feed types use to mean "no update yet". @@ -66,7 +66,7 @@ Sentinel index (all bits set) some feed types use to mean "no update yet". > **equals**(`other`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L166) Byte-wise equality against another Bytes instance, raw bytes, or hex string. @@ -90,7 +90,7 @@ Byte-wise equality against another Bytes instance, raw bytes, or hex string. > **next**(): `FeedIndex` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/feed-index.d.cts:21 +Defined in: [core-sdk/src/bytes/feed-index.ts:35](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/feed-index.ts#L35) Returns the next sequential index, wrapping [MINUS\_ONE](#minus_one) back to 0. @@ -104,7 +104,7 @@ Returns the next sequential index, wrapping [MINUS\_ONE](#minus_one) back to 0. > **offset**(`index`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:33 +Defined in: [core-sdk/src/bytes/bytes.ts:110](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L110) Returns a copy of the bytes from `index` to the end. @@ -128,7 +128,7 @@ Returns a copy of the bytes from `index` to the end. > **represent**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:69 +Defined in: [core-sdk/src/bytes/bytes.ts:173](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L173) Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes.md#tohex). @@ -146,7 +146,7 @@ Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes. > **toBase32**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:49 +Defined in: [core-sdk/src/bytes/bytes.ts:138](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L138) Encodes as a padded base32 string. @@ -164,7 +164,7 @@ Encodes as a padded base32 string. > **toBase64**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:45 +Defined in: [core-sdk/src/bytes/bytes.ts:131](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L131) Encodes as a padded base64 string. @@ -182,7 +182,7 @@ Encodes as a padded base64 string. > **toBigInt**(): `bigint` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/feed-index.d.cts:17 +Defined in: [core-sdk/src/bytes/feed-index.ts:28](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/feed-index.ts#L28) Decodes the index as a bigint. @@ -196,7 +196,7 @@ Decodes the index as a bigint. > **toHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:41 +Defined in: [core-sdk/src/bytes/bytes.ts:124](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L124) Encodes as a lowercase hex string, with no `0x` prefix. @@ -214,7 +214,7 @@ Encodes as a lowercase hex string, with no `0x` prefix. > **toJSON**(): `unknown` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:61 +Defined in: [core-sdk/src/bytes/bytes.ts:159](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L159) Decodes the bytes as UTF-8 JSON. @@ -232,7 +232,7 @@ Decodes the bytes as UTF-8 JSON. > **toString**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:53 +Defined in: [core-sdk/src/bytes/bytes.ts:145](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L145) Same as [toHex](Bytes.md#tohex). @@ -250,7 +250,7 @@ Same as [toHex](Bytes.md#tohex). > **toUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:37 +Defined in: [core-sdk/src/bytes/bytes.ts:117](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L117) Returns a copy of the underlying bytes. @@ -268,7 +268,7 @@ Returns a copy of the underlying bytes. > **toUtf8**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:57 +Defined in: [core-sdk/src/bytes/bytes.ts:152](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L152) Decodes the bytes as UTF-8 text. @@ -286,7 +286,7 @@ Decodes the bytes as UTF-8 text. > `static` **concat**(...`arrays`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:20 +Defined in: [core-sdk/src/bytes/bytes.ts:75](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L75) Concatenates any number of byte arrays (or Bytes instances) into one new array. @@ -310,7 +310,7 @@ Concatenates any number of byte arrays (or Bytes instances) into one new array. > `static` **fromBigInt**(`value`): `FeedIndex` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/feed-index.d.cts:13 +Defined in: [core-sdk/src/bytes/feed-index.ts:21](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/feed-index.ts#L21) Encodes a bigint index as an 8-byte, big-endian FeedIndex. @@ -330,7 +330,7 @@ Encodes a bigint index as an 8-byte, big-endian FeedIndex. > `static` **fromSlice**(`bytes`, `start`, `length?`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:29 +Defined in: [core-sdk/src/bytes/bytes.ts:100](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L100) Wraps a slice of `bytes` starting at `start`, running to the end unless `length` is given. @@ -363,7 +363,7 @@ Wraps a slice of `bytes` starting at `start`, running to the end unless > `static` **fromUtf8**(`utf8`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:24 +Defined in: [core-sdk/src/bytes/bytes.ts:92](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L92) Wraps the UTF-8 encoding of a string. @@ -387,7 +387,7 @@ Wraps the UTF-8 encoding of a string. > `static` **keccak256**(`bytes`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:16 +Defined in: [core-sdk/src/bytes/bytes.ts:68](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L68) Hashes `bytes` with keccak256 and wraps the 32-byte digest. diff --git a/docs/api/classes/Identifier.md b/docs/api/classes/Identifier.md index de090041..05bc45ce 100644 --- a/docs/api/classes/Identifier.md +++ b/docs/api/classes/Identifier.md @@ -1,6 +1,6 @@ # Class: Identifier -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/identifier.d.cts:6 +Defined in: [core-sdk/src/bytes/identifier.ts:10](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/identifier.ts#L10) A 32-byte feed/SOC identifier - an arbitrary value selected by the uploader that, together with the owner's address, determines a single-owner chunk's address. @@ -15,7 +15,7 @@ that, together with the owner's address, determines a single-owner chunk's addre > **new Identifier**(`bytes`): `Identifier` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/identifier.d.cts:8 +Defined in: [core-sdk/src/bytes/identifier.ts:13](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/identifier.ts#L13) #### Parameters @@ -37,7 +37,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/identifier.d.c > `readonly` **length**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 +Defined in: [core-sdk/src/bytes/bytes.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L19) #### Inherited from @@ -49,7 +49,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 > `readonly` `static` **LENGTH**: `32` = `32` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/identifier.d.cts:7 +Defined in: [core-sdk/src/bytes/identifier.ts:11](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/identifier.ts#L11) ## Methods @@ -57,7 +57,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/identifier.d.c > **equals**(`other`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L166) Byte-wise equality against another Bytes instance, raw bytes, or hex string. @@ -81,7 +81,7 @@ Byte-wise equality against another Bytes instance, raw bytes, or hex string. > **offset**(`index`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:33 +Defined in: [core-sdk/src/bytes/bytes.ts:110](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L110) Returns a copy of the bytes from `index` to the end. @@ -105,7 +105,7 @@ Returns a copy of the bytes from `index` to the end. > **represent**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:69 +Defined in: [core-sdk/src/bytes/bytes.ts:173](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L173) Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes.md#tohex). @@ -123,7 +123,7 @@ Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes. > **toBase32**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:49 +Defined in: [core-sdk/src/bytes/bytes.ts:138](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L138) Encodes as a padded base32 string. @@ -141,7 +141,7 @@ Encodes as a padded base32 string. > **toBase64**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:45 +Defined in: [core-sdk/src/bytes/bytes.ts:131](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L131) Encodes as a padded base64 string. @@ -159,7 +159,7 @@ Encodes as a padded base64 string. > **toHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:41 +Defined in: [core-sdk/src/bytes/bytes.ts:124](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L124) Encodes as a lowercase hex string, with no `0x` prefix. @@ -177,7 +177,7 @@ Encodes as a lowercase hex string, with no `0x` prefix. > **toJSON**(): `unknown` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:61 +Defined in: [core-sdk/src/bytes/bytes.ts:159](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L159) Decodes the bytes as UTF-8 JSON. @@ -195,7 +195,7 @@ Decodes the bytes as UTF-8 JSON. > **toString**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:53 +Defined in: [core-sdk/src/bytes/bytes.ts:145](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L145) Same as [toHex](Bytes.md#tohex). @@ -213,7 +213,7 @@ Same as [toHex](Bytes.md#tohex). > **toUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:37 +Defined in: [core-sdk/src/bytes/bytes.ts:117](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L117) Returns a copy of the underlying bytes. @@ -231,7 +231,7 @@ Returns a copy of the underlying bytes. > **toUtf8**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:57 +Defined in: [core-sdk/src/bytes/bytes.ts:152](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L152) Decodes the bytes as UTF-8 text. @@ -249,7 +249,7 @@ Decodes the bytes as UTF-8 text. > `static` **concat**(...`arrays`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:20 +Defined in: [core-sdk/src/bytes/bytes.ts:75](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L75) Concatenates any number of byte arrays (or Bytes instances) into one new array. @@ -273,7 +273,7 @@ Concatenates any number of byte arrays (or Bytes instances) into one new array. > `static` **fromSlice**(`bytes`, `start`, `length?`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:29 +Defined in: [core-sdk/src/bytes/bytes.ts:100](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L100) Wraps a slice of `bytes` starting at `start`, running to the end unless `length` is given. @@ -306,7 +306,7 @@ Wraps a slice of `bytes` starting at `start`, running to the end unless > `static` **fromString**(`value`): `Identifier` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/identifier.d.cts:12 +Defined in: [core-sdk/src/bytes/identifier.ts:20](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/identifier.ts#L20) Derives an identifier by hashing an arbitrary string with keccak256. @@ -326,7 +326,7 @@ Derives an identifier by hashing an arbitrary string with keccak256. > `static` **fromUtf8**(`utf8`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:24 +Defined in: [core-sdk/src/bytes/bytes.ts:92](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L92) Wraps the UTF-8 encoding of a string. @@ -350,7 +350,7 @@ Wraps the UTF-8 encoding of a string. > `static` **keccak256**(`bytes`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:16 +Defined in: [core-sdk/src/bytes/bytes.ts:68](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L68) Hashes `bytes` with keccak256 and wraps the 32-byte digest. diff --git a/docs/api/classes/PeerAddress.md b/docs/api/classes/PeerAddress.md index 56f401d1..aca93d6a 100644 --- a/docs/api/classes/PeerAddress.md +++ b/docs/api/classes/PeerAddress.md @@ -1,6 +1,6 @@ # Class: PeerAddress -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/peer-address.d.cts:5 +Defined in: [core-sdk/src/bytes/peer-address.ts:6](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/peer-address.ts#L6) A 32-byte Swarm overlay (peer) address. @@ -14,7 +14,7 @@ A 32-byte Swarm overlay (peer) address. > **new PeerAddress**(`bytes`): `PeerAddress` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/peer-address.d.cts:7 +Defined in: [core-sdk/src/bytes/peer-address.ts:9](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/peer-address.ts#L9) #### Parameters @@ -36,7 +36,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/peer-address.d > `readonly` **length**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 +Defined in: [core-sdk/src/bytes/bytes.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L19) #### Inherited from @@ -48,7 +48,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 > `readonly` `static` **LENGTH**: `32` = `32` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/peer-address.d.cts:6 +Defined in: [core-sdk/src/bytes/peer-address.ts:7](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/peer-address.ts#L7) ## Methods @@ -56,7 +56,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/peer-address.d > **equals**(`other`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L166) Byte-wise equality against another Bytes instance, raw bytes, or hex string. @@ -80,7 +80,7 @@ Byte-wise equality against another Bytes instance, raw bytes, or hex string. > **offset**(`index`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:33 +Defined in: [core-sdk/src/bytes/bytes.ts:110](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L110) Returns a copy of the bytes from `index` to the end. @@ -104,7 +104,7 @@ Returns a copy of the bytes from `index` to the end. > **represent**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:69 +Defined in: [core-sdk/src/bytes/bytes.ts:173](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L173) Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes.md#tohex). @@ -122,7 +122,7 @@ Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes. > **toBase32**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:49 +Defined in: [core-sdk/src/bytes/bytes.ts:138](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L138) Encodes as a padded base32 string. @@ -140,7 +140,7 @@ Encodes as a padded base32 string. > **toBase64**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:45 +Defined in: [core-sdk/src/bytes/bytes.ts:131](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L131) Encodes as a padded base64 string. @@ -158,7 +158,7 @@ Encodes as a padded base64 string. > **toHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:41 +Defined in: [core-sdk/src/bytes/bytes.ts:124](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L124) Encodes as a lowercase hex string, with no `0x` prefix. @@ -176,7 +176,7 @@ Encodes as a lowercase hex string, with no `0x` prefix. > **toJSON**(): `unknown` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:61 +Defined in: [core-sdk/src/bytes/bytes.ts:159](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L159) Decodes the bytes as UTF-8 JSON. @@ -194,7 +194,7 @@ Decodes the bytes as UTF-8 JSON. > **toString**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:53 +Defined in: [core-sdk/src/bytes/bytes.ts:145](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L145) Same as [toHex](Bytes.md#tohex). @@ -212,7 +212,7 @@ Same as [toHex](Bytes.md#tohex). > **toUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:37 +Defined in: [core-sdk/src/bytes/bytes.ts:117](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L117) Returns a copy of the underlying bytes. @@ -230,7 +230,7 @@ Returns a copy of the underlying bytes. > **toUtf8**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:57 +Defined in: [core-sdk/src/bytes/bytes.ts:152](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L152) Decodes the bytes as UTF-8 text. @@ -248,7 +248,7 @@ Decodes the bytes as UTF-8 text. > `static` **concat**(...`arrays`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:20 +Defined in: [core-sdk/src/bytes/bytes.ts:75](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L75) Concatenates any number of byte arrays (or Bytes instances) into one new array. @@ -272,7 +272,7 @@ Concatenates any number of byte arrays (or Bytes instances) into one new array. > `static` **fromSlice**(`bytes`, `start`, `length?`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:29 +Defined in: [core-sdk/src/bytes/bytes.ts:100](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L100) Wraps a slice of `bytes` starting at `start`, running to the end unless `length` is given. @@ -305,7 +305,7 @@ Wraps a slice of `bytes` starting at `start`, running to the end unless > `static` **fromUtf8**(`utf8`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:24 +Defined in: [core-sdk/src/bytes/bytes.ts:92](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L92) Wraps the UTF-8 encoding of a string. @@ -329,7 +329,7 @@ Wraps the UTF-8 encoding of a string. > `static` **keccak256**(`bytes`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:16 +Defined in: [core-sdk/src/bytes/bytes.ts:68](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L68) Hashes `bytes` with keccak256 and wraps the 32-byte digest. diff --git a/docs/api/classes/PrivateKey.md b/docs/api/classes/PrivateKey.md index 25fde6fd..e3d1978c 100644 --- a/docs/api/classes/PrivateKey.md +++ b/docs/api/classes/PrivateKey.md @@ -1,6 +1,6 @@ # Class: PrivateKey -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/private-key.d.cts:7 +Defined in: [core-sdk/src/bytes/private-key.ts:11](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/private-key.ts#L11) A 32-byte secp256k1 private key. @@ -14,7 +14,7 @@ A 32-byte secp256k1 private key. > **new PrivateKey**(`bytes`): `PrivateKey` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/private-key.d.cts:9 +Defined in: [core-sdk/src/bytes/private-key.ts:14](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/private-key.ts#L14) #### Parameters @@ -36,7 +36,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/private-key.d. > `readonly` **length**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 +Defined in: [core-sdk/src/bytes/bytes.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L19) #### Inherited from @@ -48,7 +48,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 > `readonly` `static` **LENGTH**: `32` = `32` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/private-key.d.cts:8 +Defined in: [core-sdk/src/bytes/private-key.ts:12](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/private-key.ts#L12) ## Methods @@ -56,7 +56,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/private-key.d. > **equals**(`other`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L166) Byte-wise equality against another Bytes instance, raw bytes, or hex string. @@ -80,7 +80,7 @@ Byte-wise equality against another Bytes instance, raw bytes, or hex string. > **offset**(`index`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:33 +Defined in: [core-sdk/src/bytes/bytes.ts:110](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L110) Returns a copy of the bytes from `index` to the end. @@ -104,7 +104,7 @@ Returns a copy of the bytes from `index` to the end. > **publicKey**(): [`PublicKey`](PublicKey.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/private-key.d.cts:13 +Defined in: [core-sdk/src/bytes/private-key.ts:21](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/private-key.ts#L21) Derives the corresponding (uncompressed) public key. @@ -118,7 +118,7 @@ Derives the corresponding (uncompressed) public key. > **represent**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:69 +Defined in: [core-sdk/src/bytes/bytes.ts:173](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L173) Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes.md#tohex). @@ -136,7 +136,7 @@ Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes. > **sign**(`data`): [`Signature`](Signature.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/private-key.d.cts:18 +Defined in: [core-sdk/src/bytes/private-key.ts:31](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/private-key.ts#L31) Signs `data` following Ethereum's personal_sign convention (signs keccak256("\x19Ethereum Signed Message:\n32" || keccak256(data))). @@ -157,7 +157,7 @@ keccak256("\x19Ethereum Signed Message:\n32" || keccak256(data))). > **toBase32**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:49 +Defined in: [core-sdk/src/bytes/bytes.ts:138](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L138) Encodes as a padded base32 string. @@ -175,7 +175,7 @@ Encodes as a padded base32 string. > **toBase64**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:45 +Defined in: [core-sdk/src/bytes/bytes.ts:131](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L131) Encodes as a padded base64 string. @@ -193,7 +193,7 @@ Encodes as a padded base64 string. > **toBigInt**(): `bigint` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/private-key.d.cts:22 +Defined in: [core-sdk/src/bytes/private-key.ts:40](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/private-key.ts#L40) Decodes the private key as a bigint scalar, for use in ECDSA operations. @@ -207,7 +207,7 @@ Decodes the private key as a bigint scalar, for use in ECDSA operations. > **toHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:41 +Defined in: [core-sdk/src/bytes/bytes.ts:124](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L124) Encodes as a lowercase hex string, with no `0x` prefix. @@ -225,7 +225,7 @@ Encodes as a lowercase hex string, with no `0x` prefix. > **toJSON**(): `unknown` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:61 +Defined in: [core-sdk/src/bytes/bytes.ts:159](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L159) Decodes the bytes as UTF-8 JSON. @@ -243,7 +243,7 @@ Decodes the bytes as UTF-8 JSON. > **toString**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:53 +Defined in: [core-sdk/src/bytes/bytes.ts:145](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L145) Same as [toHex](Bytes.md#tohex). @@ -261,7 +261,7 @@ Same as [toHex](Bytes.md#tohex). > **toUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:37 +Defined in: [core-sdk/src/bytes/bytes.ts:117](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L117) Returns a copy of the underlying bytes. @@ -279,7 +279,7 @@ Returns a copy of the underlying bytes. > **toUtf8**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:57 +Defined in: [core-sdk/src/bytes/bytes.ts:152](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L152) Decodes the bytes as UTF-8 text. @@ -297,7 +297,7 @@ Decodes the bytes as UTF-8 text. > `static` **concat**(...`arrays`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:20 +Defined in: [core-sdk/src/bytes/bytes.ts:75](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L75) Concatenates any number of byte arrays (or Bytes instances) into one new array. @@ -321,7 +321,7 @@ Concatenates any number of byte arrays (or Bytes instances) into one new array. > `static` **fromSlice**(`bytes`, `start`, `length?`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:29 +Defined in: [core-sdk/src/bytes/bytes.ts:100](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L100) Wraps a slice of `bytes` starting at `start`, running to the end unless `length` is given. @@ -354,7 +354,7 @@ Wraps a slice of `bytes` starting at `start`, running to the end unless > `static` **fromUtf8**(`utf8`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:24 +Defined in: [core-sdk/src/bytes/bytes.ts:92](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L92) Wraps the UTF-8 encoding of a string. @@ -378,7 +378,7 @@ Wraps the UTF-8 encoding of a string. > `static` **keccak256**(`bytes`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:16 +Defined in: [core-sdk/src/bytes/bytes.ts:68](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L68) Hashes `bytes` with keccak256 and wraps the 32-byte digest. diff --git a/docs/api/classes/PublicKey.md b/docs/api/classes/PublicKey.md index c2d4fabe..88217212 100644 --- a/docs/api/classes/PublicKey.md +++ b/docs/api/classes/PublicKey.md @@ -1,6 +1,6 @@ # Class: PublicKey -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/public-key.d.cts:7 +Defined in: [core-sdk/src/bytes/public-key.ts:10](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/public-key.ts#L10) A secp256k1 public key, stored uncompressed (64 bytes: x || y). Also accepts a 33-byte compressed key, decompressing it in the constructor. @@ -15,7 +15,7 @@ accepts a 33-byte compressed key, decompressing it in the constructor. > **new PublicKey**(`bytes`): `PublicKey` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/public-key.d.cts:9 +Defined in: [core-sdk/src/bytes/public-key.ts:13](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/public-key.ts#L13) #### Parameters @@ -37,7 +37,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/public-key.d.c > `readonly` **length**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 +Defined in: [core-sdk/src/bytes/bytes.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L19) #### Inherited from @@ -49,7 +49,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 > `readonly` `static` **LENGTH**: `64` = `64` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/public-key.d.cts:8 +Defined in: [core-sdk/src/bytes/public-key.ts:11](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/public-key.ts#L11) ## Methods @@ -57,7 +57,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/public-key.d.c > **address**(): [`EthAddress`](EthAddress.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/public-key.d.cts:14 +Defined in: [core-sdk/src/bytes/public-key.ts:28](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/public-key.ts#L28) Derives the corresponding Ethereum address (keccak256 of the uncompressed key, last 20 bytes). @@ -72,7 +72,7 @@ uncompressed key, last 20 bytes). > **equals**(`other`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L166) Byte-wise equality against another Bytes instance, raw bytes, or hex string. @@ -96,7 +96,7 @@ Byte-wise equality against another Bytes instance, raw bytes, or hex string. > **offset**(`index`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:33 +Defined in: [core-sdk/src/bytes/bytes.ts:110](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L110) Returns a copy of the bytes from `index` to the end. @@ -120,7 +120,7 @@ Returns a copy of the bytes from `index` to the end. > **represent**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:69 +Defined in: [core-sdk/src/bytes/bytes.ts:173](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L173) Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes.md#tohex). @@ -138,7 +138,7 @@ Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes. > **toBase32**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:49 +Defined in: [core-sdk/src/bytes/bytes.ts:138](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L138) Encodes as a padded base32 string. @@ -156,7 +156,7 @@ Encodes as a padded base32 string. > **toBase64**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:45 +Defined in: [core-sdk/src/bytes/bytes.ts:131](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L131) Encodes as a padded base64 string. @@ -174,7 +174,7 @@ Encodes as a padded base64 string. > **toCompressedHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/public-key.d.cts:22 +Defined in: [core-sdk/src/bytes/public-key.ts:48](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/public-key.ts#L48) Hex encoding of [toCompressedUint8Array](#tocompresseduint8array). @@ -188,7 +188,7 @@ Hex encoding of [toCompressedUint8Array](#tocompresseduint8array). > **toCompressedUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/public-key.d.cts:18 +Defined in: [core-sdk/src/bytes/public-key.ts:38](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/public-key.ts#L38) Encodes as a 33-byte compressed key (0x02/0x03 prefix || x). @@ -202,7 +202,7 @@ Encodes as a 33-byte compressed key (0x02/0x03 prefix || x). > **toHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:41 +Defined in: [core-sdk/src/bytes/bytes.ts:124](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L124) Encodes as a lowercase hex string, with no `0x` prefix. @@ -220,7 +220,7 @@ Encodes as a lowercase hex string, with no `0x` prefix. > **toJSON**(): `unknown` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:61 +Defined in: [core-sdk/src/bytes/bytes.ts:159](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L159) Decodes the bytes as UTF-8 JSON. @@ -238,7 +238,7 @@ Decodes the bytes as UTF-8 JSON. > **toString**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:53 +Defined in: [core-sdk/src/bytes/bytes.ts:145](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L145) Same as [toHex](Bytes.md#tohex). @@ -256,7 +256,7 @@ Same as [toHex](Bytes.md#tohex). > **toUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:37 +Defined in: [core-sdk/src/bytes/bytes.ts:117](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L117) Returns a copy of the underlying bytes. @@ -274,7 +274,7 @@ Returns a copy of the underlying bytes. > **toUtf8**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:57 +Defined in: [core-sdk/src/bytes/bytes.ts:152](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L152) Decodes the bytes as UTF-8 text. @@ -292,7 +292,7 @@ Decodes the bytes as UTF-8 text. > `static` **concat**(...`arrays`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:20 +Defined in: [core-sdk/src/bytes/bytes.ts:75](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L75) Concatenates any number of byte arrays (or Bytes instances) into one new array. @@ -316,7 +316,7 @@ Concatenates any number of byte arrays (or Bytes instances) into one new array. > `static` **fromSlice**(`bytes`, `start`, `length?`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:29 +Defined in: [core-sdk/src/bytes/bytes.ts:100](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L100) Wraps a slice of `bytes` starting at `start`, running to the end unless `length` is given. @@ -349,7 +349,7 @@ Wraps a slice of `bytes` starting at `start`, running to the end unless > `static` **fromUtf8**(`utf8`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:24 +Defined in: [core-sdk/src/bytes/bytes.ts:92](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L92) Wraps the UTF-8 encoding of a string. @@ -373,7 +373,7 @@ Wraps the UTF-8 encoding of a string. > `static` **keccak256**(`bytes`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:16 +Defined in: [core-sdk/src/bytes/bytes.ts:68](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L68) Hashes `bytes` with keccak256 and wraps the 32-byte digest. diff --git a/docs/api/classes/Reference.md b/docs/api/classes/Reference.md index 7b38edce..a47a46be 100644 --- a/docs/api/classes/Reference.md +++ b/docs/api/classes/Reference.md @@ -1,6 +1,6 @@ # Class: Reference -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/reference.d.cts:7 +Defined in: [core-sdk/src/bytes/reference.ts:27](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/reference.ts#L27) A Swarm chunk/manifest reference: 32 bytes for an unencrypted address, or 64 bytes (address || decryption key) for an encrypted one. Also accepts a @@ -16,7 +16,7 @@ A Swarm chunk/manifest reference: 32 bytes for an unencrypted address, or > **new Reference**(`bytes`): `Reference` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/reference.d.cts:9 +Defined in: [core-sdk/src/bytes/reference.ts:30](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/reference.ts#L30) #### Parameters @@ -38,7 +38,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/reference.d.ct > `readonly` **length**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 +Defined in: [core-sdk/src/bytes/bytes.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L19) #### Inherited from @@ -50,7 +50,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 > `readonly` `static` **LENGTH**: `32` = `32` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/reference.d.cts:8 +Defined in: [core-sdk/src/bytes/reference.ts:28](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/reference.ts#L28) ## Methods @@ -58,7 +58,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/reference.d.ct > **equals**(`other`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L166) Byte-wise equality against another Bytes instance, raw bytes, or hex string. @@ -82,7 +82,7 @@ Byte-wise equality against another Bytes instance, raw bytes, or hex string. > **offset**(`index`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:33 +Defined in: [core-sdk/src/bytes/bytes.ts:110](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L110) Returns a copy of the bytes from `index` to the end. @@ -106,7 +106,7 @@ Returns a copy of the bytes from `index` to the end. > **represent**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:69 +Defined in: [core-sdk/src/bytes/bytes.ts:173](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L173) Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes.md#tohex). @@ -124,7 +124,7 @@ Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes. > **toBase32**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:49 +Defined in: [core-sdk/src/bytes/bytes.ts:138](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L138) Encodes as a padded base32 string. @@ -142,7 +142,7 @@ Encodes as a padded base32 string. > **toBase64**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:45 +Defined in: [core-sdk/src/bytes/bytes.ts:131](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L131) Encodes as a padded base64 string. @@ -160,7 +160,7 @@ Encodes as a padded base64 string. > **toCid**(`type`): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/reference.d.cts:13 +Defined in: [core-sdk/src/bytes/reference.ts:41](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/reference.ts#L41) Encodes the reference as a `"bah5..."` CID string of the given type. @@ -180,7 +180,7 @@ Encodes the reference as a `"bah5..."` CID string of the given type. > **toHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:41 +Defined in: [core-sdk/src/bytes/bytes.ts:124](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L124) Encodes as a lowercase hex string, with no `0x` prefix. @@ -198,7 +198,7 @@ Encodes as a lowercase hex string, with no `0x` prefix. > **toJSON**(): `unknown` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:61 +Defined in: [core-sdk/src/bytes/bytes.ts:159](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L159) Decodes the bytes as UTF-8 JSON. @@ -216,7 +216,7 @@ Decodes the bytes as UTF-8 JSON. > **toString**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:53 +Defined in: [core-sdk/src/bytes/bytes.ts:145](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L145) Same as [toHex](Bytes.md#tohex). @@ -234,7 +234,7 @@ Same as [toHex](Bytes.md#tohex). > **toUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:37 +Defined in: [core-sdk/src/bytes/bytes.ts:117](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L117) Returns a copy of the underlying bytes. @@ -252,7 +252,7 @@ Returns a copy of the underlying bytes. > **toUtf8**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:57 +Defined in: [core-sdk/src/bytes/bytes.ts:152](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L152) Decodes the bytes as UTF-8 text. @@ -270,7 +270,7 @@ Decodes the bytes as UTF-8 text. > `static` **concat**(...`arrays`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:20 +Defined in: [core-sdk/src/bytes/bytes.ts:75](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L75) Concatenates any number of byte arrays (or Bytes instances) into one new array. @@ -294,7 +294,7 @@ Concatenates any number of byte arrays (or Bytes instances) into one new array. > `static` **fromSlice**(`bytes`, `start`, `length?`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:29 +Defined in: [core-sdk/src/bytes/bytes.ts:100](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L100) Wraps a slice of `bytes` starting at `start`, running to the end unless `length` is given. @@ -327,7 +327,7 @@ Wraps a slice of `bytes` starting at `start`, running to the end unless > `static` **fromUtf8**(`utf8`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:24 +Defined in: [core-sdk/src/bytes/bytes.ts:92](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L92) Wraps the UTF-8 encoding of a string. @@ -351,7 +351,7 @@ Wraps the UTF-8 encoding of a string. > `static` **isValid**(`value`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/reference.d.cts:18 +Defined in: [core-sdk/src/bytes/reference.ts:57](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/reference.ts#L57) Returns whether `value` parses as a valid Reference (raw hex, 32/64-byte bytes, or a `"bah5..."` CID string). @@ -372,7 +372,7 @@ bytes, or a `"bah5..."` CID string). > `static` **keccak256**(`bytes`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:16 +Defined in: [core-sdk/src/bytes/bytes.ts:68](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L68) Hashes `bytes` with keccak256 and wraps the 32-byte digest. diff --git a/docs/api/classes/Signature.md b/docs/api/classes/Signature.md index b7a7dbd2..6d7f170f 100644 --- a/docs/api/classes/Signature.md +++ b/docs/api/classes/Signature.md @@ -1,6 +1,6 @@ # Class: Signature -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/signature.d.cts:14 +Defined in: [core-sdk/src/bytes/signature.ts:26](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/signature.ts#L26) A 65-byte ECDSA signature (r || s || v), as produced by [PrivateKey.sign](PrivateKey.md#sign). @@ -14,7 +14,7 @@ A 65-byte ECDSA signature (r || s || v), as produced by [PrivateKey.sign](Privat > **new Signature**(`bytes`): `Signature` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/signature.d.cts:16 +Defined in: [core-sdk/src/bytes/signature.ts:29](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/signature.ts#L29) #### Parameters @@ -36,7 +36,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/signature.d.ct > `readonly` **length**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 +Defined in: [core-sdk/src/bytes/bytes.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L19) #### Inherited from @@ -48,7 +48,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 > `readonly` `static` **LENGTH**: `65` = `65` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/signature.d.cts:15 +Defined in: [core-sdk/src/bytes/signature.ts:27](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/signature.ts#L27) ## Methods @@ -56,7 +56,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/signature.d.ct > **equals**(`other`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L166) Byte-wise equality against another Bytes instance, raw bytes, or hex string. @@ -80,7 +80,7 @@ Byte-wise equality against another Bytes instance, raw bytes, or hex string. > **isValid**(`digest`, `expectedAddress`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/signature.d.cts:30 +Defined in: [core-sdk/src/bytes/signature.ts:57](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/signature.ts#L57) Returns whether this signature over `digest` was produced by the owner of `expectedAddress`. @@ -105,7 +105,7 @@ of `expectedAddress`. > **offset**(`index`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:33 +Defined in: [core-sdk/src/bytes/bytes.ts:110](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L110) Returns a copy of the bytes from `index` to the end. @@ -129,7 +129,7 @@ Returns a copy of the bytes from `index` to the end. > **recoverPublicKey**(`digest`): [`PublicKey`](PublicKey.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/signature.d.cts:25 +Defined in: [core-sdk/src/bytes/signature.ts:44](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/signature.ts#L44) Recovers the public key that produced this signature over `digest`, following the same personal_sign convention as [PrivateKey.sign](PrivateKey.md#sign). @@ -150,7 +150,7 @@ following the same personal_sign convention as [PrivateKey.sign](PrivateKey.md#s > **represent**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:69 +Defined in: [core-sdk/src/bytes/bytes.ts:173](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L173) Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes.md#tohex). @@ -168,7 +168,7 @@ Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes. > **toBase32**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:49 +Defined in: [core-sdk/src/bytes/bytes.ts:138](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L138) Encodes as a padded base32 string. @@ -186,7 +186,7 @@ Encodes as a padded base32 string. > **toBase64**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:45 +Defined in: [core-sdk/src/bytes/bytes.ts:131](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L131) Encodes as a padded base64 string. @@ -204,7 +204,7 @@ Encodes as a padded base64 string. > **toHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:41 +Defined in: [core-sdk/src/bytes/bytes.ts:124](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L124) Encodes as a lowercase hex string, with no `0x` prefix. @@ -222,7 +222,7 @@ Encodes as a lowercase hex string, with no `0x` prefix. > **toJSON**(): `unknown` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:61 +Defined in: [core-sdk/src/bytes/bytes.ts:159](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L159) Decodes the bytes as UTF-8 JSON. @@ -240,7 +240,7 @@ Decodes the bytes as UTF-8 JSON. > **toString**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:53 +Defined in: [core-sdk/src/bytes/bytes.ts:145](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L145) Same as [toHex](Bytes.md#tohex). @@ -258,7 +258,7 @@ Same as [toHex](Bytes.md#tohex). > **toUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:37 +Defined in: [core-sdk/src/bytes/bytes.ts:117](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L117) Returns a copy of the underlying bytes. @@ -276,7 +276,7 @@ Returns a copy of the underlying bytes. > **toUtf8**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:57 +Defined in: [core-sdk/src/bytes/bytes.ts:152](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L152) Decodes the bytes as UTF-8 text. @@ -294,7 +294,7 @@ Decodes the bytes as UTF-8 text. > `static` **concat**(...`arrays`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:20 +Defined in: [core-sdk/src/bytes/bytes.ts:75](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L75) Concatenates any number of byte arrays (or Bytes instances) into one new array. @@ -318,7 +318,7 @@ Concatenates any number of byte arrays (or Bytes instances) into one new array. > `static` **fromSlice**(`bytes`, `start`): `Signature` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/signature.d.cts:20 +Defined in: [core-sdk/src/bytes/signature.ts:36](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/signature.ts#L36) Reads a 65-byte Signature out of a larger buffer, starting at `start`. @@ -346,7 +346,7 @@ Reads a 65-byte Signature out of a larger buffer, starting at `start`. > `static` **fromUtf8**(`utf8`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:24 +Defined in: [core-sdk/src/bytes/bytes.ts:92](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L92) Wraps the UTF-8 encoding of a string. @@ -370,7 +370,7 @@ Wraps the UTF-8 encoding of a string. > `static` **keccak256**(`bytes`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:16 +Defined in: [core-sdk/src/bytes/bytes.ts:68](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L68) Hashes `bytes` with keccak256 and wraps the 32-byte digest. diff --git a/docs/api/classes/Span.md b/docs/api/classes/Span.md index 9ebc8aa3..9b74962c 100644 --- a/docs/api/classes/Span.md +++ b/docs/api/classes/Span.md @@ -1,6 +1,6 @@ # Class: Span -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/span.d.cts:5 +Defined in: [core-sdk/src/bytes/span.ts:7](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/span.ts#L7) An 8-byte, little-endian span - the byte count prefixing a chunk's payload. @@ -14,7 +14,7 @@ An 8-byte, little-endian span - the byte count prefixing a chunk's payload. > **new Span**(`bytes`): `Span` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/span.d.cts:7 +Defined in: [core-sdk/src/bytes/span.ts:10](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/span.ts#L10) #### Parameters @@ -36,7 +36,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/span.d.cts:7 > `readonly` **length**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 +Defined in: [core-sdk/src/bytes/bytes.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L19) #### Inherited from @@ -48,7 +48,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 > `readonly` `static` **LENGTH**: `8` = `8` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/span.d.cts:6 +Defined in: [core-sdk/src/bytes/span.ts:8](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/span.ts#L8) ## Methods @@ -56,7 +56,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/span.d.cts:6 > **equals**(`other`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L166) Byte-wise equality against another Bytes instance, raw bytes, or hex string. @@ -80,7 +80,7 @@ Byte-wise equality against another Bytes instance, raw bytes, or hex string. > **offset**(`index`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:33 +Defined in: [core-sdk/src/bytes/bytes.ts:110](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L110) Returns a copy of the bytes from `index` to the end. @@ -104,7 +104,7 @@ Returns a copy of the bytes from `index` to the end. > **represent**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:69 +Defined in: [core-sdk/src/bytes/bytes.ts:173](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L173) Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes.md#tohex). @@ -122,7 +122,7 @@ Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes. > **toBase32**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:49 +Defined in: [core-sdk/src/bytes/bytes.ts:138](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L138) Encodes as a padded base32 string. @@ -140,7 +140,7 @@ Encodes as a padded base32 string. > **toBase64**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:45 +Defined in: [core-sdk/src/bytes/bytes.ts:131](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L131) Encodes as a padded base64 string. @@ -158,7 +158,7 @@ Encodes as a padded base64 string. > **toBigInt**(): `bigint` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/span.d.cts:15 +Defined in: [core-sdk/src/bytes/span.ts:24](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/span.ts#L24) Decodes the span as a bigint byte count. @@ -172,7 +172,7 @@ Decodes the span as a bigint byte count. > **toHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:41 +Defined in: [core-sdk/src/bytes/bytes.ts:124](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L124) Encodes as a lowercase hex string, with no `0x` prefix. @@ -190,7 +190,7 @@ Encodes as a lowercase hex string, with no `0x` prefix. > **toJSON**(): `unknown` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:61 +Defined in: [core-sdk/src/bytes/bytes.ts:159](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L159) Decodes the bytes as UTF-8 JSON. @@ -208,7 +208,7 @@ Decodes the bytes as UTF-8 JSON. > **toString**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:53 +Defined in: [core-sdk/src/bytes/bytes.ts:145](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L145) Same as [toHex](Bytes.md#tohex). @@ -226,7 +226,7 @@ Same as [toHex](Bytes.md#tohex). > **toUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:37 +Defined in: [core-sdk/src/bytes/bytes.ts:117](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L117) Returns a copy of the underlying bytes. @@ -244,7 +244,7 @@ Returns a copy of the underlying bytes. > **toUtf8**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:57 +Defined in: [core-sdk/src/bytes/bytes.ts:152](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L152) Decodes the bytes as UTF-8 text. @@ -262,7 +262,7 @@ Decodes the bytes as UTF-8 text. > `static` **concat**(...`arrays`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:20 +Defined in: [core-sdk/src/bytes/bytes.ts:75](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L75) Concatenates any number of byte arrays (or Bytes instances) into one new array. @@ -286,7 +286,7 @@ Concatenates any number of byte arrays (or Bytes instances) into one new array. > `static` **fromBigInt**(`value`): `Span` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/span.d.cts:11 +Defined in: [core-sdk/src/bytes/span.ts:17](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/span.ts#L17) Encodes a bigint byte count as an 8-byte, little-endian Span. @@ -306,7 +306,7 @@ Encodes a bigint byte count as an 8-byte, little-endian Span. > `static` **fromSlice**(`bytes`, `start`): `Span` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/span.d.cts:19 +Defined in: [core-sdk/src/bytes/span.ts:31](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/span.ts#L31) Reads an 8-byte Span out of a larger buffer, starting at `start`. @@ -334,7 +334,7 @@ Reads an 8-byte Span out of a larger buffer, starting at `start`. > `static` **fromUtf8**(`utf8`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:24 +Defined in: [core-sdk/src/bytes/bytes.ts:92](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L92) Wraps the UTF-8 encoding of a string. @@ -358,7 +358,7 @@ Wraps the UTF-8 encoding of a string. > `static` **keccak256**(`bytes`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:16 +Defined in: [core-sdk/src/bytes/bytes.ts:68](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L68) Hashes `bytes` with keccak256 and wraps the 32-byte digest. diff --git a/docs/api/classes/Stamper.md b/docs/api/classes/Stamper.md index de939282..2749fb76 100644 --- a/docs/api/classes/Stamper.md +++ b/docs/api/classes/Stamper.md @@ -1,6 +1,6 @@ # Class: Stamper -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.cts:17 +Defined in: [core-sdk/src/stamper/stamper.ts:43](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/stamper.ts#L43) Stateful postage stamp issuer: tracks how many chunks have been stamped into each of the batch's 65536 buckets, so each chunk gets a distinct, @@ -12,7 +12,7 @@ capacity-respecting index without the caller managing that bookkeeping. > **batchId**: [`BatchId`](BatchId.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.cts:19 +Defined in: [core-sdk/src/stamper/stamper.ts:45](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/stamper.ts#L45) *** @@ -20,7 +20,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.ct > **buckets**: `Uint32Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.cts:20 +Defined in: [core-sdk/src/stamper/stamper.ts:46](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/stamper.ts#L46) *** @@ -28,7 +28,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.ct > **depth**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.cts:21 +Defined in: [core-sdk/src/stamper/stamper.ts:47](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/stamper.ts#L47) *** @@ -36,7 +36,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.ct > **maxSlot**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.cts:22 +Defined in: [core-sdk/src/stamper/stamper.ts:48](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/stamper.ts#L48) *** @@ -44,7 +44,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.ct > **signer**: [`PrivateKey`](PrivateKey.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.cts:18 +Defined in: [core-sdk/src/stamper/stamper.ts:44](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/stamper.ts#L44) ## Methods @@ -52,7 +52,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.ct > **getState**(): `Uint32Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.cts:41 +Defined in: [core-sdk/src/stamper/stamper.ts:102](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/stamper.ts#L102) Returns the live bucket-height state, for persisting and later resuming via [fromState](#fromstate). @@ -67,7 +67,7 @@ via [fromState](#fromstate). > **stamp**(`address`, `timestampMs?`): [`EnvelopeWithBatchId`](../interfaces/EnvelopeWithBatchId.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.cts:36 +Defined in: [core-sdk/src/stamper/stamper.ts:85](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/stamper.ts#L85) Stamps a chunk address, automatically picking and reserving the next free slot in its bucket. Throws once a bucket reaches its depth-derived capacity. @@ -92,7 +92,7 @@ free slot in its bucket. Throws once a bucket reaches its depth-derived capacity > `static` **fromBlank**(`signer`, `batchId`, `depth`): `Stamper` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.cts:27 +Defined in: [core-sdk/src/stamper/stamper.ts:61](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/stamper.ts#L61) Creates a fresh Stamper for a batch with no chunks stamped yet. @@ -120,7 +120,7 @@ Creates a fresh Stamper for a batch with no chunks stamped yet. > `static` **fromState**(`signer`, `batchId`, `buckets`, `depth`): `Stamper` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/stamper.d.cts:31 +Defined in: [core-sdk/src/stamper/stamper.ts:72](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/stamper.ts#L72) Resumes a Stamper from a previously persisted bucket state (see [getState](#getstate)). diff --git a/docs/api/classes/Topic.md b/docs/api/classes/Topic.md index 49f2615f..8844ced3 100644 --- a/docs/api/classes/Topic.md +++ b/docs/api/classes/Topic.md @@ -1,6 +1,6 @@ # Class: Topic -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/topic.d.cts:5 +Defined in: [core-sdk/src/bytes/topic.ts:9](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/topic.ts#L9) A 32-byte feed topic - identifies a feed stream, independent of its owner. @@ -14,7 +14,7 @@ A 32-byte feed topic - identifies a feed stream, independent of its owner. > **new Topic**(`bytes`): `Topic` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/topic.d.cts:7 +Defined in: [core-sdk/src/bytes/topic.ts:12](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/topic.ts#L12) #### Parameters @@ -36,7 +36,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/topic.d.cts:7 > `readonly` **length**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 +Defined in: [core-sdk/src/bytes/bytes.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L19) #### Inherited from @@ -48,7 +48,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 > `readonly` `static` **LENGTH**: `32` = `32` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/topic.d.cts:6 +Defined in: [core-sdk/src/bytes/topic.ts:10](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/topic.ts#L10) ## Methods @@ -56,7 +56,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/topic.d.cts:6 > **equals**(`other`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L166) Byte-wise equality against another Bytes instance, raw bytes, or hex string. @@ -80,7 +80,7 @@ Byte-wise equality against another Bytes instance, raw bytes, or hex string. > **offset**(`index`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:33 +Defined in: [core-sdk/src/bytes/bytes.ts:110](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L110) Returns a copy of the bytes from `index` to the end. @@ -104,7 +104,7 @@ Returns a copy of the bytes from `index` to the end. > **represent**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:69 +Defined in: [core-sdk/src/bytes/bytes.ts:173](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L173) Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes.md#tohex). @@ -122,7 +122,7 @@ Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes. > **toBase32**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:49 +Defined in: [core-sdk/src/bytes/bytes.ts:138](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L138) Encodes as a padded base32 string. @@ -140,7 +140,7 @@ Encodes as a padded base32 string. > **toBase64**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:45 +Defined in: [core-sdk/src/bytes/bytes.ts:131](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L131) Encodes as a padded base64 string. @@ -158,7 +158,7 @@ Encodes as a padded base64 string. > **toHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:41 +Defined in: [core-sdk/src/bytes/bytes.ts:124](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L124) Encodes as a lowercase hex string, with no `0x` prefix. @@ -176,7 +176,7 @@ Encodes as a lowercase hex string, with no `0x` prefix. > **toJSON**(): `unknown` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:61 +Defined in: [core-sdk/src/bytes/bytes.ts:159](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L159) Decodes the bytes as UTF-8 JSON. @@ -194,7 +194,7 @@ Decodes the bytes as UTF-8 JSON. > **toString**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:53 +Defined in: [core-sdk/src/bytes/bytes.ts:145](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L145) Same as [toHex](Bytes.md#tohex). @@ -212,7 +212,7 @@ Same as [toHex](Bytes.md#tohex). > **toUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:37 +Defined in: [core-sdk/src/bytes/bytes.ts:117](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L117) Returns a copy of the underlying bytes. @@ -230,7 +230,7 @@ Returns a copy of the underlying bytes. > **toUtf8**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:57 +Defined in: [core-sdk/src/bytes/bytes.ts:152](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L152) Decodes the bytes as UTF-8 text. @@ -248,7 +248,7 @@ Decodes the bytes as UTF-8 text. > `static` **concat**(...`arrays`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:20 +Defined in: [core-sdk/src/bytes/bytes.ts:75](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L75) Concatenates any number of byte arrays (or Bytes instances) into one new array. @@ -272,7 +272,7 @@ Concatenates any number of byte arrays (or Bytes instances) into one new array. > `static` **fromSlice**(`bytes`, `start`, `length?`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:29 +Defined in: [core-sdk/src/bytes/bytes.ts:100](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L100) Wraps a slice of `bytes` starting at `start`, running to the end unless `length` is given. @@ -305,7 +305,7 @@ Wraps a slice of `bytes` starting at `start`, running to the end unless > `static` **fromString**(`value`): `Topic` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/topic.d.cts:11 +Defined in: [core-sdk/src/bytes/topic.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/topic.ts#L19) Derives a topic by hashing an arbitrary string with keccak256. @@ -325,7 +325,7 @@ Derives a topic by hashing an arbitrary string with keccak256. > `static` **fromUtf8**(`utf8`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:24 +Defined in: [core-sdk/src/bytes/bytes.ts:92](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L92) Wraps the UTF-8 encoding of a string. @@ -349,7 +349,7 @@ Wraps the UTF-8 encoding of a string. > `static` **keccak256**(`bytes`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:16 +Defined in: [core-sdk/src/bytes/bytes.ts:68](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L68) Hashes `bytes` with keccak256 and wraps the 32-byte digest. diff --git a/docs/api/classes/TransactionId.md b/docs/api/classes/TransactionId.md index 6436e0df..58072409 100644 --- a/docs/api/classes/TransactionId.md +++ b/docs/api/classes/TransactionId.md @@ -1,6 +1,6 @@ # Class: TransactionId -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/transaction-id.d.cts:5 +Defined in: [core-sdk/src/bytes/transaction-id.ts:6](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/transaction-id.ts#L6) A 32-byte blockchain transaction hash. @@ -14,7 +14,7 @@ A 32-byte blockchain transaction hash. > **new TransactionId**(`bytes`): `TransactionId` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/transaction-id.d.cts:7 +Defined in: [core-sdk/src/bytes/transaction-id.ts:9](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/transaction-id.ts#L9) #### Parameters @@ -36,7 +36,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/transaction-id > `readonly` **length**: `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 +Defined in: [core-sdk/src/bytes/bytes.ts:19](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L19) #### Inherited from @@ -48,7 +48,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:7 > `readonly` `static` **LENGTH**: `32` = `32` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/transaction-id.d.cts:6 +Defined in: [core-sdk/src/bytes/transaction-id.ts:7](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/transaction-id.ts#L7) ## Methods @@ -56,7 +56,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/transaction-id > **equals**(`other`): `boolean` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L166) Byte-wise equality against another Bytes instance, raw bytes, or hex string. @@ -80,7 +80,7 @@ Byte-wise equality against another Bytes instance, raw bytes, or hex string. > **offset**(`index`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:33 +Defined in: [core-sdk/src/bytes/bytes.ts:110](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L110) Returns a copy of the bytes from `index` to the end. @@ -104,7 +104,7 @@ Returns a copy of the bytes from `index` to the end. > **represent**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:69 +Defined in: [core-sdk/src/bytes/bytes.ts:173](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L173) Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes.md#tohex). @@ -122,7 +122,7 @@ Human-readable representation, used by debuggers/loggers. Same as [toHex](Bytes. > **toBase32**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:49 +Defined in: [core-sdk/src/bytes/bytes.ts:138](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L138) Encodes as a padded base32 string. @@ -140,7 +140,7 @@ Encodes as a padded base32 string. > **toBase64**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:45 +Defined in: [core-sdk/src/bytes/bytes.ts:131](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L131) Encodes as a padded base64 string. @@ -158,7 +158,7 @@ Encodes as a padded base64 string. > **toHex**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:41 +Defined in: [core-sdk/src/bytes/bytes.ts:124](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L124) Encodes as a lowercase hex string, with no `0x` prefix. @@ -176,7 +176,7 @@ Encodes as a lowercase hex string, with no `0x` prefix. > **toJSON**(): `unknown` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:61 +Defined in: [core-sdk/src/bytes/bytes.ts:159](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L159) Decodes the bytes as UTF-8 JSON. @@ -194,7 +194,7 @@ Decodes the bytes as UTF-8 JSON. > **toString**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:53 +Defined in: [core-sdk/src/bytes/bytes.ts:145](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L145) Same as [toHex](Bytes.md#tohex). @@ -212,7 +212,7 @@ Same as [toHex](Bytes.md#tohex). > **toUint8Array**(): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:37 +Defined in: [core-sdk/src/bytes/bytes.ts:117](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L117) Returns a copy of the underlying bytes. @@ -230,7 +230,7 @@ Returns a copy of the underlying bytes. > **toUtf8**(): `string` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:57 +Defined in: [core-sdk/src/bytes/bytes.ts:152](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L152) Decodes the bytes as UTF-8 text. @@ -248,7 +248,7 @@ Decodes the bytes as UTF-8 text. > `static` **concat**(...`arrays`): `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:20 +Defined in: [core-sdk/src/bytes/bytes.ts:75](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L75) Concatenates any number of byte arrays (or Bytes instances) into one new array. @@ -272,7 +272,7 @@ Concatenates any number of byte arrays (or Bytes instances) into one new array. > `static` **fromSlice**(`bytes`, `start`, `length?`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:29 +Defined in: [core-sdk/src/bytes/bytes.ts:100](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L100) Wraps a slice of `bytes` starting at `start`, running to the end unless `length` is given. @@ -305,7 +305,7 @@ Wraps a slice of `bytes` starting at `start`, running to the end unless > `static` **fromUtf8**(`utf8`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:24 +Defined in: [core-sdk/src/bytes/bytes.ts:92](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L92) Wraps the UTF-8 encoding of a string. @@ -329,7 +329,7 @@ Wraps the UTF-8 encoding of a string. > `static` **keccak256**(`bytes`): [`Bytes`](Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:16 +Defined in: [core-sdk/src/bytes/bytes.ts:68](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/bytes/bytes.ts#L68) Hashes `bytes` with keccak256 and wraps the 32-byte digest. diff --git a/docs/api/interfaces/Chunk.md b/docs/api/interfaces/Chunk.md index 9e89360c..9423230d 100644 --- a/docs/api/interfaces/Chunk.md +++ b/docs/api/interfaces/Chunk.md @@ -1,6 +1,6 @@ # Interface: Chunk -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/cac.d.cts:22 +Defined in: [core-sdk/src/chunk/cac.ts:25](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/cac.ts#L25) Content Addressed Chunk (CAC) - the immutable building block of Swarm, holding at most 4096 bytes of payload. @@ -18,7 +18,7 @@ The `toSingleOwnerChunk` method allows converting the CAC into a Single Owner Ch > **address**: [`Reference`](../classes/Reference.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/cac.d.cts:26 +Defined in: [core-sdk/src/chunk/cac.ts:29](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/cac.ts#L29) *** @@ -26,7 +26,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/cac.d.cts:26 > `readonly` **data**: `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/cac.d.cts:23 +Defined in: [core-sdk/src/chunk/cac.ts:26](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/cac.ts#L26) *** @@ -34,7 +34,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/cac.d.cts:23 > **payload**: [`Bytes`](../classes/Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/cac.d.cts:25 +Defined in: [core-sdk/src/chunk/cac.ts:28](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/cac.ts#L28) *** @@ -42,7 +42,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/cac.d.cts:25 > **span**: [`Span`](../classes/Span.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/cac.d.cts:24 +Defined in: [core-sdk/src/chunk/cac.ts:27](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/cac.ts#L27) *** @@ -50,7 +50,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/cac.d.cts:24 > **toSingleOwnerChunk**: (`identifier`, `privateKey`) => [`SingleOwnerChunk`](SingleOwnerChunk.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/cac.d.cts:31 +Defined in: [core-sdk/src/chunk/cac.ts:34](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/cac.ts#L34) Converts this CAC into a Single Owner Chunk (SOC), signed by `privateKey` over `identifier` and this chunk's address. diff --git a/docs/api/interfaces/Envelope.md b/docs/api/interfaces/Envelope.md index a2903f40..58b894b1 100644 --- a/docs/api/interfaces/Envelope.md +++ b/docs/api/interfaces/Envelope.md @@ -1,6 +1,6 @@ # Interface: Envelope -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.cts:6 +Defined in: [core-sdk/src/stamper/marshal.ts:7](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/marshal.ts#L7) A postage stamp's fields, as produced by signing (e.g. via `stamp()`). @@ -14,7 +14,7 @@ A postage stamp's fields, as produced by signing (e.g. via `stamp()`). > **index**: `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.cts:8 +Defined in: [core-sdk/src/stamper/marshal.ts:9](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/marshal.ts#L9) *** @@ -22,7 +22,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.ct > **issuer**: [`EthAddress`](../classes/EthAddress.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.cts:7 +Defined in: [core-sdk/src/stamper/marshal.ts:8](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/marshal.ts#L8) *** @@ -30,7 +30,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.ct > **signature**: [`Signature`](../classes/Signature.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.cts:10 +Defined in: [core-sdk/src/stamper/marshal.ts:11](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/marshal.ts#L11) *** @@ -38,4 +38,4 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.ct > **timestamp**: `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.cts:9 +Defined in: [core-sdk/src/stamper/marshal.ts:10](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/marshal.ts#L10) diff --git a/docs/api/interfaces/EnvelopeWithBatchId.md b/docs/api/interfaces/EnvelopeWithBatchId.md index be0bb52f..7554a5ad 100644 --- a/docs/api/interfaces/EnvelopeWithBatchId.md +++ b/docs/api/interfaces/EnvelopeWithBatchId.md @@ -1,6 +1,6 @@ # Interface: EnvelopeWithBatchId -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.cts:13 +Defined in: [core-sdk/src/stamper/marshal.ts:15](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/marshal.ts#L15) An [Envelope](Envelope.md) with its batch ID, ready to marshal. @@ -14,7 +14,7 @@ An [Envelope](Envelope.md) with its batch ID, ready to marshal. > **batchId**: [`BatchId`](../classes/BatchId.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.cts:14 +Defined in: [core-sdk/src/stamper/marshal.ts:16](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/marshal.ts#L16) *** @@ -22,7 +22,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.ct > **index**: `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.cts:8 +Defined in: [core-sdk/src/stamper/marshal.ts:9](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/marshal.ts#L9) #### Inherited from @@ -34,7 +34,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.ct > **issuer**: [`EthAddress`](../classes/EthAddress.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.cts:7 +Defined in: [core-sdk/src/stamper/marshal.ts:8](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/marshal.ts#L8) #### Inherited from @@ -46,7 +46,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.ct > **signature**: [`Signature`](../classes/Signature.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.cts:10 +Defined in: [core-sdk/src/stamper/marshal.ts:11](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/marshal.ts#L11) #### Inherited from @@ -58,7 +58,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.ct > **timestamp**: `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/marshal.d.cts:9 +Defined in: [core-sdk/src/stamper/marshal.ts:10](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/marshal.ts#L10) #### Inherited from diff --git a/docs/api/interfaces/SingleOwnerChunk.md b/docs/api/interfaces/SingleOwnerChunk.md index 006c48df..6229fe0a 100644 --- a/docs/api/interfaces/SingleOwnerChunk.md +++ b/docs/api/interfaces/SingleOwnerChunk.md @@ -1,6 +1,6 @@ # Interface: SingleOwnerChunk -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:27 +Defined in: [core-sdk/src/chunk/soc.ts:52](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/soc.ts#L52) Single Owner Chunk (SOC) - a chunk type where the address is determined by the owner and an arbitrary identifier. Its integrity is attested by the @@ -20,7 +20,7 @@ owner's digital signature rather than by hashing the content directly. > **address**: [`Reference`](../classes/Reference.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:31 +Defined in: [core-sdk/src/chunk/soc.ts:56](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/soc.ts#L56) *** @@ -28,7 +28,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:31 > `readonly` **data**: `Uint8Array` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:28 +Defined in: [core-sdk/src/chunk/soc.ts:53](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/soc.ts#L53) *** @@ -36,7 +36,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:28 > **identifier**: [`Identifier`](../classes/Identifier.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:32 +Defined in: [core-sdk/src/chunk/soc.ts:57](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/soc.ts#L57) *** @@ -44,7 +44,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:32 > **owner**: [`EthAddress`](../classes/EthAddress.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:34 +Defined in: [core-sdk/src/chunk/soc.ts:59](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/soc.ts#L59) *** @@ -52,7 +52,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:34 > **payload**: [`Bytes`](../classes/Bytes.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:30 +Defined in: [core-sdk/src/chunk/soc.ts:55](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/soc.ts#L55) *** @@ -60,7 +60,7 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:30 > **signature**: [`Signature`](../classes/Signature.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:33 +Defined in: [core-sdk/src/chunk/soc.ts:58](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/soc.ts#L58) *** @@ -68,4 +68,4 @@ Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:33 > **span**: [`Span`](../classes/Span.md) -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/chunk/soc.d.cts:29 +Defined in: [core-sdk/src/chunk/soc.ts:54](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/chunk/soc.ts#L54) diff --git a/docs/api/namespaces/Utils/approximateOverheadForRedundancyLevel.md b/docs/api/namespaces/Utils/approximateOverheadForRedundancyLevel.md index d1c668ae..a1d96a11 100644 --- a/docs/api/namespaces/Utils/approximateOverheadForRedundancyLevel.md +++ b/docs/api/namespaces/Utils/approximateOverheadForRedundancyLevel.md @@ -2,7 +2,7 @@ > **approximateOverheadForRedundancyLevel**(`chunks`, `level`, `encrypted`): `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/erasure-coding/levels.d.cts:22 +Defined in: [core-sdk/src/erasure-coding/levels.ts:95](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/erasure-coding/levels.ts#L95) Returns an approximate multiplier for the storage overhead of uploading `chunks` data shards at the given redundancy level: use it to estimate how diff --git a/docs/api/namespaces/Utils/getRedundancyStat.md b/docs/api/namespaces/Utils/getRedundancyStat.md index e376b4f5..3cf1be0a 100644 --- a/docs/api/namespaces/Utils/getRedundancyStat.md +++ b/docs/api/namespaces/Utils/getRedundancyStat.md @@ -2,7 +2,7 @@ > **getRedundancyStat**(`level`): `RedundancyStat` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/erasure-coding/levels.d.cts:43 +Defined in: [core-sdk/src/erasure-coding/levels.ts:132](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/erasure-coding/levels.ts#L132) Looks up a single redundancy level's stats by name ('medium'/'strong'/ 'insane'/'paranoid', case-insensitive) or by its numeric level (1-4). diff --git a/docs/api/namespaces/Utils/getRedundancyStats.md b/docs/api/namespaces/Utils/getRedundancyStats.md index ae8f6a26..dd5ae998 100644 --- a/docs/api/namespaces/Utils/getRedundancyStats.md +++ b/docs/api/namespaces/Utils/getRedundancyStats.md @@ -2,7 +2,7 @@ > **getRedundancyStats**(): `object` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/erasure-coding/levels.d.cts:33 +Defined in: [core-sdk/src/erasure-coding/levels.ts:119](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/erasure-coding/levels.ts#L119) Returns descriptive stats (label, level, expected error tolerance) for every redundancy level above NONE. diff --git a/docs/api/namespaces/Utils/getStampEffectiveBytes.md b/docs/api/namespaces/Utils/getStampEffectiveBytes.md index 6ab60b7c..38a4f349 100644 --- a/docs/api/namespaces/Utils/getStampEffectiveBytes.md +++ b/docs/api/namespaces/Utils/getStampEffectiveBytes.md @@ -2,7 +2,7 @@ > **getStampEffectiveBytes**(`depth`, `encryption?`, `erasureCodeLevel?`): `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/capacity.d.cts:26 +Defined in: [core-sdk/src/stamper/capacity.ts:352](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/capacity.ts#L352) Calculates the effective size of a postage batch based on its depth. Below depth 17 the effective size is 0. diff --git a/docs/api/namespaces/Utils/getStampEffectiveBytesBreakpoints.md b/docs/api/namespaces/Utils/getStampEffectiveBytesBreakpoints.md index 8fb61bbe..4cf23197 100644 --- a/docs/api/namespaces/Utils/getStampEffectiveBytesBreakpoints.md +++ b/docs/api/namespaces/Utils/getStampEffectiveBytesBreakpoints.md @@ -2,7 +2,7 @@ > **getStampEffectiveBytesBreakpoints**(`encryption`, `erasureCodeLevel?`): `Map`\<`number`, `number`\> -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/capacity.d.cts:31 +Defined in: [core-sdk/src/stamper/capacity.ts:379](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/capacity.ts#L379) Returns the effective size (in bytes) for every depth in the supported breakpoint range (17..34), keyed by depth. diff --git a/docs/api/namespaces/Utils/getStampTheoreticalBytes.md b/docs/api/namespaces/Utils/getStampTheoreticalBytes.md index d3684fc2..a83fd667 100644 --- a/docs/api/namespaces/Utils/getStampTheoreticalBytes.md +++ b/docs/api/namespaces/Utils/getStampTheoreticalBytes.md @@ -2,7 +2,7 @@ > **getStampTheoreticalBytes**(`depth`): `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/capacity.d.cts:14 +Defined in: [core-sdk/src/stamper/capacity.ts:17](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/capacity.ts#L17) Calculates the theoretical maximum size of a postage batch based on its depth. For smaller depths (up to 22), this may provide less accurate results. diff --git a/docs/api/namespaces/Utils/getStampUsage.md b/docs/api/namespaces/Utils/getStampUsage.md index f55b77ae..e4a417a5 100644 --- a/docs/api/namespaces/Utils/getStampUsage.md +++ b/docs/api/namespaces/Utils/getStampUsage.md @@ -2,7 +2,7 @@ > **getStampUsage**(`utilization`, `depth`, `bucketDepth`): `number` -Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/stamper/capacity.d.cts:7 +Defined in: [core-sdk/src/stamper/capacity.ts:7](https://github.com/ethersphere/core-sdk/blob/96273dfdbc1c6dec040d5aa6df29834e14e33eff/src/stamper/capacity.ts#L7) Calculates usage of a postage batch based on its utilization, depth, and bucket depth. For smaller depths (up to 20), this may provide less accurate results. diff --git a/package.json b/package.json index b9b32589..106c6dff 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ }, "scripts": { "docusaurus": "docusaurus", + "fix-api-links": "node scripts/fix-core-sdk-links.mjs", "start": "docusaurus start", "prebuild": "node scripts/validate-llms-txt.mjs", "build": "docusaurus build", diff --git a/scripts/fix-core-sdk-links.mjs b/scripts/fix-core-sdk-links.mjs new file mode 100644 index 00000000..0f7bd694 --- /dev/null +++ b/scripts/fix-core-sdk-links.mjs @@ -0,0 +1,190 @@ +// Rewrite the "Defined in:" lines in docs/api that typedoc emits as bare +// node_modules paths into real links to the core-sdk repository. +// +// Symbols that bee-js re-exports from @ethersphere/core-sdk are resolved by +// typedoc to the installed .d.cts declarations, so it emits plain text like +// +// Defined in: bee-js/node\_modules/@ethersphere/core-sdk/dist/bytes/bytes.d.cts:65 +// +// instead of a link. The declaration line numbers do not match the TypeScript +// sources, but the package ships .d.cts.map source maps next to them, so the +// true source location can be recovered and linked like every other entry: +// +// Defined in: [core-sdk/src/bytes/bytes.ts:166](https://github.com/.../src/bytes/bytes.ts#L166) +// +// Run this after regenerating docs/api. It is idempotent. +// +// node scripts/fix-core-sdk-links.mjs rewrite in place +// node scripts/fix-core-sdk-links.mjs --check report only, exit 1 if any remain + +import { readFileSync, writeFileSync, readdirSync, existsSync } from 'node:fs'; +import { execFileSync } from 'node:child_process'; +import { join, dirname, relative, posix } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const ROOT = join(__dirname, '..'); +const API_DIR = join(ROOT, 'docs', 'api'); +// The core-sdk copy installed under the bee-js clone the API docs were generated from. +const SDK_DIR = join(ROOT, 'sources', 'bee-js', 'node_modules', '@ethersphere', 'core-sdk'); +const SDK_REPO = join(ROOT, 'sources', 'core-sdk'); +const REPO_URL = 'https://github.com/ethersphere/core-sdk'; + +const CHECK_ONLY = process.argv.includes('--check'); + +// Matches the bare text typedoc emits. The underscore is markdown-escaped. +const DEFINED_IN = + /Defined in: bee-js\/node\\_modules\/@ethersphere\/core-sdk\/dist\/(\S+?)\.d\.cts:(\d+)/g; + +// ── Source maps ───────────────────────────────────────────────────── + +const BASE64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +/** Decode one base64 VLQ-encoded source map segment into its signed fields. */ +function decodeVlq(segment) { + const fields = []; + let value = 0; + let shift = 0; + for (const char of segment) { + const digit = BASE64.indexOf(char); + if (digit < 0) throw new Error(`Invalid base64 VLQ character: ${char}`); + value += (digit & 31) << shift; + if (digit & 32) { + shift += 5; + continue; + } + const negative = value & 1; + value >>= 1; + fields.push(negative ? -value : value); + value = 0; + shift = 0; + } + return fields; +} + +const mapCache = new Map(); + +/** + * For a dist-relative module path (e.g. "bytes/bytes"), return an array indexed + * by 1-based declaration line holding the source location it maps back to. + */ +function loadSourceMap(modulePath) { + if (mapCache.has(modulePath)) return mapCache.get(modulePath); + + const mapFile = join(SDK_DIR, 'dist', `${modulePath}.d.cts.map`); + if (!existsSync(mapFile)) { + throw new Error(`Missing source map: ${mapFile}`); + } + const map = JSON.parse(readFileSync(mapFile, 'utf-8')); + + // Source map fields are deltas accumulated across the whole mappings string; + // only the generated column resets per line. + const byLine = []; + let sourceIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + + map.mappings.split(';').forEach((lineMappings, index) => { + if (!lineMappings) return; + for (const segment of lineMappings.split(',')) { + if (!segment) continue; + const fields = decodeVlq(segment); + if (fields.length < 4) continue; // generated column only, no source location + sourceIndex += fields[1]; + sourceLine += fields[2]; + sourceColumn += fields[3]; + // The first mapped segment on a line is the declaration itself. + byLine[index + 1] ??= { source: map.sources[sourceIndex], line: sourceLine + 1 }; + } + }); + + mapCache.set(modulePath, byLine); + return byLine; +} + +// ── Repository revision ───────────────────────────────────────────── + +/** + * Pin links to the core-sdk release matching the installed package. Prefers the + * tag's commit sha (matching how bee-js links are pinned) and falls back to the + * tag name when the core-sdk clone is not available. + */ +function resolveRevision() { + const { version } = JSON.parse(readFileSync(join(SDK_DIR, 'package.json'), 'utf-8')); + const tag = `core-sdk-v${version}`; + try { + return execFileSync('git', ['-C', SDK_REPO, 'rev-parse', `${tag}^{commit}`], { + encoding: 'utf-8', + stdio: ['ignore', 'pipe', 'ignore'], + }).trim(); + } catch { + console.warn(` ⚠ Could not resolve ${tag} in ${SDK_REPO}, linking to the tag instead`); + return tag; + } +} + +// ── Rewriting ─────────────────────────────────────────────────────── + +/** Recursively find all .md files under `dir`. */ +function findDocFiles(dir) { + const results = []; + for (const entry of readdirSync(dir, { withFileTypes: true })) { + const full = join(dir, entry.name); + if (entry.isDirectory()) { + results.push(...findDocFiles(full)); + } else if (entry.name.endsWith('.md')) { + results.push(full); + } + } + return results; +} + +const stale = []; +for (const file of findDocFiles(API_DIR)) { + DEFINED_IN.lastIndex = 0; // the regex is global; reset it between files + if (DEFINED_IN.test(readFileSync(file, 'utf-8'))) stale.push(file); +} + +// Checking only has to spot the bare paths, so it works without the sources/ clones. +if (CHECK_ONLY) { + if (stale.length === 0) { + console.log('core-sdk links: all references linked ✓'); + process.exit(0); + } + for (const file of stale) { + console.error(` ⚠ Unlinked core-sdk references: ${relative(ROOT, file)}`); + } + console.error(`core-sdk links: ${stale.length} file(s) need "npm run fix-api-links"`); + process.exit(1); +} + +const revision = resolveRevision(); +let linkCount = 0; + +for (const file of stale) { + const original = readFileSync(file, 'utf-8'); + const rewritten = original.replace(DEFINED_IN, (match, modulePath, declLine) => { + const location = loadSourceMap(modulePath)[Number(declLine)]; + if (!location) { + console.warn(` ⚠ No source mapping for ${modulePath}.d.cts:${declLine}`); + return match; + } + // `sources` entries are relative to the map file, i.e. to dist/. + const sourcePath = posix + .normalize(posix.join('dist', posix.dirname(modulePath), location.source)) + .replace(/^dist\//, ''); + linkCount++; + return ( + `Defined in: [core-sdk/${sourcePath}:${location.line}]` + + `(${REPO_URL}/blob/${revision}/${sourcePath}#L${location.line})` + ); + }); + + if (rewritten !== original) writeFileSync(file, rewritten); +} + +if (linkCount > 0) { + console.log(`core-sdk links: rewrote ${linkCount} reference(s) in ${stale.length} file(s)`); +} else { + console.log('core-sdk links: nothing to rewrite ✓'); +}