# utils

## Interfaces

| Interface | Description |
| ------ | ------ |
| [MetadataDataSetInternal](/reference/filoz/synapse-core/utils/interfaces/metadatadatasetinternal/) | - |
| [MetadataPieceInternal](/reference/filoz/synapse-core/utils/interfaces/metadatapieceinternal/) | - |

## Type Aliases

| Type Alias | Description |
| ------ | ------ |
| [ClaimTokenResponse](/reference/filoz/synapse-core/utils/type-aliases/claimtokenresponse/) | - |
| [ClaimTokenResponseError](/reference/filoz/synapse-core/utils/type-aliases/claimtokenresponseerror/) | - |
| [ClaimTokensOptions](/reference/filoz/synapse-core/utils/type-aliases/claimtokensoptions/) | - |
| [MetadataArray](/reference/filoz/synapse-core/utils/type-aliases/metadataarray/) | The metadata array is a tuple of two arrays: the keys and the values. Return type from the getAllDataSetMetadata function. |
| [MetadataEntry](/reference/filoz/synapse-core/utils/type-aliases/metadataentry/) | - |
| [MetadataObject](/reference/filoz/synapse-core/utils/type-aliases/metadataobject/) | - |

## Variables

| Variable | Description |
| ------ | ------ |
| [CAP\_IPNI\_IPFS](/reference/filoz/synapse-core/utils/variables/cap_ipni_ipfs/) | - |
| [CAP\_IPNI\_PEER\_ID](/reference/filoz/synapse-core/utils/variables/cap_ipni_peer_id/) | - |
| [CAP\_IPNI\_PIECE](/reference/filoz/synapse-core/utils/variables/cap_ipni_piece/) | - |
| [CAP\_LOCATION](/reference/filoz/synapse-core/utils/variables/cap_location/) | - |
| [CAP\_MAX\_PIECE\_SIZE](/reference/filoz/synapse-core/utils/variables/cap_max_piece_size/) | - |
| [CAP\_MIN\_PIECE\_SIZE](/reference/filoz/synapse-core/utils/variables/cap_min_piece_size/) | - |
| [CAP\_MIN\_PROVING\_PERIOD](/reference/filoz/synapse-core/utils/variables/cap_min_proving_period/) | - |
| [CAP\_PAYMENT\_TOKEN](/reference/filoz/synapse-core/utils/variables/cap_payment_token/) | - |
| [CAP\_SERVICE\_URL](/reference/filoz/synapse-core/utils/variables/cap_service_url/) | - |
| [CAP\_STORAGE\_PRICE](/reference/filoz/synapse-core/utils/variables/cap_storage_price/) | - |
| [LOCKUP\_PERIOD](/reference/filoz/synapse-core/utils/variables/lockup_period/) | - |
| [METADATA\_LIMITS](/reference/filoz/synapse-core/utils/variables/metadata_limits/) | - |
| [SIZE\_CONSTANTS](/reference/filoz/synapse-core/utils/variables/size_constants/) | Data size constants |
| [TIME\_CONSTANTS](/reference/filoz/synapse-core/utils/variables/time_constants/) | Time and size constants |

## Functions

| Function | Description |
| ------ | ------ |
| [capabilitiesListToObject](/reference/filoz/synapse-core/utils/functions/capabilitieslisttoobject/) | Convert capability arrays to object map |
| [claimTokens](/reference/filoz/synapse-core/utils/functions/claimtokens/) | - |
| [clientFromTransport](/reference/filoz/synapse-core/utils/functions/clientfromtransport/) | Create a Viem public client from a transport configuration |
| [createPieceUrl](/reference/filoz/synapse-core/utils/functions/createpieceurl/) | - |
| [datasetMetadataObjectToEntry](/reference/filoz/synapse-core/utils/functions/datasetmetadataobjecttoentry/) | Convert a dataset metadata object to an array of metadata entries to be signed. |
| [decodeAddressCapability](/reference/filoz/synapse-core/utils/functions/decodeaddresscapability/) | Matches the behavior of `address(uint160(BigEndian.decode(values[i])))` |
| [decodePDPCapabilities](/reference/filoz/synapse-core/utils/functions/decodepdpcapabilities/) | Decode PDP capabilities from keys/values arrays into a PDPOffering object. Based on Curio's capabilitiesToOffering function. |
| [decodePDPError](/reference/filoz/synapse-core/utils/functions/decodepdperror/) | - |
| [encodePDPCapabilities](/reference/filoz/synapse-core/utils/functions/encodepdpcapabilities/) | - |
| [fallbackRandIndex](/reference/filoz/synapse-core/utils/functions/fallbackrandindex/) | - |
| [fallbackRandU256](/reference/filoz/synapse-core/utils/functions/fallbackrandu256/) | - |
| [formatBalance](/reference/filoz/synapse-core/utils/functions/formatbalance/) | - |
| [formatFraction](/reference/filoz/synapse-core/utils/functions/formatfraction/) | - |
| [metadataArrayToObject](/reference/filoz/synapse-core/utils/functions/metadataarraytoobject/) | - |
| [pieceMetadataObjectToEntry](/reference/filoz/synapse-core/utils/functions/piecemetadataobjecttoentry/) | Convert a dataset metadata object to an array of metadata entries to be signed. |
| [randIndex](/reference/filoz/synapse-core/utils/functions/randindex/) | Provides a random index into an array of supplied length (0 <= index < length) |
| [randU256](/reference/filoz/synapse-core/utils/functions/randu256/) | - |
| [transportFromTransportConfig](/reference/filoz/synapse-core/utils/functions/transportfromtransportconfig/) | Create a Viem public client from a transport configuration |