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

iotex-antenna

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iotex-antenna - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

CHANGELOG

3

index.js

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

/* eslint-disable import/no-unresolved */
module.exports = require('./dist/main.js');
module.exports = require("./lib/index.js");

@@ -12,3 +12,13 @@ "use strict";

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
class Account {
constructor() {
_defineProperty(this, "address", void 0);
_defineProperty(this, "privateKey", void 0);
_defineProperty(this, "publicKey", void 0);
}
static fromPrivateKey(privateKey) {

@@ -25,3 +35,3 @@ const obj = (0, _crypto.privateKeyToAccount)(privateKey);

const h = (0, _hash.hash256b)(bytes);
return Buffer.from((0, _crypto.makeSigner)(0)(h.toString('hex'), this.privateKey), 'hex');
return Buffer.from((0, _crypto.makeSigner)(0)(h.toString("hex"), this.privateKey), "hex");
}

@@ -31,2 +41,3 @@

exports.Account = Account;
exports.Account = Account;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY2NvdW50L2FjY291bnQudHMiXSwibmFtZXMiOlsiQWNjb3VudCIsImZyb21Qcml2YXRlS2V5IiwicHJpdmF0ZUtleSIsIm9iaiIsImFjdCIsImFkZHJlc3MiLCJwdWJsaWNLZXkiLCJzaWduIiwiYnl0ZXMiLCJoIiwiQnVmZmVyIiwiZnJvbSIsInRvU3RyaW5nIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7O0FBQ0E7Ozs7QUFVTyxNQUFNQSxPQUFOLENBQWtDO0FBQUE7QUFBQTs7QUFBQTs7QUFBQTtBQUFBOztBQUt2Qy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cyBBY2NvdW50IGltcGxlbWVudHMgSUFjY291bnQge1xuICBwdWJsaWMgYWRkcmVzczogc3RyaW5nO1xuICBwdWJsaWMgcHJpdmF0ZUtleTogc3RyaW5nO1xuICBwdWJsaWMgcHVibGljS2V5OiBzdHJpbmc7XG5cbiAgcHVibGljIHN0YXRpYyBmcm9tUHJpdmF0ZUtleShwcml2YXRlS2V5OiBzdHJpbmcpOiBJQWNjb3VudCB7XG4gICAgY29uc3Qgb2JqID0gcHJpdmF0ZUtleVRvQWNjb3VudChwcml2YXRlS2V5KTtcbiAgICBjb25zdCBhY3QgPSBuZXcgQWNjb3VudCgpO1xuICAgIGFjdC5hZGRyZXNzID0gb2JqLmFkZHJlc3M7XG4gICAgYWN0LnByaXZhdGVLZXkgPSBvYmoucHJpdmF0ZUtleTtcbiAgICBhY3QucHVibGljS2V5ID0gb2JqLnB1YmxpY0tleTtcbiAgICByZXR1cm4gYWN0O1xuICB9XG5cbiAgcHVibGljIHNpZ24oYnl0ZXM6IHN0cmluZyB8IEJ1ZmZlciB8IFVpbnQ4QXJyYXkpOiBCdWZmZXIge1xuICAgIGNvbnN0IGggPSBoYXNoMjU2YihieXRlcyk7XG4gICAgcmV0dXJuIEJ1ZmZlci5mcm9tKFxuICAgICAgbWFrZVNpZ25lcigwKShoLnRvU3RyaW5nKFwiaGV4XCIpLCB0aGlzLnByaXZhdGVLZXkpLFxuICAgICAgXCJoZXhcIlxuICAgICk7XG4gIH1cbn1cbiJdfQ==

@@ -14,5 +14,12 @@ "use strict";

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
class Accounts {
constructor(rpcMethod) {}
// @ts-ignore
constructor(rpcMethod) {
_defineProperty(this, "rpcMethod", void 0);
this.rpcMethod = rpcMethod;
}
create(entropy) {

@@ -35,2 +42,3 @@ const acct = _account.default.create(entropy);

exports.Accounts = Accounts;
exports.Accounts = Accounts;
//# sourceMapp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kuc2lnbihkYXRhKTtcbiAgfVxufVxuIl19

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

function fromRau(rau, unit) {
return convert(rau, unit, 'div');
return convert(rau, unit, "div");
}

@@ -30,3 +30,3 @@ /**

function toRau(num, unit) {
return convert(num, unit, 'multipliedBy');
return convert(num, unit, "multipliedBy");
}

@@ -38,23 +38,30 @@

switch (unit) {
case 'Rau':
case "Rau":
return num;
case 'KRau':
return rauBN[operator](new _bignumber.BigNumber('1000')).toString(10);
case "KRau":
// @ts-ignore
return rauBN[operator](new _bignumber.BigNumber("1000")).toString(10);
case 'MRau':
return rauBN[operator](new _bignumber.BigNumber('1000000')).toString(10);
case "MRau":
// @ts-ignore
return rauBN[operator](new _bignumber.BigNumber("1000000")).toString(10);
case 'GRau':
return rauBN[operator](new _bignumber.BigNumber('1000000000')).toString(10);
case "GRau":
// @ts-ignore
return rauBN[operator](new _bignumber.BigNumber("1000000000")).toString(10);
case 'Qev':
return rauBN[operator](new _bignumber.BigNumber('1000000000000')).toString(10);
case "Qev":
// @ts-ignore
return rauBN[operator](new _bignumber.BigNumber("1000000000000")).toString(10);
case 'Jing':
return rauBN[operator](new _bignumber.BigNumber('1000000000000000')).toString(10);
case "Jing":
// @ts-ignore
return rauBN[operator](new _bignumber.BigNumber("1000000000000000")).toString(10);
default:
return rauBN[operator](new _bignumber.BigNumber('1000000000000000000')).toString(10);
// @ts-ignore
return rauBN[operator](new _bignumber.BigNumber("1000000000000000000")).toString(10);
}
}
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY2NvdW50L3V0aWxzLnRzIl0sIm5hbWVzIjpbImZyb21SYXUiLCJyYXUiLCJ1bml0IiwiY29udmVydCIsInRvUmF1IiwibnVtIiwib3BlcmF0b3IiLCJyYXVCTiIsIkJpZ051bWJlciIsInRvU3RyaW5nIl0sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUFBOztBQUVB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yXShuZXcgQmlnTnVtYmVyKFwiMTAwMDAwMDAwMDAwMDAwMFwiKSkudG9TdHJpbmcoMTApO1xuICAgIGRlZmF1bHQ6XG4gICAgICAvLyBAdHMtaWdub3JlXG4gICAgICByZXR1cm4gcmF1Qk5bb3BlcmF0b3JdKG5ldyBCaWdOdW1iZXIoXCIxMDAwMDAwMDAwMDAwMDAwMDAwXCIpKS50b1N0cmluZygxMCk7XG4gIH1cbn1cbiJdfQ==

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

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
class AddressV1 {
constructor() {
_defineProperty(this, "payload", void 0);
}
static prefix() {

@@ -21,2 +27,3 @@ // TODO(tian): not sure how to deal with prefix for now

string() {
// @ts-ignore
const grouped = _bech.default.toWords(this.payload);

@@ -33,6 +40,8 @@

AddressV1.ADDRESS_LENGTH = 20;
AddressV1.MAINNET_PREFIX = 'io';
AddressV1.TESTNET_PREFIX = 'it';
_defineProperty(AddressV1, "ADDRESS_LENGTH", 20);
_defineProperty(AddressV1, "MAINNET_PREFIX", "io");
_defineProperty(AddressV1, "TESTNET_PREFIX", "it");
function fromBytes(bytes) {

@@ -61,2 +70,3 @@ if (bytes.length !== AddressV1.ADDRESS_LENGTH) {

return addr;
}
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcnlwdG8vYWRkcmVzcy50cyJdLCJuYW1lcyI6WyJBZGRyZXNzVjEiLCJwcmVmaXgiLCJNQUlOTkVUX1BSRUZJWCIsInN0cmluZyIsImdyb3VwZWQiLCJiZWNoMzIiLCJ0b1dvcmRzIiwicGF5bG9hZCIsImVuY29kZSIsImJ5dGVzIiwiZnJvbUJ5dGVzIiwibGVuZ3RoIiwiQUREUkVTU19MRU5HVEgiLCJFcnJvciIsImFkZHIiLCJmcm9tU3Rya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xb3Jkcyh3b3Jkcyk7XG4gIHJldHVybiBhZGRyO1xufVxuIl19

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

});
exports.publicKeyToAddress = publicKeyToAddress;
exports.privateKeyToAccount = privateKeyToAccount;
exports.makeSigner = void 0;
var _global = require("global");
var _elliptic = _interopRequireDefault(require("elliptic"));

@@ -18,16 +17,24 @@

var _address = require("./address");
var _hash = require("./hash");
var _address = require("./address");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// @ts-ignore
// @ts-ignore
const secp256k1 = new _elliptic.default.ec("secp256k1"); // eslint-disable-line
function publicKeyToAddress(publicKey) {
const key = secp256k1.keyFromPublic(publicKey, "hex");
const publicKeyBytes = key.getPublic(false, "ByteArray");
const hashBytes = (0, _hash.hash160b)(publicKeyBytes.slice(1));
return (0, _address.fromBytes)(hashBytes).string();
}
function privateKeyToAccount(privateKey) {
const buffer = _global.Buffer.from(privateKey, 'hex');
const buffer = Buffer.from(privateKey, "hex");
const ecKey = secp256k1.keyFromPrivate(buffer);
const publicKey = ecKey.getPublic(false, 'hex');
const publicKeyBytes = ecKey.getPublic(false, 'ByteArray');
const publicKey = ecKey.getPublic(false, "hex");
const publicKeyBytes = ecKey.getPublic(false, "ByteArray");
const hashBytes = (0, _hash.hash160b)(publicKeyBytes.slice(1));

@@ -43,9 +50,11 @@ const adObj = (0, _address.fromBytes)(hashBytes);

const makeSigner = addToV => (hash, privateKey) => {
const signature = secp256k1.keyFromPrivate(_global.Buffer.from(privateKey, 'hex')).sign(_global.Buffer.from(hash, 'hex'), {
canonical: true
const signature = secp256k1.keyFromPrivate(Buffer.from(privateKey, "hex")).sign(Buffer.from(hash, "hex"), {
canonical: true,
pers: undefined
});
const signed = (0, _account.encodeSignature)([_bytes.default.fromNumber(addToV + signature.recoveryParam), _bytes.default.pad(32, _bytes.default.fromNat(`0x${signature.r.toString(16)}`)), _bytes.default.pad(32, _bytes.default.fromNat(`0x${signature.s.toString(16)}`))]);
const signed = (0, _account.encodeSignature)([_bytes.default.fromNumber(addToV + (signature.recoveryParam || 0)), _bytes.default.pad(32, _bytes.default.fromNat(`0x${signature.r.toString(16)}`)), _bytes.default.pad(32, _bytes.default.fromNat(`0x${signature.s.toString(16)}`))]);
return signed.slice(2);
};
exports.makeSigner = makeSigner;
exports.makeSigner = makeSigner;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcnlwdG8vY3J5cHRvLnRzIl0sIm5hbWVzIjpbInNlY3AyNTZrMSIsImVsbGlwdGljIiwiZWMiLCJwdWJsaWNLZXlUb0FkZHJlc3MiLCJwdWJsaWNLZXkiLCJrZXkiLCJrZXlGcm9tUHVibGljIiwicHVibGljS2V5Qnl0ZXMiLCJnZXRQdWJsaWMiLCJoYXNoQnl0ZXMiLCJzbGljZSIsInN0cmluZyIsInByaXZhdGVLZXlUb0FjY291bnQiLCJwcml2YXRlS2V5IiwiYnVmZmVyIiwiQnVmZmVyIiwiZnJvbSIsImVjS2V5Iiwia2V5RnJvbVByaXZhdGUiLCJhZE9iaiIsImFkZHJlc3MiLCJtYWtlU2lnbmVyIiwiYWRkVG9WIiwiaGFzaCIsInNpZ25hdHVyZSIsInNpZ24iLCJjYW5vbmljYWwiLCJwZXJzIiwidW5kZWZpbmVkIiwic2lnbmVkIiwiQnl0ZXMiLCJmcm9tTnVtYmVyIiwicmVjb3ZlcnlQYXJhbSIsInBhZCIsImZyb21OYXQiLCJyIiwidG9TdHJpbmciLCJzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBQTs7QUFFQTs7QUFFQTs7QUFFQTs7QUFDQTs7OztBQU5BO0FBRUE7QUFNQSxNQUFNQSxTQUFTLEdBQUcsSUFBSUMsa0JBQVNDLEVBQWIsQ0FBZ0IsV0FBaEIsQ0FBbEIsQyxDQUFnRDs7QUFFekMsU0FBU0Msa0JBQVQsQ0FBNEJDLFNBQTVCLEVBQXVE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ZXMgPSBlY0tleS5nZXRQdWJsaWMoZmFsc2UsIFwiQnl0ZUFycmF5XCIpO1xuICBjb25zdCBoYXNoQnl0ZXMgPSBoYXNoMTYwYihwdWJsaWNLZXlCeXRlcy5zbGljZSgxKSk7XG4gIGNvbnN0IGFkT2JqID0gZnJvbUJ5dGVzKGhhc2hCeXRlcyk7XG4gIHJldHVybiB7XG4gICAgYWRkcmVzczogYWRPYmouc3RyaW5nKCksXG4gICAgcHVibGljS2V5LFxuICAgIHByaXZhdGVLZXlcbiAgfTtcbn1cblxuZXhwb3J0IGNvbnN0IG1ha2VTaWduZXIgPSAoYWRkVG9WOiBudW1iZXIpID0+IChcbiAgaGFzaDogc3RyaW5nLFxuICBwcml2YXRlS2V5OiBzdHJpbmdcbikgPT4ge1xuICBjb25zdCBzaWduYXR1cmUgPSBzZWNwMjU2azFcbiAgICAua2V5RnJvbVByaXZhdGUoQnVmZmVyLmZyb20ocHJpdmF0ZUtleSwgXCJoZXhcIikpXG4gICAgLnNpZ24oQnVmZmVyLmZyb20oaGFzaCwgXCJoZXhcIiksIHsgY2Fub25pY2FsOiB0cnVlLCBwZXJzOiB1bmRlZmluZWQgfSk7XG5cbiAgY29uc3Qgc2lnbmVkID0gZW5jb2RlU2lnbmF0dXJlKFtcbiAgICBCeXRlcy5mcm9tTnVtYmVyKGFkZFRvViArIChzaWduYXR1cmUucmVjb3ZlcnlQYXJhbSB8fCAwKSksXG4gICAgQnl0ZXMucGFkKDMyLCBCeXRlcy5mcm9tTmF0KGAweCR7c2lnbmF0dXJlLnIudG9TdHJpbmcoMTYpfWApKSxcbiAgICBCeXRlcy5wYWQoMzIsIEJ5dGVzLmZyb21OYXQoYDB4JHtzaWduYXR1cmUucy50b1N0cmluZygxNil9YCkpXG4gIF0pO1xuICByZXR1cm4gc2lnbmVkLnNsaWNlKDIpO1xufTtcbiJdfQ==

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

// @ts-ignore
// Computes the BLAKE2B hash of a string or byte array, and returns a Uint8Array

@@ -26,5 +27,7 @@ //

function hash256b(input) {
const k = new _sha.Keccak(256);
const k = new _sha.Keccak(256); // @ts-ignore
k.update(Buffer.from(input));
return k.digest();
}
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcnlwdG8vaGFzaC50cyJdLCJuYW1lcyI6WyJoYXNoMTYwYiIsImlucHV0IiwiZGlnZXN0IiwiaGFzaDI1NmIiLCJzbGljZSIsImsiLCJLZWNjYWsiLCJ1cGRhdGUiLCJCdWZmZXIiLCJmcm9tIl0sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUNBOztBQURBO0FBR0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNPLFNBQVNBLFFBQVQsQ0FBa0JDLEtBQWxCLEVBQStEO0FBQ3BFLFFBQU1DLE1BQU0sR0FBR0MsUUFBUSxDQUFDRixLQUFELENBQXZCO0FBQ0EsU0FBT0MsTUFBTSxDQUFDRSxLQUFQLENBQWEsRUFBYixDQUFQO0FBQ0Q7O0FBRU0sU0FBU0QsUUFBVCxDQUFrQkYsS0FBbEIsRUFBK0Q7QUFDcEUsUUFBTUksQ0FBQyxHQUFHLElBQUlDLFdBQUosQ0FBVyxHQUFYLENBQVYsQ0FEb0UsQ0FFcEU7O0FBQ0FELEVBQUFBLENBQUMsQ0FBQ0UsTUFBRixDQUFTQyxNQUFNLENBQUNDLElBQVAsQ0FBWVIsS0FBWixDQUFUO0FBQ0EsU0FBT0ksQ0FBQyxDQUFDSCxNQUFGLEVBQVA7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbIi8vIEB0cy1pZ25vcmVcbmltcG9ydCB7IEtlY2NhayB9IGZyb20gXCJzaGEzXCI7XG5cbi8vIENvbXB1dGVzIHRoZSBCTEFLRTJCIGhhc2ggb2YgYSBzdHJpbmcgb3IgYnl0ZSBhcnJheSwgYW5kIHJldHVybnMgYSBVaW50OEFycmF5XG4vL1xuLy8gUmV0dXJucyBhIG4tYnl0ZSBVaW50OEFycmF5XG4vL1xuLy8gUGFyYW1ldGVyczpcbi8vIC0gaW5wdXQgLSB0aGUgaW5wdXQgYnl0ZXMsIGFzIGEgc3RyaW5nLCBCdWZmZXIgb3IgVWludDhBcnJheVxuLy8gLSBrZXkgLSBvcHRpb25hbCBrZXkgVWludDhBcnJheSwgdXAgdG8gNjQgYnl0ZXNcbi8vIC0gb3V0bGVuIC0gb3B0aW9uYWwgb3V0cHV0IGxlbmd0aCBpbiBieXRlcywgZGVmYXVsdCA2NFxuZXhwb3J0IGZ1bmN0aW9uIGhhc2gxNjBiKGlucHV0OiBzdHJpbmcgfCBCdWZmZXIgfCBVaW50OEFycmF5KTogQnVmZmVyIHtcbiAgY29uc3QgZGlnZXN0ID0gaGFzaDI1NmIoaW5wdXQpO1xuICByZXR1cm4gZGlnZXN0LnNsaWNlKDEyKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGhhc2gyNTZiKGlucHV0OiBzdHJpbmcgfCBCdWZmZXIgfCBVaW50OEFycmF5KTogQnVmZmVyIHtcbiAgY29uc3QgayA9IG5ldyBLZWNjYWsoMjU2KTtcbiAgLy8gQHRzLWlnbm9yZVxuICBrLnVwZGF0ZShCdWZmZXIuZnJvbShpbnB1dCkpO1xuICByZXR1cm4gay5kaWdlc3QoKTtcbn1cbiJdfQ==

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

var _api_grpc_web_pb = _interopRequireDefault(require("../proto/api_grpc_web_pb"));
var _api_grpc_web_pb = _interopRequireDefault(require("../proto/generated/api_grpc_web_pb"));

@@ -15,4 +15,8 @@ var _types = require("./types");

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
class RpcMethod {
constructor(hostname) {
_defineProperty(this, "client", void 0);
this.client = new _api_grpc_web_pb.default.APIServicePromiseClient(hostname, null, null);

@@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RyYWN0UmVxdWVzdC5mcm9tKHBiUmVzcCk7XG4gIH1cblxuICBwdWJsaWMgYXN5bmMgc2VuZEFjdGlvbihcbiAgICByZXE6IElTZW5kQWN0aW9uUmVxdWVzdFxuICApOiBQcm9taXNlPElTZW5kQWN0aW9uUmVzcG9uc2U+IHtcbiAgICBjb25zdCBwYlJlcSA9IFNlbmRBY3Rpb25SZXF1ZXN0LnRvKHJlcSk7XG4gICAgY29uc3QgcGJSZXNwID0gYXdhaXQgdGhpcy5jbGllbnQuc2VuZEFjdGlvbihwYlJlcSk7XG4gICAgcmV0dXJuIFNlbmRBY3Rpb25SZXF1ZXN0LmZyb20ocGJSZXNwKTtcbiAgfVxuXG4gIHB1YmxpYyBhc3luYyBnZXRSZWNlaXB0QnlBY3Rpb24oXG4gICAgcmVxOiBJR2V0UmVjZWlwdEJ5QWN0aW9uUmVxdWVzdFxuICApOiBQcm9taXNlPElHZXRSZWNlaXB0QnlBY3Rpb25SZXNwb25zZT4ge1xuICAgIGNvbnN0IHBiUmVxID0gR2V0UmVjZWlwdEJ5QWN0aW9uUmVxdWVzdC50byhyZXEpO1xuICAgIGNvbnN0IHBiUmVzcCA9IGF3YWl0IHRoaXMuY2xpZW50LmdldFJlY2VpcHRCeUFjdGlvbihwYlJlcSk7XG4gICAgcmV0dXJuIEdldFJlY2VpcHRCeUFjdGlvblJlcXVlc3QuZnJvbShwYlJlc3ApO1xuICB9XG59XG4iXX0=

@@ -8,14 +8,18 @@ "use strict";

var _util = require("util");
var protoLoader = _interopRequireWildcard(require("@grpc/proto-loader"));
var _grpc = _interopRequireDefault(require("grpc"));
var protoLoader = _interopRequireWildcard(require("@grpc/proto-loader"));
var _util = require("util");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
class RpcMethod {
constructor(hostname) {
_defineProperty(this, "client", void 0);
const packageDefinition = protoLoader.loadSync(`${__dirname}/../proto/api.proto`, {

@@ -29,4 +33,5 @@ keepCase: true,

const iotexapi = _grpc.default.loadPackageDefinition(packageDefinition).iotexapi;
const iotexapi = _grpc.default.loadPackageDefinition(packageDefinition).iotexapi; // @ts-ignore
this.client = new iotexapi.APIService(hostname, _grpc.default.credentials.createInsecure(), null);

@@ -36,34 +41,41 @@ }

async getAccount(req) {
const getAccount = (0, _util.promisify)(this.client.getAccount.bind(this.client));
return await getAccount(req);
const getAccount = (0, _util.promisify)(this.client.getAccount.bind(this.client)); // @ts-ignore
return getAccount(req);
}
async getBlockMetas(req) {
const getBlockMetas = (0, _util.promisify)(this.client.getBlockMetas.bind(this.client));
return await getBlockMetas(req);
const getBlockMetas = (0, _util.promisify)(this.client.getBlockMetas.bind(this.client)); // @ts-ignore
return getBlockMetas(req);
}
async getChainMeta(req) {
const getChainMeta = (0, _util.promisify)(this.client.getChainMeta.bind(this.client));
return await getChainMeta(req);
const getChainMeta = (0, _util.promisify)(this.client.getChainMeta.bind(this.client)); // @ts-ignore
return getChainMeta(req);
}
async getActions(req) {
const getActions = (0, _util.promisify)(this.client.getActions.bind(this.client));
return await getActions(req);
const getActions = (0, _util.promisify)(this.client.getActions.bind(this.client)); // @ts-ignore
return getActions(req);
}
async suggestGasPrice(req) {
const suggestGasPrice = (0, _util.promisify)(this.client.suggestGasPrice.bind(this.client));
return await suggestGasPrice(req);
const suggestGasPrice = (0, _util.promisify)(this.client.suggestGasPrice.bind(this.client)); // @ts-ignore
return suggestGasPrice(req);
}
async getReceiptByAction(req) {
const getReceiptByAction = (0, _util.promisify)(this.client.getReceiptByAction.bind(this.client));
return await getReceiptByAction(req);
const getReceiptByAction = (0, _util.promisify)(this.client.getReceiptByAction.bind(this.client)); // @ts-ignore
return getReceiptByAction(req);
}
async readContract(req) {
const readContract = (0, _util.promisify)(this.client.readContract.bind(this.client));
return await readContract(req);
const readContract = (0, _util.promisify)(this.client.readContract.bind(this.client)); // @ts-ignore
return readContract(req);
}

@@ -73,8 +85,9 @@

const sendAction = (0, _util.promisify)(this.client.sendAction.bind(this.client));
return await sendAction(req);
return sendAction(req);
}
async estimateGasForAction(req) {
const estimateGasForAction = (0, _util.promisify)(this.client.estimateGasForAction.bind(this.client));
return await estimateGasForAction(req);
const estimateGasForAction = (0, _util.promisify)(this.client.estimateGasForAction.bind(this.client)); // @ts-ignore
return estimateGasForAction(req);
}

@@ -84,2 +97,3 @@

exports.default = RpcMethod;
exports.default = RpcMethod;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ycGMtbWV0aG9kL25vZGUtcnBjLW1ldGhvZC50cyJdLCJuYW1lcyI6WyJScGNNZXRob2QiLCJjb25zdHJ1Y3RvciIsImhvc3RuYW1lIiwicGFja2FnZURlZmluaXRpb24iLCJwcm90b0xvYWRlciIsImxvYWRTeW5jIiwiX19kaXJuYW1lIiwia2VlcENhc2UiLCJsb25ncyIsIlN0cmluZyIsImVudW1zIiwiZGVmYXVsdHMiLCJvbmVvZnMiLCJpb3RleGFwaSIsImdycGMiLCJsb2FkUGFja2FnZURlZmluaXRpb24iLCJjbGllbnQiLCJBUElTZXJ2aWNlIiwiY3JlZGVudGlhbHMiLCJjcmVhdGVJbnNlY3VyZSIsImdldEFjY291bnQiLCJyZXEiLCJiaW5kIiwiZ2V0QmxvY2tNZXRhcyIsImdldENoYWluTWV0YSIsImdldEF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m9yQWN0aW9uLmJpbmQodGhpcy5jbGllbnQpXG4gICAgKTtcbiAgICAvLyBAdHMtaWdub3JlXG4gICAgcmV0dXJuIGVzdGltYXRlR2FzRm9yQWN0aW9uKHJlcSk7XG4gIH1cbn1cbiJdfQ==
{
"name": "iotex-antenna",
"version": "0.3.0",
"version": "0.4.0",
"description": "field_description",

@@ -10,25 +10,26 @@ "main": "index.js",

"scripts": {
"test": "npm run flow && npm run cover",
"test": "npm run cover",
"check-coverage": "nyc check-coverage --lines 65 --functions 60 --Statements 65",
"ava": "NODE_ENV=test ava",
"server": "node server",
"lint": "eslint . --fix",
"cover": "NODE_ENV=test npm run lint && nyc npm run ava",
"flow": "flow stop && flow",
"flow-install": "flow-typed install",
"lint": "tslint --fix --project tsconfig.json -t stylish",
"qualitycheck": "npm-run-all typecheck tslint",
"cover": "tsc && NODE_ENV=test npm run lint && nyc npm run ava",
"size": "ls -lh lib/",
"bp": "npm run build && npm run size",
"build": "rm -rf ./lib && babel src/ --ignore **/__test__/**,src/**/**.test.js -d lib --copy-files",
"build:watch": "babel --watch src/**/*.js -d lib",
"build-proto": "protoc -I=./src/proto/ api.proto action.proto blockchain.proto endorsement.proto account.proto node.proto --js_out=import_style=commonjs:./src/proto/ && protoc -I=./src/proto/ api.proto action.proto blockchain.proto endorsement.proto account.proto node.proto --grpc-web_out=import_style=commonjs,mode=grpcwebtext:./src/proto/",
"build:js": "rm -rf ./lib && babel src/ --source-maps inline --extensions \".ts,.tsx,.js,.jsx\" --ignore **/__test__/**,src/**/**.test.ts -d lib --copy-files",
"build:watch": "babel --watch src/**/*.ts -d lib",
"build:types": "tsc --emitDeclarationOnly",
"build": "npm run build:js && npm run build:types",
"changelog-major": "build-changelog --major",
"changelog-minor": "build-changelog --minor",
"changelog-patch": "build-changelog --patch"
"changelog-patch": "build-changelog --patch",
"build-proto": "protoc -I=./src/proto/ api.proto action.proto blockchain.proto endorsement.proto account.proto node.proto --js_out=import_style=commonjs:./src/proto/generated/ && protoc -I=./src/proto/ api.proto action.proto blockchain.proto endorsement.proto account.proto node.proto --grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:./src/proto/generated/"
},
"nyc": {
"include": [
"src/**/*.js"
"src/**/*.ts"
],
"exclude": [
"src/**/*.test.js",
"src/**/*.test.ts",
"src/**/__tests__/**"

@@ -43,3 +44,4 @@ ],

"extension": [
".jsx"
".tsx",
".ts"
],

@@ -49,2 +51,7 @@ "cache": true,

},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"repository": {

@@ -55,4 +62,4 @@ "type": "git",

"keywords": [],
"author": "field_author",
"license": "UNLICENSED",
"author": "Tian Pan (tian@iotex.io)",
"license": "APACHE",
"bugs": {

@@ -65,11 +72,11 @@ "url": "https://github.com/puncsky/template_website/issues"

"@babel/core": "7.3.4",
"@babel/plugin-proposal-object-rest-spread": "7.3.4",
"@babel/plugin-transform-flow-strip-types": "7.3.4",
"@babel/polyfill": "7.2.5",
"@babel/preset-env": "7.3.4",
"@babel/preset-flow": "7.0.0",
"@babel/preset-react": "7.0.0",
"@babel/preset-typescript": "7.3.3",
"@babel/register": "7.0.0",
"@types/bech32": "^1.1.1",
"@types/elliptic": "^6.4.5",
"@types/google-protobuf": "^3.2.7",
"@types/node": "11.11.3",
"ava": "1.3.1",
"babel-eslint": "10.0.1",
"babel-loader": "8.0.5",

@@ -79,20 +86,19 @@ "babel-plugin-module-resolver": "3.2.0",

"babel-plugin-transform-class-properties": "6.24.1",
"browser-env": "3.2.6",
"build-changelog": "2.1.2",
"eslint": "5.15.1",
"eslint-plugin-babel": "5.3.0",
"eslint-plugin-flowtype": "3.4.2",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-react": "7.12.3",
"flow-bin": "0.94.0",
"flow-typed": "2.5.1",
"global": "4.3.2",
"husky": "^1.3.1",
"nyc": "13.3.0",
"proto-build": "0.2.3"
"prettier": "1.16.4",
"pretty-quick": "^1.10.0",
"proto-build": "0.2.3",
"ts-node": "8.0.3",
"ts-protoc-gen": "^0.9.0",
"tslint": "5.14.0",
"tslint-config-prettier": "1.18.0",
"tslint-microsoft-contrib": "6.1.0",
"tslint-require-connnect-typing": "1.0.1",
"typescript": "3.3.3333"
},
"engines": {
"node": "10.15.3",
"npm": "6.9.0"
},
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@grpc/proto-loader": "0.4.0",

@@ -107,5 +113,5 @@ "bech32": "1.1.3",

"grpc-web": "1.0.3",
"protobufjs": "6.8.8",
"protobufjs": "^6.8.8",
"sha3": "2.0.0"
}
}
}

Sorry, the diff of this file is too big to display

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