# ecAdd

> For the complete documentation index, see [llms.txt](https://docs.midnight.network/llms.txt)

[**@midnight/ledger v8.1.3**](https://docs.midnight.network/api-reference/ledger.md)

***

[@midnight/ledger](https://docs.midnight.network/api-reference/ledger/globals.md) / ecAdd

# Function: ecAdd()

```
function ecAdd(a, b): Value;
```

**`Internal`**

Internal implementation of the elliptic curve addition primitive

## Parameters[​](#parameters "Direct link to Parameters")

### a[​](#a "Direct link to a")

[`Value`](https://docs.midnight.network/api-reference/ledger/type-aliases/Value.md)

### b[​](#b "Direct link to b")

[`Value`](https://docs.midnight.network/api-reference/ledger/type-aliases/Value.md)

## Returns[​](#returns "Direct link to Returns")

[`Value`](https://docs.midnight.network/api-reference/ledger/type-aliases/Value.md)

## Throws[​](#throws "Direct link to Throws")

If either input does not encode an elliptic curve point
