Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dydxprotocol/starkex-lib

Package Overview
Dependencies
Maintainers
8
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dydxprotocol/starkex-lib - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

4

__tests__/api-request.test.ts

@@ -11,6 +11,6 @@ import {

const internalApiRequest: Partial<InternalApiRequest> = {
timestamp: '2020-10-19T20:31:20.000Z',
method: ApiMethod.GET,
expiresAt: '2020-10-19T20:31:20.000Z',
requestPath: 'v3/users',
body: '',
requestPath: 'v3/users',
};

@@ -17,0 +17,0 @@

@@ -11,6 +11,6 @@ "use strict";

const internalApiRequest = {
timestamp: '2020-10-19T20:31:20.000Z',
method: types_1.ApiMethod.GET,
expiresAt: '2020-10-19T20:31:20.000Z',
requestPath: 'v3/users',
body: '',
requestPath: 'v3/users',
};

@@ -48,2 +48,2 @@ describe('ApiRequests', () => {

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLXJlcXVlc3QudGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL19fdGVzdHNfXy9hcGktcmVxdWVzdC50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsd0NBR3NCO0FBRXRCLGVBQWU7QUFDZiwyRkFBNkQ7QUFDN0QscUVBQTRDO0FBRTVDLE1BQU0sa0JBQWtCLEdBQWdDO0lBQ3RELE1BQU0sRUFBRSxpQkFBUyxDQUFDLEdBQUc7SUFDckIsU0FBUyxFQUFFLDBCQUEwQjtJQUNyQyxJQUFJLEVBQUUsRUFBRTtJQUNSLFdBQVcsRUFBRSxVQUFVO0NBQ3hCLENBQUM7QUFFRixRQUFRLENBQUMsYUFBYSxFQUFFLEdBQUcsRUFBRTtJQUMzQixRQUFRLENBQUM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xZQUFZLENBQUMsVUFBVSxDQUFDLENBQUMsZUFBZSxDQUFDLFNBQVMsQ0FBQyxDQUFDO1lBQzdGLE1BQU0sQ0FBQyxZQUFZLENBQUMsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDckMsQ0FBQyxDQUFDLENBQUM7UUFFSCxFQUFFLENBQUMsK0RBQStELEVBQUUsR0FBRyxFQUFFO1lBQ3ZFLE1BQU0sVUFBVSxHQUF1QjtnQkFDckMsR0FBRyxrQkFBa0I7Z0JBQ3JCLFNBQVMsRUFBRSxnQ0FBZ0IsQ0FBQyxPQUFPLENBQUMsU0FBUzthQUN4QixDQUFDO1lBQ3hCLE1BQU0sU0FBUyxHQUFXLHFCQUFVLENBQUMsWUFBWSxDQUMvQyxVQUFVLENBQ1gsQ0FBQyxJQUFJLENBQUMsZ0NBQWdCLENBQUMsWUFBWSxDQUFDLFVBQVUsQ0FBQyxDQUFDO1lBQ2pELE1BQU0sWUFBWSxHQUFZLHFCQUFVLENBQUMsWUFBWSxDQUFDLFVBQVUsQ0FBQyxDQUFDLGVBQWUsQ0FBQyxTQUFTLENBQUMsQ0FBQztZQUM3RixNQUFNLENBQUMsWUFBWSxDQUFDLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ3RDLENBQUMsQ0FBQyxDQUFDO0lBQ0wsQ0FBQyxDQUFDLENBQUM7QUFDTCxDQUFDLENBQUMsQ0FBQyJ9
import Signable from './signable';
import { InternalApiRequest } from './types';
/**
* Wrapper object to convert, hash, sign, or verify the signature of an api-key.
* Wrapper object to hash, sign, or verify an API request.
*/

@@ -6,0 +6,0 @@ export default class ApiRequest extends Signable<InternalApiRequest> {

@@ -9,3 +9,3 @@ "use strict";

/**
* Wrapper object to convert, hash, sign, or verify the signature of an api-key.
* Wrapper object to hash, sign, or verify an API request.
*/

@@ -18,3 +18,3 @@ class ApiRequest extends signable_1.default {

const apiRequest = this.starkwareObject;
const message = apiRequest.expiresAt +
const message = apiRequest.timestamp +
apiRequest.method +

@@ -21,0 +21,0 @@ apiRequest.requestPath +

@@ -77,7 +77,7 @@ import * as elliptic from 'elliptic';

export interface InternalApiRequest {
publicKey: string;
timestamp: string;
method: ApiMethod;
expiresAt: string;
requestPath: string;
body: string;
requestPath: string;
publicKey: string;
}

@@ -84,0 +84,0 @@ export interface InternalRegistration {

{
"name": "@dydxprotocol/starkex-lib",
"version": "0.3.0",
"version": "0.3.1",
"description": "Cryptographic functions for use with StarkEx",

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

@@ -9,3 +9,3 @@ import nodeCrypto from 'crypto';

/**
* Wrapper object to convert, hash, sign, or verify the signature of an api-key.
* Wrapper object to hash, sign, or verify an API request.
*/

@@ -23,3 +23,3 @@ export default class ApiRequest extends Signable<InternalApiRequest> {

const message = apiRequest.expiresAt +
const message = apiRequest.timestamp +
apiRequest.method +

@@ -26,0 +26,0 @@ apiRequest.requestPath +

@@ -99,7 +99,7 @@ import * as elliptic from 'elliptic';

export interface InternalApiRequest {
publicKey: string,
timestamp: string,
method: ApiMethod,
expiresAt: string,
requestPath: string,
body: string,
requestPath: string,
publicKey: string,
}

@@ -106,0 +106,0 @@

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