Socket
Socket
Sign inDemoInstall

starknet

Package Overview
Dependencies
Maintainers
1
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

starknet - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [1.5.2](https://github.com/seanjameshan/starknet.js/compare/v1.5.1...v1.5.2) (2021-11-03)
### Bug Fixes
- export needed types ([c51fe40](https://github.com/seanjameshan/starknet.js/commit/c51fe40d11e7459bce5adac6fe6e330fd73d264b))
- package-lock release ([a507598](https://github.com/seanjameshan/starknet.js/commit/a5075989ed789ba6fbca3ac304e306a1c8fc3d83))
## [1.5.1](https://github.com/seanjameshan/starknet.js/compare/v1.5.0...v1.5.1) (2021-11-02)

@@ -2,0 +9,0 @@

10

dist/ellipticalCurve.d.ts

@@ -5,5 +5,7 @@ import { ec as EC } from 'elliptic';

export declare const genKeyPair: (options?: EC.GenKeyPairOptions | undefined) => EC.KeyPair;
export declare function getKeyPair(pk: BigNumberish): EC.KeyPair;
export declare function getStarkKey(keyPair: EC.KeyPair): string;
export declare function sign(keyPair: EC.KeyPair, msgHash: string): EC.Signature;
export declare function verify(keyPair: EC.KeyPair, msgHash: string, sig: EC.Signature): boolean;
export declare type KeyPair = EC.KeyPair;
export declare type Signature = EC.Signature;
export declare function getKeyPair(pk: BigNumberish): KeyPair;
export declare function getStarkKey(keyPair: KeyPair): string;
export declare function sign(keyPair: KeyPair, msgHash: string): Signature;
export declare function verify(keyPair: KeyPair, msgHash: string, sig: Signature): boolean;

@@ -6,5 +6,7 @@ import { ec as EC } from 'elliptic';

export declare const genKeyPair: (options?: EC.GenKeyPairOptions | undefined) => EC.KeyPair;
export declare function getKeyPair(pk: BigNumberish): EC.KeyPair;
export declare function getStarkKey(keyPair: EC.KeyPair): string;
export declare function sign(keyPair: EC.KeyPair, msgHash: string): EC.Signature;
export declare function verify(keyPair: EC.KeyPair, msgHash: string, sig: EC.Signature): boolean;
export declare type KeyPair = EC.KeyPair;
export declare type Signature = EC.Signature;
export declare function getKeyPair(pk: BigNumberish): KeyPair;
export declare function getStarkKey(keyPair: KeyPair): string;
export declare function sign(keyPair: KeyPair, msgHash: string): Signature;
export declare function verify(keyPair: KeyPair, msgHash: string, sig: Signature): boolean;

2

package.json
{
"name": "starknet",
"version": "1.5.1",
"version": "1.5.2",
"description": "JavaScript library for StarkNet",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -43,3 +43,6 @@ import { ec as EC, curves } from 'elliptic';

export function getKeyPair(pk: BigNumberish): EC.KeyPair {
export type KeyPair = EC.KeyPair;
export type Signature = EC.Signature;
export function getKeyPair(pk: BigNumberish): KeyPair {
const pkBn = toBN(pk);

@@ -49,3 +52,3 @@ return ec.keyFromPrivate(removeHexPrefix(toHex(pkBn)), 'hex');

export function getStarkKey(keyPair: EC.KeyPair): string {
export function getStarkKey(keyPair: KeyPair): string {
// this method needs to be run to generate the .pub property used below

@@ -62,3 +65,3 @@ // the result can be dumped

*/
export function sign(keyPair: EC.KeyPair, msgHash: string): EC.Signature {
export function sign(keyPair: KeyPair, msgHash: string): Signature {
const msgHashBN = toBN(addHexPrefix(msgHash));

@@ -83,3 +86,3 @@ // Verify message hash has valid length.

*/
export function verify(keyPair: EC.KeyPair, msgHash: string, sig: EC.Signature): boolean {
export function verify(keyPair: KeyPair, msgHash: string, sig: Signature): boolean {
const msgHashBN = toBN(addHexPrefix(msgHash));

@@ -86,0 +89,0 @@ assertInRange(msgHashBN, ZERO, toBN(addHexPrefix(MAX_ECDSA_VAL)), 'msgHash');

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc