Schnorr Signature Scheme
npm install @helixnetwork/schnorrIOTA schnorr Scheme
Install using npm:
```
npm install @helixnetwork/schnorr
or using yarn:
```
yarn add @helixnetwork/schnorr
* schnorr
* ~subseed
Compute subseed based on the seed with an additional index(seed, index)
* ~digest(normalizedBundleFragment, signatureFragment)
* ~signatureFragment(normalizeBundleFragment, keyFragment)
* ~validateSignatures(expectedAddress, signatureFragments, bundleHash)
* ~normalizedBundleHash(bundlehash)
| Param | Type | Description |
| --- | --- | --- |
| seed | Int8Array | Seed txBits |
| index | number | Private key index |
Returns: Int8Array - subseed txBits
| Param | Type | Description |
| --- | --- | --- |
| subseed | Int8Array | Subseed txBits |
| securityLevel | number | Private key length |
Returns: Int8Array - Private key bytes
| Param | Type | Description |
| --- | --- | --- |
| key | Uint8Array | Private key txBits |
| Param | Type | Description |
| --- | --- | --- |
| digests | Int8Array | Digests txBits |
Returns: Int8Array - Address txBits
| Param | Type | Description |
| --- | --- | --- |
| normalizedBundleFragment | array | Normalized bundle fragment |
| signatureFragment | Int8Array | Signature fragment txBits |
Returns: Int8Array - Digest txBits
| Param | Type | Description |
| --- | --- | --- |
| normalizeBundleFragment | array | normalized bundle fragment |
| keyFragment | keyFragment | key fragment txBits |
Returns: Uint8Array - Signature Fragment txBits
| Param | Type | Description |
| --- | --- | --- |
| expectedAddress | string | Expected address txs |
| signatureFragments | array | Array of signatureFragments txs |
| bundleHash | string | Bundle hash txs |
| Param | Type | Description |
| --- | --- | --- |
| bundlehash | Hash | Bundle hash txs |
Normalizes the bundle hash, with resulting digits summing to zero.
Returns: Int8Array - Normalized bundle hash