DefinitelyTyped/types/elliptic
Micah Zoltu eeb27b323d Fixes up elliptic type definitions. (#35278)
Both `keyFromPrivate` and `keyFromPublic` work with Uint8Array.  `keyFromPublic` accepts anything with a length and an indexer, though I'm not sure how to correctly setup the types for that.  `keyFromPrivate` works with anything that `BN` works with as input, which includes `Uint8Array`s.

The only valid value for `enc` in `getPublic` and `getPrivate` is `hex`, so I narrowed the type on those to only support that instead of `string`.

The `compact` boolean on `getPublic` with an `enc` parameter set to anything other than `hex` will yield `[ this.getY().isEven() ? 0x02 : 0x03 ].concat(x)`.  I chose the string 'array' as an opinion here so at least future readers of code written to use that overload of `getPublic` can have an idea of what they are getting out when they pass something besides `'hex'` in.  (note: if nothing is a falsy value for `enc` is provided when `concat` is truthy, the function will behave the same as if no parameters were passed).
2019-05-09 11:11:47 -07:00
..
elliptic-tests.ts
index.d.ts
tsconfig.json
tslint.json