# pieceNode

> **pieceNode**(`metadata`): [`GrantNode`](/reference/filoz/keysmith/type-aliases/grantnode/)

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

The grant node for one piece, from its envelope metadata: `piece:<salt>`.

A piece grant is bound to the salt, not the CID: the salt is what the key is
derived from, it has one canonical spelling, and `keyForEnvelope` checks it
against the envelope at no cost. Carry the piece's CID beside the grant to
tell the recipient where to fetch it.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `metadata` | [`Pick`](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)\<[`PieceMetadata`](/reference/filoz/keysmith/type-aliases/piecemetadata/), `"foc/salt"`\> |

## Returns

[`GrantNode`](/reference/filoz/keysmith/type-aliases/grantnode/)