noble-curves/src
steveluscher 413725cfb3 Add pure annotation to all calls to twistedEdwards
This PR makes it so that if you only use _one_ export:

```ts
import { ed25519 } from '@noble/curves`;
```

…then only the `twistedEdwards` call that constructs that export will remain after bundling and tree-shaking.

Before this change, the compiled bundle contains all the code that constructs `ed25519ph` and `ed25519ctx` remains.

```js
var ed25519 = twistedEdwards(ed25519Defaults);
function ed25519_domain(data, ctx, phflag) {
  if (ctx.length > 255)
    throw new Error("Context is too big");
  return concatBytes(utf8ToBytes("SigEd25519 no Ed25519 collisions"), new Uint8Array([phflag ? 1 : 0, ctx.length]), ctx, data);
}
twistedEdwards({ ...ed25519Defaults, domain: ed25519_domain });
twistedEdwards({
  ...ed25519Defaults,
  domain: ed25519_domain,
  prehash: sha512
});
```

```js
var ed25519 = twistedEdwards(ed25519Defaults);
```
2023-06-30 17:36:16 +00:00
..
abstract Merge pull request #56 from CoinSpace/extraentropy 2023-06-28 14:44:56 +02:00
_shortw_utils.ts bump lockfile, add comment to shortw 2023-02-13 23:55:58 +01:00
bls12-381.ts bls: refactor slightly 2023-04-23 20:29:03 +02:00
bn254.ts Rename bn to bn254 2023-04-12 04:33:32 +02:00
ed448.ts Add pure annotation to all calls to twistedEdwards 2023-06-30 17:36:16 +00:00
ed25519.ts Add pure annotation to all calls to twistedEdwards 2023-06-30 17:36:16 +00:00
index.ts Merge packages into one 2022-12-28 07:37:45 +01:00
jubjub.ts Add pure annotation to all calls to twistedEdwards 2023-06-30 17:36:16 +00:00
p256.ts secp256k1 & other implementations: reduce bundle size by 20% by using PURE. 2023-05-20 10:49:50 +02:00
p384.ts secp256k1 & other implementations: reduce bundle size by 20% by using PURE. 2023-05-20 10:49:50 +02:00
p521.ts secp256k1 & other implementations: reduce bundle size by 20% by using PURE. 2023-05-20 10:49:50 +02:00
pasta.ts All files: rename Fp to Field 2023-03-21 06:51:18 +01:00
secp256k1.ts secp256k1 & other implementations: reduce bundle size by 20% by using PURE. 2023-05-20 10:49:50 +02:00