# encodeDelivery

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

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

A delivery: sent once to a new bearer, never to a provider. Carries the v2 grant that wraps the key.
The grant must name the chain's final node, owner and group key; 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)