# PieceCID

Defined in: packages/synapse-core/dist/src/piece/piece-cid.d.ts:4

## Extends

- `CID`\<`unknown`, *typeof* [`CODEC_CODE`](/reference/filoz/synapse-core/piece/variables/codec_code/), *typeof* [`MULTIHASH_CODE`](/reference/filoz/synapse-core/piece/variables/multihash_code/), `1`\>

## Properties

### \[toStringTag\]

> `readonly` **\[toStringTag\]**: `"CID"` = `"CID"`

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:34

#### Inherited from

`CID.[toStringTag]`

***

### /

> `readonly` **/**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)\<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)\>

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:11

#### Inherited from

`CID./`

***

### bytes

> `readonly` **bytes**: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)\<[`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)\>

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:10

#### Inherited from

`CID.bytes`

***

### code

> `readonly` **code**: `85`

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:7

#### Inherited from

`CID.code`

***

### multihash

> `readonly` **multihash**: `MultihashDigest`\<`4113`\>

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:9

#### Inherited from

`CID.multihash`

***

### version

> `readonly` **version**: `1`

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:8

#### Inherited from

`CID.version`

## Accessors

### asCID

#### Get Signature

> **get** **asCID**(): `this`

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:24

Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes`
please either use `CID.asCID(cid)` or switch to new signalling mechanism

:::caution[Deprecated]
  This API is no longer supported and may be removed in a future release.
  :::

##### Returns

`this`

#### Inherited from

`CID.asCID`

***

### byteLength

#### Get Signature

> **get** **byteLength**(): `number`

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:26

##### Returns

`number`

#### Inherited from

`CID.byteLength`

***

### byteOffset

#### Get Signature

> **get** **byteOffset**(): `number`

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:25

##### Returns

`number`

#### Inherited from

`CID.byteOffset`

***

### height

#### Get Signature

> **get** **height**(): `number`

Defined in: packages/synapse-core/dist/src/piece/piece-cid.d.ts:8

##### Returns

`number`

***

### paddedSize

#### Get Signature

> **get** **paddedSize**(): `bigint`

Defined in: packages/synapse-core/dist/src/piece/piece-cid.d.ts:11

##### Returns

`bigint`

***

### padding

#### Get Signature

> **get** **padding**(): `bigint`

Defined in: packages/synapse-core/dist/src/piece/piece-cid.d.ts:9

##### Returns

`bigint`

***

### root

#### Get Signature

> **get** **root**(): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)

Defined in: packages/synapse-core/dist/src/piece/piece-cid.d.ts:7

##### Returns

[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)

***

### size

#### Get Signature

> **get** **size**(): `number`

Defined in: packages/synapse-core/dist/src/piece/piece-cid.d.ts:10

##### Returns

`number`

## Methods

### equals()

> **equals**(`other`): `other is CID<unknown, 85, 4113, 1>`

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:29

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `other` | `unknown` |

#### Returns

`other is CID<unknown, 85, 4113, 1>`

#### Inherited from

`CID.equals`

***

### link()

> **link**(): `this`

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:33

#### Returns

`this`

#### Inherited from

`CID.link`

***

### toHex()

> **toHex**(): `` `0x${string}` ``

Defined in: packages/synapse-core/dist/src/piece/piece-cid.d.ts:12

#### Returns

`` `0x${string}` ``

***

### toJSON()

> **toJSON**(): `LinkJSON`\<`PieceCID`\>

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:32

#### Returns

`LinkJSON`\<`PieceCID`\>

#### Inherited from

`CID.toJSON`

***

### toString()

> **toString**(`base?`): `string`

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:31

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `base?` | `MultibaseEncoder`\<`string`\> |

#### Returns

`string`

#### Inherited from

`CID.toString`

***

### toV0()

> **toV0**(): `CID`\<`unknown`, `112`, `18`, `0`\>

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:27

#### Returns

`CID`\<`unknown`, `112`, `18`, `0`\>

#### Inherited from

`CID.toV0`

***

### toV1()

> **toV1**(): `CID`\<`unknown`, `85`, `4113`, `1`\>

Defined in: node\_modules/.pnpm/multiformats@14.0.0/node\_modules/multiformats/dist/src/cid.d.ts:28

#### Returns

`CID`\<`unknown`, `85`, `4113`, `1`\>

#### Inherited from

`CID.toV1`