# WarmStorageService

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:104](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L104)

## Methods

### addApprovedProvider()

```ts
addApprovedProvider(signer, providerId): Promise<TransactionResponse>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:986](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L986)

Add an approved provider by ID (owner only)

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `signer` | `Signer` | Signer with owner permissions |
| `providerId` | `number` | Provider ID from registry |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`TransactionResponse`\>

Transaction response

***

### calculateStorageCost()

```ts
calculateStorageCost(sizeInBytes): Promise<{
  perDay: bigint;
  perEpoch: bigint;
  perMonth: bigint;
  withCDN: {
     perDay: bigint;
     perEpoch: bigint;
     perMonth: bigint;
  };
}>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:734](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L734)

Calculate storage costs for a given size

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `sizeInBytes` | `number` | Size of data to store in bytes |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{
  `perDay`: `bigint`;
  `perEpoch`: `bigint`;
  `perMonth`: `bigint`;
  `withCDN`: \{
     `perDay`: `bigint`;
     `perEpoch`: `bigint`;
     `perMonth`: `bigint`;
  \};
\}\>

Cost estimates per epoch, day, and month

#### Remarks

CDN costs are usage-based (egress pricing), so withCDN field reflects base storage cost only

***

### checkAllowanceForStorage()

```ts
checkAllowanceForStorage(
   sizeInBytes, 
   withCDN, 
   paymentsService, 
   lockupDays?): Promise<{
  costs: {
     perDay: bigint;
     perEpoch: bigint;
     perMonth: bigint;
  };
  currentLockupAllowance: bigint;
  currentLockupUsed: bigint;
  currentRateAllowance: bigint;
  currentRateUsed: bigint;
  depositAmountNeeded: bigint;
  lockupAllowanceNeeded: bigint;
  message?: string;
  rateAllowanceNeeded: bigint;
  sufficient: boolean;
}>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:774](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L774)

Check if user has sufficient allowances for a storage operation and calculate costs

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `sizeInBytes` | `number` | Size of data to store |
| `withCDN` | `boolean` | Whether CDN is enabled |
| `paymentsService` | [`PaymentsService`](/reference/filoz/synapse-sdk/payments/classes/paymentsservice/) | PaymentsService instance to check allowances |
| `lockupDays?` | `number` | Number of days for lockup period (defaults to 10) |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{
  `costs`: \{
     `perDay`: `bigint`;
     `perEpoch`: `bigint`;
     `perMonth`: `bigint`;
  \};
  `currentLockupAllowance`: `bigint`;
  `currentLockupUsed`: `bigint`;
  `currentRateAllowance`: `bigint`;
  `currentRateUsed`: `bigint`;
  `depositAmountNeeded`: `bigint`;
  `lockupAllowanceNeeded`: `bigint`;
  `message?`: `string`;
  `rateAllowanceNeeded`: `bigint`;
  `sufficient`: `boolean`;
\}\>

Allowance requirement details and storage costs

***

### getApprovedProviderIds()

```ts
getApprovedProviderIds(): Promise<number[]>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:1018](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L1018)

Get list of approved provider IDs

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`number`[]\>

Array of approved provider IDs

***

### getChallengeWindow()

```ts
getChallengeWindow(): Promise<number>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:1070](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L1070)

Get the challenge window size from the WarmStorage contract

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`number`\>

Challenge window size in epochs

***

### getClientDataSets()

```ts
getClientDataSets(clientAddress): Promise<DataSetInfo[]>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:317](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L317)

Get all data sets for a specific client

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `clientAddress` | `string` | The client address |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`DataSetInfo`](/reference/filoz/synapse-sdk/synapse/interfaces/datasetinfo/)[]\>

Array of data set information

***

### getClientDataSetsWithDetails()

```ts
getClientDataSetsWithDetails(client, onlyManaged): Promise<EnhancedDataSetInfo[]>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:347](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L347)

Get all data sets for a client with enhanced details
This includes live status and management information

#### Parameters

| Parameter | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| `client` | `string` | `undefined` | The client address |
| `onlyManaged` | `boolean` | `false` | If true, only return data sets managed by this Warm Storage contract |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`EnhancedDataSetInfo`](/reference/filoz/synapse-sdk/synapse/interfaces/enhanceddatasetinfo/)[]\>

Array of enhanced data set information

***

### getComprehensiveDataSetStatus()

```ts
getComprehensiveDataSetStatus(txHashOrTransaction, pdpServer?): Promise<ComprehensiveDataSetStatus>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:526](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L526)

Get comprehensive data set creation status combining server and chain info

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `txHashOrTransaction` | `string` \| `TransactionResponse` | Transaction hash or transaction object |
| `pdpServer?` | [`PDPServer`](/reference/filoz/synapse-sdk/pdp/classes/pdpserver/) | PDP server instance for status checks |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`ComprehensiveDataSetStatus`](/reference/filoz/synapse-sdk/warmstorage/interfaces/comprehensivedatasetstatus/)\>

Combined status information

***

### getDataSet()

```ts
getDataSet(dataSetId): Promise<DataSetInfo>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:288](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L288)

Get a single data set by ID

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `dataSetId` | `number` | The data set ID to retrieve |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`DataSetInfo`](/reference/filoz/synapse-sdk/synapse/interfaces/datasetinfo/)\>

Data set information

#### Throws

Error if data set doesn't exist

***

### getDataSetMetadata()

```ts
getDataSetMetadata(dataSetId): Promise<Record<string, string>>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:654](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L654)

Get all metadata for a data set

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `dataSetId` | `number` | The data set ID |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\<`string`, `string`\>\>

Object with metadata key-value pairs

***

### getDataSetMetadataByKey()

```ts
getDataSetMetadataByKey(dataSetId, key): Promise<string | null>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:672](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L672)

Get specific metadata key for a data set

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `dataSetId` | `number` | The data set ID |
| `key` | `string` | The metadata key to retrieve |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string` \| `null`\>

The metadata value if it exists, null otherwise

***

### getMaxProvingPeriod()

```ts
getMaxProvingPeriod(): Promise<number>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:1060](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L1060)

Get the maximum proving period from the WarmStorage contract

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`number`\>

Maximum proving period in epochs

***

### getOwner()

```ts
getOwner(): Promise<string>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:1038](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L1038)

Get the contract owner address

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>

Owner address

***

### getPaymentsAddress()

```ts
getPaymentsAddress(): string;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:216](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L216)

#### Returns

`string`

***

### getPDPVerifierAddress()

```ts
getPDPVerifierAddress(): string;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:212](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L212)

#### Returns

`string`

***

### getPieceMetadata()

```ts
getPieceMetadata(dataSetId, pieceId): Promise<Record<string, string>>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:684](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L684)

Get all metadata for a piece in a data set

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `dataSetId` | `number` | The data set ID |
| `pieceId` | `number` | The piece ID |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\<`string`, `string`\>\>

Object with metadata key-value pairs

***

### getPieceMetadataByKey()

```ts
getPieceMetadataByKey(
   dataSetId, 
   pieceId, 
key): Promise<string | null>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:703](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L703)

Get specific metadata key for a piece in a data set

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `dataSetId` | `number` | The data set ID |
| `pieceId` | `number` | The piece ID |
| `key` | `string` | The metadata key to retrieve |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string` \| `null`\>

The metadata value if it exists, null otherwise

***

### getProvider()

```ts
getProvider(): Provider;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:240](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L240)

Get the provider instance

#### Returns

`Provider`

The ethers provider

***

### getServicePrice()

```ts
getServicePrice(): Promise<ServicePriceInfo>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:715](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L715)

Get the current service price per TiB per month

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`ServicePriceInfo`\>

Service price information for both CDN and non-CDN options

***

### getServiceProviderRegistryAddress()

```ts
getServiceProviderRegistryAddress(): string;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:228](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L228)

#### Returns

`string`

***

### getSessionKeyRegistryAddress()

```ts
getSessionKeyRegistryAddress(): string;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:232](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L232)

#### Returns

`string`

***

### getUSDFCTokenAddress()

```ts
getUSDFCTokenAddress(): string;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:220](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L220)

#### Returns

`string`

***

### getViewContractAddress()

```ts
getViewContractAddress(): string;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:224](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L224)

#### Returns

`string`

***

### isOwner()

```ts
isOwner(signer): Promise<boolean>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:1048](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L1048)

Check if a signer is the contract owner

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `signer` | `Signer` | Signer to check |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>

Whether the signer is the owner

***

### isProviderIdApproved()

```ts
isProviderIdApproved(providerId): Promise<boolean>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:1029](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L1029)

Check if a provider ID is approved

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `providerId` | `number` | Provider ID to check |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>

Whether the provider is approved

***

### prepareStorageUpload()

```ts
prepareStorageUpload(options, paymentsService): Promise<{
  actions: object[];
  allowanceCheck: {
     message?: string;
     sufficient: boolean;
  };
  estimatedCost: {
     perDay: bigint;
     perEpoch: bigint;
     perMonth: bigint;
  };
}>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:882](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L882)

Prepare for storage upload by checking balances and allowances

This method performs a comprehensive check of the prerequisites for storage upload,
including verifying sufficient funds and service allowances. It returns a list of
actions that need to be executed before the upload can proceed.

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | \{ `dataSize`: `number`; `withCDN?`: `boolean`; \} | Configuration options for the storage upload |
| `options.dataSize` | `number` | Size of data to store in bytes |
| `options.withCDN?` | `boolean` | Whether to enable CDN for faster retrieval (optional, defaults to false) |
| `paymentsService` | [`PaymentsService`](/reference/filoz/synapse-sdk/payments/classes/paymentsservice/) | Instance of PaymentsService for handling payment operations |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{
  `actions`: `object`[];
  `allowanceCheck`: \{
     `message?`: `string`;
     `sufficient`: `boolean`;
  \};
  `estimatedCost`: \{
     `perDay`: `bigint`;
     `perEpoch`: `bigint`;
     `perMonth`: `bigint`;
  \};
\}\>

Object containing:
  - estimatedCost: Breakdown of storage costs (per epoch, day, and month)
  - allowanceCheck: Status of service allowances with optional message
  - actions: Array of required actions (deposit, approveService) that need to be executed

#### Example

```typescript
const prep = await warmStorageService.prepareStorageUpload(
  { dataSize: Number(SIZE_CONSTANTS.GiB), withCDN: true },
  paymentsService
)

if (prep.actions.length > 0) {
  for (const action of prep.actions) {
    console.log(`Executing: ${action.description}`)
    await action.execute()
  }
}
```

***

### removeApprovedProvider()

```ts
removeApprovedProvider(signer, providerId): Promise<TransactionResponse>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:998](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L998)

Remove an approved provider by ID (owner only)

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `signer` | `Signer` | Signer with owner permissions |
| `providerId` | `number` | Provider ID from registry |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`TransactionResponse`\>

Transaction response

***

### terminateDataSet()

```ts
terminateDataSet(signer, dataSetId): Promise<TransactionResponse>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:972](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L972)

Terminate a data set with given ID

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `signer` | `Signer` | Signer which created this dataset |
| `dataSetId` | `number` | ID of the data set to terminate |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`TransactionResponse`\>

Transaction receipt

***

### topUpCDNPaymentRails()

```ts
topUpCDNPaymentRails(
   signer, 
   dataSetId, 
   cdnAmountToAdd, 
cacheMissAmountToAdd): Promise<TransactionResponse>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:1086](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L1086)

Increments the fixed locked-up amounts for CDN payment rails.

This method tops up the prepaid balance for CDN services by adding to the existing
lockup amounts. Both CDN and cache miss rails can be incremented independently.

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `signer` | `Signer` | - |
| `dataSetId` | `number` | The ID of the data set |
| `cdnAmountToAdd` | `bigint` | Amount to add to the CDN rail lockup |
| `cacheMissAmountToAdd` | `bigint` | Amount to add to the cache miss rail lockup |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`TransactionResponse`\>

Transaction response

***

### validateDataSet()

```ts
validateDataSet(dataSetId): Promise<void>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:414](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L414)

Validate that a dataset is live and managed by this WarmStorage contract

Performs validation checks in parallel:
- Dataset exists and is live
- Dataset is managed by this WarmStorage contract

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `dataSetId` | `number` | The PDPVerifier data set ID |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>

#### Throws

if dataset is not valid for operations

***

### verifyDataSetCreation()

```ts
verifyDataSetCreation(txHashOrTransaction): Promise<DataSetCreationVerification>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:444](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L444)

Verify that a data set creation transaction was successful
This checks both the transaction status and on-chain data set state

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `txHashOrTransaction` | `string` \| `TransactionResponse` | Transaction hash or transaction object |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`DataSetCreationVerification`](/reference/filoz/synapse-sdk/warmstorage/interfaces/datasetcreationverification/)\>

Verification result with data set ID if found

***

### waitForDataSetCreationWithStatus()

```ts
waitForDataSetCreationWithStatus(
   txHashOrTransaction, 
   pdpServer, 
   maxWaitTime, 
   pollInterval, 
onProgress?): Promise<ComprehensiveDataSetStatus>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:605](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L605)

Wait for data set creation with status updates

#### Parameters

| Parameter | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| `txHashOrTransaction` | `string` \| `TransactionResponse` | `undefined` | Transaction hash or transaction object to wait for |
| `pdpServer` | [`PDPServer`](/reference/filoz/synapse-sdk/pdp/classes/pdpserver/) | `undefined` | PDP server for status checks |
| `maxWaitTime` | `number` | `TIMING_CONSTANTS.DATA_SET_CREATION_TIMEOUT_MS` | Maximum time to wait in milliseconds |
| `pollInterval` | `number` | `TIMING_CONSTANTS.DATA_SET_CREATION_POLL_INTERVAL_MS` | Polling interval in milliseconds |
| `onProgress?` | (`status`, `elapsedMs`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> | `undefined` | Optional progress callback |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`ComprehensiveDataSetStatus`](/reference/filoz/synapse-sdk/warmstorage/interfaces/comprehensivedatasetstatus/)\>

Final comprehensive status

***

### create()

```ts
static create(provider, warmStorageAddress): Promise<WarmStorageService>;
```

Defined in: [packages/synapse-sdk/src/warm-storage/service.ts:146](https://github.com/FilOzone/synapse-sdk/blob/b006a8f0508ba111d0736f9a555fdb401c18990b/packages/synapse-sdk/src/warm-storage/service.ts#L146)

Create a new WarmStorageService instance with initialized addresses

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `provider` | `Provider` |
| `warmStorageAddress` | `string` |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`WarmStorageService`\>