# Function: runAction()

```ts
function runAction(
   node, 
   name, 
   input?
): Promise<unknown>;
```

Defined in: [packages/core/src/node/actions.ts:1036](https://github.com/leifriksheim/minca/blob/main/core/src/node/actions.ts#L1036)

Runs an action by name, checking its input first.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `node` | [`P2PNode`](https://minca.dev/api/core/interfaces/P2PNode.md) |
| `name` | `string` |
| `input?` | `unknown` |

## Returns

`Promise`\<`unknown`\>

## Throws

When the action is unknown or the input does not fit
