# encodeDelivery

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

Defined in: [packages/keysmith/src/claims.ts:1190](https://github.com/FilOzone/synapse-sdk/blob/278badff6cfc813e6315d00c56f4a5f23c80f883/packages/keysmith/src/claims.ts#L1190)

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)