# openDelivery

> **openDelivery**(`privateKey`, `bytes`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `chain`: [`ClaimChain`](/reference/filoz/keysmith/interfaces/claimchain/); `claim`: [`VerifiedClaim`](/reference/filoz/keysmith/interfaces/verifiedclaim/); `expired`: `boolean`; `grant`: [`Grant`](/reference/filoz/keysmith/interfaces/grant/); `key`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array); \}\>

Defined in: [claims.ts:649](https://github.com/FilOzone/synapse-sdk/blob/840d7b2c6263846ac51b7558000e62dd68d33a44/packages/keysmith/src/claims.ts#L649)

Open a delivery as its final bearer: verify the chain, unwrap the key, and
check it against the commitment in its claim, which the owner (or the
delegate above) signed. The group key commitment comes back too, for a bearer
that writes the group key's first datasets.

An expired delivery still opens: a key cannot expire, so decrypting with it
keeps working. `expired` says the claim is spent, and `signRequest` and
`delegateClaim` refuse it; get a new grant before fetching from a gating
provider or sharing onward.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `privateKey` | `` `0x${string}` `` |
| `bytes` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) |
| `options?` | \{ `now?`: `number`; `piece?`: [`PieceLabels`](/reference/filoz/keysmith/type-aliases/piecelabels/); \} |
| `options.now?` | `number` |
| `options.piece?` | [`PieceLabels`](/reference/filoz/keysmith/type-aliases/piecelabels/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `chain`: [`ClaimChain`](/reference/filoz/keysmith/interfaces/claimchain/); `claim`: [`VerifiedClaim`](/reference/filoz/keysmith/interfaces/verifiedclaim/); `expired`: `boolean`; `grant`: [`Grant`](/reference/filoz/keysmith/interfaces/grant/); `key`: [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array); \}\>

## Throws

With the reason the delivery is refused.