# Function: startConnectedNode()

```ts
function startConnectedNode(params): Promise<P2PNode>;
```

Defined in: [packages/core/src/session/connect.ts:638](https://github.com/leifriksheim/minca/blob/main/core/src/session/connect.ts#L638)

Starts a node acting for the account, under a grant.

It joins the granted spaces (again, harmlessly, on later starts) and keeps
its data in this site's storage. It has no account key: it sees the spaces
it was given, not the account's whole list.

In a space that names a keeper it holds only the collections the app uses
(`cache`); pass `cache: false` to hold every space whole.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `cache?`: \| `false` \| [`CacheConfig`](https://minca.dev/api/core/interfaces/CacheConfig.md); `grant`: [`Grant`](https://minca.dev/api/session/interfaces/Grant.md); `key?`: [`AppKey`](https://minca.dev/api/session/interfaces/AppKey.md); `network?`: [`NodeNetworkConfig`](https://minca.dev/api/core/interfaces/NodeNetworkConfig.md); `stores?`: [`StoreFactory`](https://minca.dev/api/core/type-aliases/StoreFactory.md); `worker?`: () => [`WorkerLike`](https://minca.dev/api/core/interfaces/WorkerLike.md); \} | - |
| `params.cache?` | \| `false` \| [`CacheConfig`](https://minca.dev/api/core/interfaces/CacheConfig.md) | - |
| `params.grant` | [`Grant`](https://minca.dev/api/session/interfaces/Grant.md) | - |
| `params.key?` | [`AppKey`](https://minca.dev/api/session/interfaces/AppKey.md) | - |
| `params.network?` | [`NodeNetworkConfig`](https://minca.dev/api/core/interfaces/NodeNetworkConfig.md) | - |
| `params.stores?` | [`StoreFactory`](https://minca.dev/api/core/type-aliases/StoreFactory.md) | - |
| `params.worker?` | () => [`WorkerLike`](https://minca.dev/api/core/interfaces/WorkerLike.md) | Runs the node in a worker, off the page's main thread. Not with `stores`, which a worker can't be handed. |

## Returns

`Promise`\<[`P2PNode`](https://minca.dev/api/core/interfaces/P2PNode.md)\>
