New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eosjs

Package Overview
Dependencies
Maintainers
5
Versions
292
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eosjs - npm Package Compare versions

Comparing version 20.0.0-beta2.1 to 20.0.0-beta2.2

4

dist/eosjs-api-interfaces.d.ts

@@ -1,2 +0,2 @@

import { Abi, PushTransactionArgs } from "./eosjs-rpc-interfaces";
import { Abi } from "./eosjs-rpc-interfaces";
/** Arguments to `getRequiredKeys` */

@@ -49,3 +49,3 @@ export interface AuthorityProviderArgs {

/** Sign a transaction */
sign: (args: SignatureProviderArgs) => Promise<PushTransactionArgs>;
sign: (args: SignatureProviderArgs) => Promise<string[]>;
}

@@ -77,3 +77,2 @@ /**

* * `broadcast`: broadcast this transaction?
* * `sign`: sign this transaction?
* * If both `blocksBehind` and `expireSeconds` are present,

@@ -84,5 +83,4 @@ * then fetch the block which is `blocksBehind` behind head block,

*/
transact(transaction: any, { broadcast, sign, blocksBehind, expireSeconds }?: {
transact(transaction: any, { broadcast, blocksBehind, expireSeconds }?: {
broadcast?: boolean;
sign?: boolean;
blocksBehind?: number;

@@ -89,0 +87,0 @@ expireSeconds?: number;

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

* * `broadcast`: broadcast this transaction?
* * `sign`: sign this transaction?
* * If both `blocksBehind` and `expireSeconds` are present,

@@ -344,7 +343,7 @@ * then fetch the block which is `blocksBehind` behind head block,

Api.prototype.transact = function (transaction, _a) {
var _b = _a === void 0 ? {} : _a, _c = _b.broadcast, broadcast = _c === void 0 ? true : _c, _d = _b.sign, sign = _d === void 0 ? true : _d, blocksBehind = _b.blocksBehind, expireSeconds = _b.expireSeconds;
var _b = _a === void 0 ? {} : _a, _c = _b.broadcast, broadcast = _c === void 0 ? true : _c, blocksBehind = _b.blocksBehind, expireSeconds = _b.expireSeconds;
return __awaiter(this, void 0, void 0, function () {
var info, refBlock, abis, _e, _f, serializedTransaction, pushTransactionArgs, availableKeys, requiredKeys;
return __generator(this, function (_g) {
switch (_g.label) {
var info, refBlock, abis, _d, _e, serializedTransaction, availableKeys, requiredKeys, signatures, pushTransactionArgs;
return __generator(this, function (_f) {
switch (_f.label) {
case 0:

@@ -354,5 +353,5 @@ if (!!this.chainId) return [3 /*break*/, 2];

case 1:
info = _g.sent();
info = _f.sent();
this.chainId = info.chain_id;
_g.label = 2;
_f.label = 2;
case 2:

@@ -363,9 +362,9 @@ if (!(typeof blocksBehind === "number" && expireSeconds)) return [3 /*break*/, 6];

case 3:
info = _g.sent();
_g.label = 4;
info = _f.sent();
_f.label = 4;
case 4: return [4 /*yield*/, this.rpc.get_block(info.head_block_num - blocksBehind)];
case 5:
refBlock = _g.sent();
refBlock = _f.sent();
transaction = __assign({}, ser.transactionHeader(refBlock, expireSeconds), transaction);
_g.label = 6;
_f.label = 6;
case 6:

@@ -377,17 +376,15 @@ if (!this.hasRequiredTaposFields(transaction)) {

case 7:
abis = _g.sent();
_e = [{}, transaction];
_f = {};
abis = _f.sent();
_d = [{}, transaction];
_e = {};
return [4 /*yield*/, this.serializeActions(transaction.actions)];
case 8:
transaction = __assign.apply(void 0, _e.concat([(_f.actions = _g.sent(), _f)]));
transaction = __assign.apply(void 0, _d.concat([(_e.actions = _f.sent(), _e)]));
serializedTransaction = this.serializeTransaction(transaction);
pushTransactionArgs = { serializedTransaction: serializedTransaction, signatures: [] };
if (!sign) return [3 /*break*/, 12];
return [4 /*yield*/, this.signatureProvider.getAvailableKeys()];
case 9:
availableKeys = _g.sent();
availableKeys = _f.sent();
return [4 /*yield*/, this.authorityProvider.getRequiredKeys({ transaction: transaction, availableKeys: availableKeys })];
case 10:
requiredKeys = _g.sent();
requiredKeys = _f.sent();
return [4 /*yield*/, this.signatureProvider.sign({

@@ -400,5 +397,4 @@ chainId: this.chainId,

case 11:
pushTransactionArgs = _g.sent();
_g.label = 12;
case 12:
signatures = _f.sent();
pushTransactionArgs = { signatures: signatures, serializedTransaction: serializedTransaction };
if (broadcast) {

@@ -405,0 +401,0 @@ return [2 /*return*/, this.pushSignedTransaction(pushTransactionArgs)];

@@ -46,3 +46,3 @@ /**

/** Raw call to `/v1/chain/get_table_rows` */
get_table_rows({ json, code, scope, table, table_key, lower_bound, upper_bound, index_position, key_type, limit, }: any): Promise<any>;
get_table_rows({ json, code, scope, table, table_key, lower_bound, upper_bound, limit }: any): Promise<any>;
/** Get subset of `availableKeys` needed to meet authorities in `transaction`. Implements `AuthorityProvider` */

@@ -49,0 +49,0 @@ getRequiredKeys(args: AuthorityProviderArgs): Promise<string[]>;

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

JsonRpc.prototype.get_table_rows = function (_a) {
var _b = _a.json, json = _b === void 0 ? true : _b, code = _a.code, scope = _a.scope, table = _a.table, _c = _a.table_key, table_key = _c === void 0 ? "" : _c, _d = _a.lower_bound, lower_bound = _d === void 0 ? "" : _d, _e = _a.upper_bound, upper_bound = _e === void 0 ? "" : _e, _f = _a.index_position, index_position = _f === void 0 ? 1 : _f, _g = _a.key_type, key_type = _g === void 0 ? "" : _g, _h = _a.limit, limit = _h === void 0 ? 10 : _h;
var _b = _a.json, json = _b === void 0 ? true : _b, code = _a.code, scope = _a.scope, table = _a.table, _c = _a.table_key, table_key = _c === void 0 ? "" : _c, _d = _a.lower_bound, lower_bound = _d === void 0 ? "" : _d, _e = _a.upper_bound, upper_bound = _e === void 0 ? "" : _e, _f = _a.limit, limit = _f === void 0 ? 10 : _f;
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_j) {
switch (_j.label) {
return __generator(this, function (_g) {
switch (_g.label) {
case 0: return [4 /*yield*/, this.fetch("/v1/chain/get_table_rows", {

@@ -288,7 +288,5 @@ json: json,

upper_bound: upper_bound,
index_position: index_position,
key_type: key_type,
limit: limit,
})];
case 1: return [2 /*return*/, _j.sent()];
case 1: return [2 /*return*/, _g.sent()];
}

@@ -295,0 +293,0 @@ });

@@ -16,6 +16,3 @@ /**

/** Sign a transaction */
sign({ chainId, requiredKeys, serializedTransaction }: SignatureProviderArgs): Promise<{
signatures: any[];
serializedTransaction: Uint8Array;
}>;
sign({ chainId, requiredKeys, serializedTransaction }: SignatureProviderArgs): Promise<any[]>;
}

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

return __awaiter(this, void 0, void 0, function () {
var signBuf, signatures;
var signBuf;
var _this = this;

@@ -98,4 +98,3 @@ return __generator(this, function (_b) {

]);
signatures = requiredKeys.map(function (pub) { return ecc.Signature.sign(signBuf, _this.keys.get(eosjs_numeric_1.convertLegacyPublicKey(pub))).toString(); });
return [2 /*return*/, { signatures: signatures, serializedTransaction: serializedTransaction }];
return [2 /*return*/, requiredKeys.map(function (pub) { return ecc.Signature.sign(signBuf, _this.keys.get(eosjs_numeric_1.convertLegacyPublicKey(pub))).toString(); })];
});

@@ -102,0 +101,0 @@ });

@@ -14,12 +14,6 @@ /**

}
/** Options for serialize() and deserialize() */
export interface SerializerOptions {
bytesAsUint8Array?: boolean;
}
/** State for serialize() and deserialize() */
export declare class SerializerState {
options: SerializerOptions;
/** Have any binary extensions been skipped? */
skippedBinaryExtension: boolean;
constructor(options?: SerializerOptions);
}

@@ -26,0 +20,0 @@ /** A type in an abi */

@@ -48,7 +48,5 @@ "use strict";

var SerializerState = /** @class */ (function () {
function SerializerState(options) {
if (options === void 0) { options = {}; }
function SerializerState() {
/** Have any binary extensions been skipped? */
this.skippedBinaryExtension = false;
this.options = options;
}

@@ -98,3 +96,3 @@ return SerializerState;

SerialBuffer.prototype.asUint8Array = function () {
return new Uint8Array(this.array.buffer, this.array.byteOffset, this.length);
return new Uint8Array(this.array.buffer, 0, this.length);
};

@@ -134,3 +132,3 @@ /** Append bytes */

}
var result = new Uint8Array(this.array.buffer, this.array.byteOffset + this.readPos, len);
var result = new Uint8Array(this.array.buffer, this.readPos, len);
this.readPos += len;

@@ -554,5 +552,2 @@ return result;

var e_2, _a;
if (typeof data !== "object") {
throw new Error("expected object containing data: " + JSON.stringify(data));
}
if (this.base) {

@@ -794,18 +789,4 @@ this.base.serialize(buffer, data, state, allowExtensions);

name: "bytes",
serialize: function (buffer, data) {
if (data instanceof Uint8Array || Array.isArray(data)) {
buffer.pushBytes(data);
}
else {
buffer.pushBytes(hexToUint8Array(data));
}
},
deserialize: function (buffer, state) {
if (state.options.bytesAsUint8Array) {
return buffer.getBytes();
}
else {
return arrayToHex(buffer.getBytes());
}
},
serialize: function (buffer, data) { buffer.pushBytes(hexToUint8Array(data)); },
deserialize: function (buffer) { return arrayToHex(buffer.getBytes()); },
}),

@@ -812,0 +793,0 @@ string: createType({

@@ -0,7 +1,9 @@

import "babel-polyfill";
import Api from "./eosjs-api";
import * as ApiInterfaces from "./eosjs-api-interfaces";
import JsonRpc from "./eosjs-jsonrpc";
import JsSignatureProvider from "./eosjs-jssig";
import * as RpcInterfaces from "./eosjs-rpc-interfaces";
import RpcError from "./eosjs-rpcerror";
import * as Serialize from "./eosjs-serialize";
export { Api, ApiInterfaces, JsonRpc, RpcInterfaces, RpcError, Serialize };
export { Api, ApiInterfaces, JsonRpc, RpcInterfaces, RpcError, JsSignatureProvider, Serialize };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("babel-polyfill");
var eosjs_api_1 = require("./eosjs-api");

@@ -9,2 +10,4 @@ exports.Api = eosjs_api_1.default;

exports.JsonRpc = eosjs_jsonrpc_1.default;
var eosjs_jssig_1 = require("./eosjs-jssig");
exports.JsSignatureProvider = eosjs_jssig_1.default;
var RpcInterfaces = require("./eosjs-rpc-interfaces");

@@ -11,0 +14,0 @@ exports.RpcInterfaces = RpcInterfaces;

@@ -331,6 +331,8 @@ // https://gist.githubusercontent.com/wlzla000/bac83df6d3c51916c4dd0bc947e46947/raw/7ee3462b095ab22580ddaf191f44a590da6fe33b/RIPEMD-160.js

var X = new Array(t).fill(undefined).map(function (_, i) {
return function (j) {
return new DataView(padded, i * block_size, block_size).getUint32(j * word_size, true // Little-endian
);
};
return new Proxy(new DataView(padded, i * block_size, block_size), {
get: function get(block_view, j) {
return block_view.getUint32(j * word_size, true // Little-endian
);
}
});
});

@@ -362,3 +364,3 @@

// Left rounds
var _T = RIPEMD160.add_modulo32(RIPEMD160.rol32(RIPEMD160.add_modulo32(A, RIPEMD160.f(j, B, C, D), X[i](r[j]), RIPEMD160.K(j)), s[j]), E);
var _T = RIPEMD160.add_modulo32(RIPEMD160.rol32(RIPEMD160.add_modulo32(A, RIPEMD160.f(j, B, C, D), X[i][r[j]], RIPEMD160.K(j)), s[j]), E);
A = E;

@@ -371,3 +373,3 @@ E = D;

// Right rounds
_T = RIPEMD160.add_modulo32(RIPEMD160.rol32(RIPEMD160.add_modulo32(AP, RIPEMD160.f(79 - j, BP, CP, DP), X[i](rP[j]), RIPEMD160.KP(j)), sP[j]), EP);
_T = RIPEMD160.add_modulo32(RIPEMD160.rol32(RIPEMD160.add_modulo32(AP, RIPEMD160.f(79 - j, BP, CP, DP), X[i][rP[j]], RIPEMD160.KP(j)), sP[j]), EP);
AP = EP;

@@ -374,0 +376,0 @@ EP = DP;

@@ -1,25 +0,4 @@

# Transactions
## Example: Buy ram
To be able to send transactions and trigger actions on the blockchain, you must have an instance of `Api`.
The signature provider must contains the private keys corresponsing to the actors and permissions of the actions.
```javascript
const { Api, JsonRpc, JsSignatureProvider } = require('eosjs');
const fetch = require('node-fetch'); // node only; not needed in browsers
const { TextDecoder, TextEncoder } = require('text-encoding'); // node, IE11 and IE Edge Browsers
const privateKeys = [privateKey1];
const signatureProvider = new JsSignatureProvider(privateKeys);
const rpc = new JsonRpc('http://127.0.0.1:8000', { fetch });
const api = new Api({ rpc, signatureProvider, textDecoder: new TextDecoder(), textEncoder: new TextEncoder() });
```
## Examples
### Buy ram
```javascript
const result = await api.transact({

@@ -45,3 +24,3 @@ actions: [{

### Stake
## Example: Stake

@@ -96,3 +75,3 @@ ```javascript

### Create New Account (multiple actions)
## Example: Create New Account (multiple actions)

@@ -99,0 +78,0 @@ ```javascript

{
"name": "eosjs",
"version": "20.0.0-beta2.1",
"version": "20.0.0-beta2.2",
"description": "Talk to eos API",
"main": "dist/index.js",
"scripts": {
"prepare": "npm run build",
"prepublish": "npm run build",
"test": "jest",

@@ -27,3 +27,3 @@ "lint": "tslint -c tslint.json src/**/*.ts",

"@types/jest": "^23.3.1",
"babel-runtime": "^6.26.0",
"babel-polyfill": "^6.26.0",
"eosjs-ecc": "^4.0.1",

@@ -35,3 +35,2 @@ "text-encoding": "^0.6.4"

"babel-cli": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",

@@ -38,0 +37,0 @@ "babel-preset-stage-1": "^6.24.1",

@@ -23,6 +23,3 @@ ⚠️ ***Important! We recently released a major breaking rewrite for eosjs. Be sure to lock your dependencies.*** ⚠️

```js
import { Api, JsonRpc, RpcError } from 'eosjs';
// If using default signature provider
import JsSignatureProvider from 'eosjs/dist/eosjs-jssig'
import { Api, JsonRpc, RpcError, JsSignatureProvider } from 'eosjs';
```

@@ -34,7 +31,5 @@

```js
const { Api, JsonRpc, RpcError } = require('eosjs');
const JsSignatureProvider = require('eosjs/dist/eosjs-jssig');
const { Api, JsonRpc, RpcError, JsSignatureProvider } = require('eosjs');
const fetch = require('node-fetch'); // node only; not needed in browsers
const { TextDecoder, TextEncoder } = require('text-encoding'); // IE11 and IE Edge Browsers only
const {TextEncoder,TextDecoder} = require('util') // node only; native TextEncoder/Decoder
const { TextDecoder, TextEncoder } = require('text-encoding'); // node, IE11 and IE Edge Browsers
```

@@ -105,3 +100,3 @@

if (e instanceof RpcError)
console.log(JSON.stringify(e.json, null, 2));
console.log(JSON.stringify(e.json, null, 2);
}

@@ -108,0 +103,0 @@ ...

// copyright defined in eosjs/LICENSE.txt
import { Abi, PushTransactionArgs } from "./eosjs-rpc-interfaces";
import { Abi } from "./eosjs-rpc-interfaces";

@@ -66,3 +66,3 @@ /** Arguments to `getRequiredKeys` */

/** Sign a transaction */
sign: (args: SignatureProviderArgs) => Promise<PushTransactionArgs>;
sign: (args: SignatureProviderArgs) => Promise<string[]>;
}

@@ -210,3 +210,2 @@ /**

* * `broadcast`: broadcast this transaction?
* * `sign`: sign this transaction?
* * If both `blocksBehind` and `expireSeconds` are present,

@@ -217,4 +216,4 @@ * then fetch the block which is `blocksBehind` behind head block,

*/
public async transact(transaction: any, { broadcast = true, sign = true, blocksBehind, expireSeconds }:
{ broadcast?: boolean; sign?: boolean; blocksBehind?: number; expireSeconds?: number; } = {}): Promise<any> {
public async transact(transaction: any, { broadcast = true, blocksBehind, expireSeconds }:
{ broadcast?: boolean; blocksBehind?: number; expireSeconds?: number; } = {}): Promise<any> {
let info: GetInfoResult;

@@ -242,14 +241,11 @@

const serializedTransaction = this.serializeTransaction(transaction);
let pushTransactionArgs: PushTransactionArgs = { serializedTransaction, signatures: [] };
if (sign) {
const availableKeys = await this.signatureProvider.getAvailableKeys();
const requiredKeys = await this.authorityProvider.getRequiredKeys({ transaction, availableKeys });
pushTransactionArgs = await this.signatureProvider.sign({
chainId: this.chainId,
requiredKeys,
serializedTransaction,
abis,
});
}
const availableKeys = await this.signatureProvider.getAvailableKeys();
const requiredKeys = await this.authorityProvider.getRequiredKeys({ transaction, availableKeys });
const signatures = await this.signatureProvider.sign({
chainId: this.chainId,
requiredKeys,
serializedTransaction,
abis,
});
const pushTransactionArgs = { signatures, serializedTransaction };
if (broadcast) {

@@ -256,0 +252,0 @@ return this.pushSignedTransaction(pushTransactionArgs);

@@ -144,6 +144,3 @@ /**

upper_bound = "",
index_position = 1,
key_type = "",
limit = 10,
}: any): Promise<any> {
limit = 10 }: any): Promise<any> {
return await this.fetch(

@@ -158,4 +155,2 @@ "/v1/chain/get_table_rows", {

upper_bound,
index_position,
key_type,
limit,

@@ -162,0 +157,0 @@ });

@@ -37,7 +37,6 @@ /**

]);
const signatures = requiredKeys.map(
return requiredKeys.map(
(pub) => ecc.Signature.sign(signBuf, this.keys.get(convertLegacyPublicKey(pub))).toString(),
);
return { signatures, serializedTransaction };
}
}

@@ -21,17 +21,6 @@ /**

/** Options for serialize() and deserialize() */
export interface SerializerOptions {
bytesAsUint8Array?: boolean;
}
/** State for serialize() and deserialize() */
export class SerializerState {
public options: SerializerOptions;
/** Have any binary extensions been skipped? */
public skippedBinaryExtension = false;
constructor(options: SerializerOptions = {}) {
this.options = options;
}
}

@@ -161,3 +150,3 @@

public asUint8Array() {
return new Uint8Array(this.array.buffer, this.array.byteOffset, this.length);
return new Uint8Array(this.array.buffer, 0, this.length);
}

@@ -198,3 +187,3 @@

}
const result = new Uint8Array(this.array.buffer, this.array.byteOffset + this.readPos, len);
const result = new Uint8Array(this.array.buffer, this.readPos, len);
this.readPos += len;

@@ -633,5 +622,2 @@ return result;

state = new SerializerState(), allowExtensions = true) {
if (typeof data !== "object") {
throw new Error("expected object containing data: " + JSON.stringify(data));
}
if (this.base) {

@@ -876,16 +862,4 @@ this.base.serialize(buffer, data, state, allowExtensions);

name: "bytes",
serialize(buffer: SerialBuffer, data: string | Uint8Array | number[]) {
if (data instanceof Uint8Array || Array.isArray(data)) {
buffer.pushBytes(data);
} else {
buffer.pushBytes(hexToUint8Array(data));
}
},
deserialize(buffer: SerialBuffer, state?: SerializerState) {
if (state.options.bytesAsUint8Array) {
return buffer.getBytes();
} else {
return arrayToHex(buffer.getBytes());
}
},
serialize(buffer: SerialBuffer, data: string) { buffer.pushBytes(hexToUint8Array(data)); },
deserialize(buffer: SerialBuffer) { return arrayToHex(buffer.getBytes()); },
}),

@@ -892,0 +866,0 @@ string: createType({

@@ -0,4 +1,6 @@

import "babel-polyfill";
import Api from "./eosjs-api";
import * as ApiInterfaces from "./eosjs-api-interfaces";
import JsonRpc from "./eosjs-jsonrpc";
import JsSignatureProvider from "./eosjs-jssig";
import * as RpcInterfaces from "./eosjs-rpc-interfaces";

@@ -8,2 +10,2 @@ import RpcError from "./eosjs-rpcerror";

export { Api, ApiInterfaces, JsonRpc, RpcInterfaces, RpcError, Serialize };
export { Api, ApiInterfaces, JsonRpc, RpcInterfaces, RpcError, JsSignatureProvider, Serialize };

@@ -331,6 +331,8 @@ // https://gist.githubusercontent.com/wlzla000/bac83df6d3c51916c4dd0bc947e46947/raw/7ee3462b095ab22580ddaf191f44a590da6fe33b/RIPEMD-160.js

var X = new Array(t).fill(undefined).map(function (_, i) {
return function (j) {
return new DataView(padded, i * block_size, block_size).getUint32(j * word_size, true // Little-endian
);
};
return new Proxy(new DataView(padded, i * block_size, block_size), {
get: function get(block_view, j) {
return block_view.getUint32(j * word_size, true // Little-endian
);
}
});
});

@@ -362,3 +364,3 @@

// Left rounds
var _T = RIPEMD160.add_modulo32(RIPEMD160.rol32(RIPEMD160.add_modulo32(A, RIPEMD160.f(j, B, C, D), X[i](r[j]), RIPEMD160.K(j)), s[j]), E);
var _T = RIPEMD160.add_modulo32(RIPEMD160.rol32(RIPEMD160.add_modulo32(A, RIPEMD160.f(j, B, C, D), X[i][r[j]], RIPEMD160.K(j)), s[j]), E);
A = E;

@@ -371,3 +373,3 @@ E = D;

// Right rounds
_T = RIPEMD160.add_modulo32(RIPEMD160.rol32(RIPEMD160.add_modulo32(AP, RIPEMD160.f(79 - j, BP, CP, DP), X[i](rP[j]), RIPEMD160.KP(j)), sP[j]), EP);
_T = RIPEMD160.add_modulo32(RIPEMD160.rol32(RIPEMD160.add_modulo32(AP, RIPEMD160.f(79 - j, BP, CP, DP), X[i][rP[j]], RIPEMD160.KP(j)), sP[j]), EP);
AP = EP;

@@ -374,0 +376,0 @@ EP = DP;

@@ -382,10 +382,14 @@ // https://gist.githubusercontent.com/wlzla000/bac83df6d3c51916c4dd0bc947e46947/raw/7ee3462b095ab22580ddaf191f44a590da6fe33b/RIPEMD-160.js

.fill(undefined)
.map((_, i) => j => (
.map((_, i) => new Proxy(
new DataView(
padded, i * block_size, block_size
).getUint32(
j * word_size,
true // Little-endian
)
));
), {
get(block_view, j)
{
return block_view.getUint32(
j * word_size,
true // Little-endian
);
}
}));

@@ -416,3 +420,3 @@ // The result of RIPEMD-160 is contained in five 32-bit words,

RIPEMD160.f(j, B, C, D),
X[i](r[j]),
X[i][r[j]],
RIPEMD160.K(j)

@@ -441,3 +445,3 @@ ),

),
X[i](rP[j]),
X[i][rP[j]],
RIPEMD160.KP(j)

@@ -444,0 +448,0 @@ ),

@@ -354,4 +354,2 @@ import JsonRpc from "../eosjs-jsonrpc";

const limit = 20;
const indexPosition = 1;
const keyType = "str";
const expReturn = { data: "12345" };

@@ -366,4 +364,2 @@ const callParams = {

upper_bound: upperBound,
index_position: indexPosition,
key_type: keyType,
limit,

@@ -394,4 +390,2 @@ };

const limit = 10;
const indexPosition = 1;
const keyType = "";
const expReturn = { data: "12345" };

@@ -412,4 +406,2 @@ const callParams = {

upper_bound: upperBound,
index_position: indexPosition,
key_type: keyType,
limit,

@@ -416,0 +408,0 @@ }),

@@ -37,7 +37,7 @@ import * as ecc from "eosjs-ecc";

const signOutput = await provider.sign({ chainId, requiredKeys, serializedTransaction, abis });
const signatures = await provider.sign({ chainId, requiredKeys, serializedTransaction, abis });
expect(eccSignatureSign).toHaveBeenCalledTimes(2);
expect(signOutput).toEqual({ signatures: [privateKeys[0], privateKeys[2]], serializedTransaction });
expect(signatures).toEqual([privateKeys[0], privateKeys[2]]);
});
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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