# holdingOf

> **holdingOf**(`grant`): [`Holding`](/reference/filoz/keysmith/type-aliases/holding/)

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

Which node a grant carries, ready to pass to [keyForEnvelope](/reference/filoz/keysmith/functions/keyforenvelope/).

A group key, a group's key and a piece key are all 32 bytes of HKDF output, so
nothing distinguishes them once unwrapped — but the grant that delivered the
key does, so keep the whole grant, not just the key.

Takes a full grant or just `{ node }`. For an in-memory descriptor, `v` may be absent but, if present, must be
exactly 2 (see assertFormatVersion). Only decoded bytes (`decodeGrant`, `unwrapWith`) require `v: 2`.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `grant` | [`Pick`](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)\<[`GrantDescriptor`](/reference/filoz/keysmith/interfaces/grantdescriptor/), `"node"`\> & `object` |

## Returns

[`Holding`](/reference/filoz/keysmith/type-aliases/holding/)

## Throws

If `v` is present and not 2 (`v` 1 is keysmith 0.1.0's), or the node is not one this version understands.