# encodeDelivery

> **encodeDelivery**(`chain`, `grant`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)

Defined in: [claims.ts:548](https://github.com/FilOzone/synapse-sdk/blob/68e30a2a5457180e60a5579eb5ecff90b65894b3/packages/keysmith/src/claims.ts#L548)

A delivery: sent once to a new bearer, never to a provider. Carries the v1 grant that wraps the key.
The grant must name the chain's final node, owner and keyspace; that the wrapped key matches the
link's commitment is checked by `openDelivery`, which holds the private key to unwrap it.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `chain` | [`ClaimChain`](/reference/filoz/keysmith/interfaces/claimchain/) |
| `grant` | [`Grant`](/reference/filoz/keysmith/interfaces/grant/) |

## Returns

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