Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create an ec.Signature instance from r,s in typescript #306

Open
fauxbytes opened this issue Mar 31, 2023 · 0 comments
Open

How to create an ec.Signature instance from r,s in typescript #306

fauxbytes opened this issue Mar 31, 2023 · 0 comments

Comments

@fauxbytes
Copy link

fauxbytes commented Mar 31, 2023

Trying to instantiate a Signature object, e.g. like it's done here.

import { ec } from "elliptic";
import Signature = ec.Signature;

console.log(new Signature({r: '00', s: '00'}))

test-elliptic.zip

Getting an error:

$ npm run typecheck

> test-elliptic@1.0.0 typecheck
> tsc --noEmit

src/index.ts:4:17 - error TS2693: 'Signature' only refers to a type, but is being used as a value here.

Could you guide me on how to achieve this?
Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant