# secp256k1Add

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

[**@midnight-ntwrk/compact-runtime v0.21.0**](https://docs.midnight.network/api-reference/compact-runtime.md)

***

[@midnight-ntwrk/compact-runtime](https://docs.midnight.network/api-reference/compact-runtime/globals.md) / secp256k1Add

# Function: secp256k1Add()

```
function secp256k1Add(a, b): Secp256k1Point;
```

**`Internal`**

The Compact builtin `ecAdd` function for secp256k1 points.

This function adds two elliptic curve points. The points are assumed to be valid, points passed from compiler-generated code are always valid ones.

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

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

[`Secp256k1Point`](https://docs.midnight.network/api-reference/compact-runtime/interfaces/Secp256k1Point.md)

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

[`Secp256k1Point`](https://docs.midnight.network/api-reference/compact-runtime/interfaces/Secp256k1Point.md)

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

[`Secp256k1Point`](https://docs.midnight.network/api-reference/compact-runtime/interfaces/Secp256k1Point.md)
