Socket
Socket
Sign inDemoInstall

@steemit/rpc-auth

Package Overview
Dependencies
1
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.1.0

3

lib/index.d.ts
/// <reference types="node" />
import { PrivateKey } from 'dsteem';
/**

@@ -43,3 +42,3 @@ * Signing constant used to reserve opcode space and prevent cross-protocol attacks.

*/
export declare function sign(request: JsonRpcRequest, account: string, keys: PrivateKey[]): SignedJsonRpcRequest;
export declare function sign(request: JsonRpcRequest, account: string, keys: any[]): SignedJsonRpcRequest;
/**

@@ -46,0 +45,0 @@ * Verify that message is signed by account and that the signatures are valid, should throw if verification fails.

@@ -52,2 +52,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var libcrypto_1 = require("@steemit/libcrypto");
var crypto_1 = require("crypto");

@@ -113,3 +114,6 @@ /**

var key = keys_1[_i];
var signature = key.sign(message).toString();
if (typeof key === 'string') {
key = libcrypto_1.PrivateKey.from(key);
}
var signature = libcrypto_1.hexify(key.sign(message.buffer));
signatures.push(signature);

@@ -116,0 +120,0 @@ }

{
"name": "@steemit/rpc-auth",
"description": "JSON-RPC 2.0 authentication using steem blockchain authorities",
"version": "1.0.2",
"version": "1.1.0",
"license": "MIT",

@@ -19,3 +19,3 @@ "main": "./lib/index",

"dependencies": {
"dsteem": "^0.8.5"
"@steemit/libcrypto": "^1.0.1"
},

@@ -25,2 +25,3 @@ "devDependencies": {

"@types/node": "^8.0.26",
"dsteem": "^0.8.5",
"mocha": "^4.0.1",

@@ -27,0 +28,0 @@ "node-fetch": "^1.7.3",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc