DotNetLightning


NBitcoinArithmethicExtensions Module

Functions and values

Function or value Description

Secp256k1

Full Usage: Secp256k1

Returns: ISecp256k1

The functions in this module may fail but it does not return Result and just throw Exception in case of failure. Why? because the error case is very, very unlikely to happen. (e.g. two keys we operate were complement of each other.) It is interesting to consider if it is possible for the attacker to intentionally make this happen, but it is way beyond my skills, so we just ignore for now.

Returns: ISecp256k1

Type extensions

Type extension Description

Key.Add(lhs, rhs)

Full Usage: Key.Add(lhs, rhs)

Parameters:
Returns: Key

Extended Type: Key

lhs : Key
rhs : Key
Returns: Key

PubKey.Add(lhs, rhs)

Full Usage: PubKey.Add(lhs, rhs)

Parameters:
Returns: PubKey

Extended Type: PubKey

lhs : PubKey
rhs : PubKey
Returns: PubKey

Key.Mul(lhs, rhs)

Full Usage: Key.Mul(lhs, rhs)

Parameters:
Returns: Key

Extended Type: Key

lhs : Key
rhs : Key
Returns: Key

PubKey.Mul(pubKey, key)

Full Usage: PubKey.Mul(pubKey, key)

Parameters:
Returns: PubKey

Extended Type: PubKey

pubKey : PubKey
key : Key
Returns: PubKey