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

eosjs

Package Overview
Dependencies
Maintainers
4
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 21.1.0-31-6067080 to 21.1.0-32-8065061

19

dist/eosjs-api-interfaces.d.ts

@@ -58,6 +58,2 @@ /**

}
export interface Extension {
type: number;
data: string;
}
export interface Transaction {

@@ -73,3 +69,3 @@ expiration?: string;

actions: Action[];
transaction_extensions?: Extension[];
transaction_extensions?: [number, string][];
}

@@ -86,2 +82,7 @@ /** Optional transact configuration object */

}
export interface TransactionHeader {
expiration: string;
ref_block_num: number;
ref_block_prefix: number;
}
export interface AccountDelta {

@@ -100,3 +101,3 @@ account: string;

recv_sequence: number;
auth_sequence: AuthSequence[];
auth_sequence: [string, number][];
code_sequence: number;

@@ -123,6 +124,6 @@ abi_sequence: number;

error_code: number | null;
return_value: any;
return_value_hex?: string;
return_value?: any;
return_value_hex_data?: string;
return_value_data?: any;
inline_traces: ActionTrace[];
inline_traces?: ActionTrace[];
}

@@ -129,0 +130,0 @@ export interface TransactionReceiptHeader {

@@ -109,3 +109,3 @@ /**

with(accountName: string): ActionBuilder;
buildTransaction(cb?: (tx: TransactionBuilder) => void): void | TransactionBuilder;
buildTransaction(cb?: (tx: TransactionBuilder) => void): TransactionBuilder | void;
}

@@ -118,3 +118,3 @@ export declare class TransactionBuilder {

with(accountName: string): ActionBuilder;
associateContextFree(contextFreeGroup: ContextFreeGroupCallback): this;
associateContextFree(contextFreeGroup: ContextFreeGroupCallback): TransactionBuilder;
send(config?: TransactConfig): Promise<PushTransactionArgs | TransactResult>;

@@ -121,0 +121,0 @@ }

/**
* @module JSON-RPC
*/
import { AbiProvider, AuthorityProvider, AuthorityProviderArgs, BinaryAbi } from './eosjs-api-interfaces';
import { GetAbiResult, GetBlockInfoResult, GetBlockResult, GetCodeResult, GetInfoResult, GetRawCodeAndAbiResult, GetRawAbiResult, PushTransactionArgs, GetBlockHeaderStateResult } from './eosjs-rpc-interfaces';
import { AbiProvider, AuthorityProvider, AuthorityProviderArgs, BinaryAbi, TransactResult } from './eosjs-api-interfaces';
import { AbiBinToJsonResult, AbiJsonToBinResult, GetAbiResult, GetAccountResult, GetAccountsByAuthorizersResult, GetActivatedProtocolFeaturesParams, GetActivatedProtocolFeaturesResult, GetBlockInfoResult, GetBlockResult, GetCodeResult, GetCodeHashResult, GetCurrencyStatsResult, GetInfoResult, GetProducerScheduleResult, GetProducersResult, GetRawCodeAndAbiResult, GetRawAbiResult, GetScheduledTransactionsResult, GetTableRowsResult, PushTransactionArgs, GetBlockHeaderStateResult, GetTableByScopeResult, DBSizeGetResult, TraceApiGetBlockResult, GetActionsResult, GetTransactionResult, GetKeyAccountsResult, GetControlledAccountsResult } from './eosjs-rpc-interfaces';
import { Authorization } from './eosjs-serialize';
/** Make RPC calls */

@@ -21,6 +22,12 @@ export declare class JsonRpc implements AuthorityProvider, AbiProvider {

fetch(path: string, body: any): Promise<any>;
abi_bin_to_json(code: string, action: string, binargs: string): Promise<AbiBinToJsonResult>;
abi_json_to_bin(code: string, action: string, args: any[]): Promise<AbiJsonToBinResult>;
/** Raw call to `/v1/chain/get_abi` */
get_abi(accountName: string): Promise<GetAbiResult>;
/** Raw call to `/v1/chain/get_account` */
get_account(accountName: string): Promise<any>;
get_account(accountName: string): Promise<GetAccountResult>;
/** Raw call to `/v1/chain/get_accounts_by_authorizers` */
get_accounts_by_authorizers(accounts: Authorization[], keys: string[]): Promise<GetAccountsByAuthorizersResult>;
/** Raw call to `get_activated_protocol_features` */
get_activated_protocol_features({ limit, search_by_block_num, reverse, lower_bound, upper_bound, }: GetActivatedProtocolFeaturesParams): Promise<GetActivatedProtocolFeaturesResult>;
/** Raw call to `/v1/chain/get_block_header_state` */

@@ -34,12 +41,14 @@ get_block_header_state(blockNumOrId: number | string): Promise<GetBlockHeaderStateResult>;

get_code(accountName: string): Promise<GetCodeResult>;
/** Raw call to `/v1/chain/get_code_hash` */
get_code_hash(accountName: string): Promise<GetCodeHashResult>;
/** Raw call to `/v1/chain/get_currency_balance` */
get_currency_balance(code: string, account: string, symbol?: string): Promise<any>;
get_currency_balance(code: string, account: string, symbol?: string): Promise<string[]>;
/** Raw call to `/v1/chain/get_currency_stats` */
get_currency_stats(code: string, symbol: string): Promise<any>;
get_currency_stats(code: string, symbol: string): Promise<GetCurrencyStatsResult>;
/** Raw call to `/v1/chain/get_info` */
get_info(): Promise<GetInfoResult>;
/** Raw call to `/v1/chain/get_producer_schedule` */
get_producer_schedule(): Promise<any>;
get_producer_schedule(): Promise<GetProducerScheduleResult>;
/** Raw call to `/v1/chain/get_producers` */
get_producers(json?: boolean, lowerBound?: string, limit?: number): Promise<any>;
get_producers(json?: boolean, lowerBound?: string, limit?: number): Promise<GetProducersResult>;
/** Raw call to `/v1/chain/get_raw_code_and_abi` */

@@ -52,25 +61,28 @@ get_raw_code_and_abi(accountName: string): Promise<GetRawCodeAndAbiResult>;

/** Raw call to `/v1/chain/get_scheduled_transactions` */
get_scheduled_transactions(json?: boolean, lowerBound?: string, limit?: number): Promise<any>;
get_scheduled_transactions(json?: boolean, lowerBound?: string, limit?: number): Promise<GetScheduledTransactionsResult>;
/** Raw call to `/v1/chain/get_table_rows` */
get_table_rows({ json, code, scope, table, lower_bound, upper_bound, index_position, key_type, limit, reverse, show_payer, }: any): Promise<any>;
get_table_rows({ json, code, scope, table, lower_bound, upper_bound, index_position, key_type, limit, reverse, show_payer, }: any): Promise<GetTableRowsResult>;
/** Raw call to `/v1/chain/get_kv_table_rows` */
get_kv_table_rows({ json, code, table, index_name, encode_type, index_value, lower_bound, upper_bound, limit, reverse, show_payer, }: any): Promise<any>;
get_kv_table_rows({ json, code, table, index_name, encode_type, index_value, lower_bound, upper_bound, limit, reverse, show_payer, }: any): Promise<GetTableRowsResult>;
/** Raw call to `/v1/chain/get_table_by_scope` */
get_table_by_scope({ code, table, lower_bound, upper_bound, limit, }: any): Promise<any>;
get_table_by_scope({ code, table, lower_bound, upper_bound, limit, }: any): Promise<GetTableByScopeResult>;
/** Get subset of `availableKeys` needed to meet authorities in `transaction`. Implements `AuthorityProvider` */
getRequiredKeys(args: AuthorityProviderArgs): Promise<string[]>;
/** Push a serialized transaction (replaced by send_transaction, but returned format has changed) */
push_transaction({ signatures, compression, serializedTransaction, serializedContextFreeData }: PushTransactionArgs): Promise<any>;
push_transaction({ signatures, compression, serializedTransaction, serializedContextFreeData }: PushTransactionArgs): Promise<TransactResult>;
push_transactions(transactions: PushTransactionArgs[]): Promise<TransactResult[]>;
/** Send a serialized transaction */
send_transaction({ signatures, compression, serializedTransaction, serializedContextFreeData }: PushTransactionArgs): Promise<any>;
send_transaction({ signatures, compression, serializedTransaction, serializedContextFreeData }: PushTransactionArgs): Promise<TransactResult>;
/** Raw call to `/v1/db_size/get` */
db_size_get(): Promise<any>;
db_size_get(): Promise<DBSizeGetResult>;
/** Raw call to `/v1/trace_api/get_block` */
trace_get_block(block_num: number): Promise<TraceApiGetBlockResult>;
/** Raw call to `/v1/history/get_actions` */
history_get_actions(accountName: string, pos?: number, offset?: number): Promise<any>;
history_get_actions(accountName: string, pos?: number, offset?: number): Promise<GetActionsResult>;
/** Raw call to `/v1/history/get_transaction` */
history_get_transaction(id: string, blockNumHint?: number): Promise<any>;
history_get_transaction(id: string, blockNumHint?: number): Promise<GetTransactionResult>;
/** Raw call to `/v1/history/get_key_accounts` */
history_get_key_accounts(publicKey: string): Promise<any>;
history_get_key_accounts(publicKey: string): Promise<GetKeyAccountsResult>;
/** Raw call to `/v1/history/get_controlled_accounts` */
history_get_controlled_accounts(controllingAccount: string): Promise<any>;
history_get_controlled_accounts(controllingAccount: string): Promise<GetControlledAccountsResult>;
}

@@ -128,2 +128,22 @@ "use strict";

};
JsonRpc.prototype.abi_bin_to_json = function (code, action, binargs) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.fetch('/v1/chain/abi_bin_to_json', { code: code, action: action, binargs: binargs })];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
JsonRpc.prototype.abi_json_to_bin = function (code, action, args) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.fetch('/v1/chain/abi_json_to_bin', { code: code, action: action, args: args })];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
/** Raw call to `/v1/chain/get_abi` */

@@ -151,2 +171,25 @@ JsonRpc.prototype.get_abi = function (accountName) {

};
/** Raw call to `/v1/chain/get_accounts_by_authorizers` */
JsonRpc.prototype.get_accounts_by_authorizers = function (accounts, keys) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.fetch('/v1/chain/get_accounts_by_authorizers', { accounts: accounts, keys: keys })];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
/** Raw call to `get_activated_protocol_features` */
JsonRpc.prototype.get_activated_protocol_features = function (_a) {
var _b = _a.limit, limit = _b === void 0 ? 10 : _b, _c = _a.search_by_block_num, search_by_block_num = _c === void 0 ? false : _c, _d = _a.reverse, reverse = _d === void 0 ? false : _d, _e = _a.lower_bound, lower_bound = _e === void 0 ? null : _e, _f = _a.upper_bound, upper_bound = _f === void 0 ? null : _f;
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_g) {
switch (_g.label) {
case 0: return [4 /*yield*/, this.fetch('/v1/chain/get_activated_protocol_features', { lower_bound: lower_bound, upper_bound: upper_bound, limit: limit, search_by_block_num: search_by_block_num, reverse: reverse })];
case 1: return [2 /*return*/, _g.sent()];
}
});
});
};
/** Raw call to `/v1/chain/get_block_header_state` */

@@ -199,2 +242,13 @@ JsonRpc.prototype.get_block_header_state = function (blockNumOrId) {

};
/** Raw call to `/v1/chain/get_code_hash` */
JsonRpc.prototype.get_code_hash = function (accountName) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.fetch('/v1/chain/get_code_hash', { account_name: accountName })];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
/** Raw call to `/v1/chain/get_currency_balance` */

@@ -336,6 +390,6 @@ JsonRpc.prototype.get_currency_balance = function (code, account, symbol) {

JsonRpc.prototype.get_kv_table_rows = function (_a) {
var _b = _a.json, json = _b === void 0 ? true : _b, code = _a.code, table = _a.table, index_name = _a.index_name, _c = _a.encode_type, encode_type = _c === void 0 ? 'bytes' : _c, _d = _a.index_value, index_value = _d === void 0 ? '' : _d, _e = _a.lower_bound, lower_bound = _e === void 0 ? '' : _e, _f = _a.upper_bound, upper_bound = _f === void 0 ? '' : _f, _g = _a.limit, limit = _g === void 0 ? 10 : _g, _h = _a.reverse, reverse = _h === void 0 ? false : _h, _j = _a.show_payer, show_payer = _j === void 0 ? false : _j;
var _b = _a.json, json = _b === void 0 ? true : _b, code = _a.code, table = _a.table, index_name = _a.index_name, _c = _a.encode_type, encode_type = _c === void 0 ? 'bytes' : _c, index_value = _a.index_value, lower_bound = _a.lower_bound, upper_bound = _a.upper_bound, _d = _a.limit, limit = _d === void 0 ? 10 : _d, _e = _a.reverse, reverse = _e === void 0 ? false : _e, _f = _a.show_payer, show_payer = _f === void 0 ? false : _f;
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_k) {
switch (_k.label) {
return __generator(this, function (_g) {
switch (_g.label) {
case 0: return [4 /*yield*/, this.fetch('/v1/chain/get_kv_table_rows', {

@@ -354,3 +408,3 @@ json: json,

})];
case 1: return [2 /*return*/, _k.sent()];
case 1: return [2 /*return*/, _g.sent()];
}

@@ -412,2 +466,23 @@ });

};
JsonRpc.prototype.push_transactions = function (transactions) {
return __awaiter(this, void 0, void 0, function () {
var packedTrxs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
packedTrxs = transactions.map(function (_a) {
var signatures = _a.signatures, _b = _a.compression, compression = _b === void 0 ? 0 : _b, serializedTransaction = _a.serializedTransaction, serializedContextFreeData = _a.serializedContextFreeData;
return {
signatures: signatures,
compression: compression,
packed_context_free_data: arrayToHex(serializedContextFreeData || new Uint8Array(0)),
packed_trx: arrayToHex(serializedTransaction),
};
});
return [4 /*yield*/, this.fetch('/v1/chain/push_transactions', packedTrxs)];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
/** Send a serialized transaction */

@@ -439,2 +514,13 @@ JsonRpc.prototype.send_transaction = function (_a) {

};
/** Raw call to `/v1/trace_api/get_block` */
JsonRpc.prototype.trace_get_block = function (block_num) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.fetch('/v1/trace_api/get_block', { block_num: block_num })];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
/** Raw call to `/v1/history/get_actions` */

@@ -441,0 +527,0 @@ JsonRpc.prototype.history_get_actions = function (accountName, pos, offset) {

@@ -6,5 +6,6 @@ /**

import { SignatureProvider, SignatureProviderArgs } from './eosjs-api-interfaces';
import { PushTransactionArgs } from './eosjs-rpc-interfaces';
import { PrivateKey, PublicKey, Signature } from './eosjs-key-conversions';
/** Construct the digest from transaction details */
declare const digestFromSerializedData: (chainId: string, serializedTransaction: Uint8Array, serializedContextFreeData?: Uint8Array, e?: ec) => any;
declare const digestFromSerializedData: (chainId: string, serializedTransaction: Uint8Array, serializedContextFreeData?: Uint8Array, e?: ec) => string;
/** Signs transactions using in-process private keys */

@@ -21,8 +22,4 @@ declare class JsSignatureProvider implements SignatureProvider {

/** Sign a transaction */
sign({ chainId, requiredKeys, serializedTransaction, serializedContextFreeData }: SignatureProviderArgs): Promise<{
signatures: string[];
serializedTransaction: Uint8Array;
serializedContextFreeData: Uint8Array;
}>;
sign({ chainId, requiredKeys, serializedTransaction, serializedContextFreeData }: SignatureProviderArgs): Promise<PushTransactionArgs>;
}
export { PrivateKey, PublicKey, Signature, digestFromSerializedData, JsSignatureProvider, };

@@ -18,2 +18,2 @@ /// <reference types="node" />

};
export declare const sha256: (data: string | Buffer) => number[];
export declare const sha256: (data: string | Buffer) => number[] | string;

@@ -5,2 +5,4 @@ /**

*/
import { TransactionReceiptHeader, Transaction } from './eosjs-api-interfaces';
import { Authorization } from './eosjs-serialize';
/** Structured format for abis */

@@ -38,3 +40,3 @@ export interface Abi {

error_messages: {
error_code: string;
error_code: number;
error_msg: string;

@@ -50,2 +52,20 @@ }[];

}[];
action_results?: {
name: string;
result_type: string;
}[];
kv_tables?: {
[key: string]: {
type: string;
primary_index: {
name: string;
type: string;
};
secondary_indices: {
[key: string]: {
type: string;
};
}[];
};
}[];
}

@@ -60,4 +80,4 @@ export interface BlockHeader {

schedule_version: number;
new_producers: any;
header_extensions: any;
new_producers?: ProducerScheduleType;
header_extensions: [number, string][];
}

@@ -67,7 +87,145 @@ export interface SignedBlockHeader extends BlockHeader {

}
export interface AccountResourceInfo {
used: number;
available: number;
max: number;
last_usage_update_time?: string;
current_used?: number;
}
export interface ResourceOverview {
owner: string;
ram_bytes: number;
net_weight: string;
cpu_weight: string;
}
export interface ResourceDelegation {
from: string;
to: string;
net_weight: string;
cpu_weight: string;
}
export interface RefundRequest {
owner: string;
request_time: string;
net_amount: string;
cpu_amount: string;
}
export interface VoterInfo {
owner: string;
proxy: string;
producers: string[];
staked: number;
last_vote_weight: string;
proxied_vote_weight: string;
is_proxy: number;
flags1: number;
reserved2: number;
reserved3: string;
}
export interface RexBalance {
version: number;
owner: string;
vote_stake: string;
rex_balance: string;
matured_rex: number;
rex_maturities: any;
}
export interface Authority {
threshold: number;
keys: KeyWeight[];
accounts: PermissionLevelWeight[];
waits: WaitWeight[];
}
export interface KeyWeight {
key: string;
weight: number;
}
export interface Permission {
perm_name: string;
parent: string;
required_auth: Authority;
}
export interface PermissionLevel {
actor: string;
permission: string;
}
export interface PermissionLevelWeight {
permission: PermissionLevel;
weight: number;
}
export interface WaitWeight {
wait_sec: number;
weight: number;
}
/** Return value of `/v1/chain/abi_bin_to_json` */
export interface AbiBinToJsonResult {
args: 'any';
}
/** Return value of `/v1/chain/abi_json_to_bin` */
export interface AbiJsonToBinResult {
binargs: 'string';
}
/** Return value of `/v1/chain/get_abi` */
export interface GetAbiResult {
account_name: string;
abi: Abi;
abi?: Abi;
}
/** Return value of `/v1/chain/get_account` */
export interface GetAccountResult {
account_name: string;
head_block_num: number;
head_block_time: string;
privileged: boolean;
last_code_update: string;
created: string;
core_liquid_balance?: string;
ram_quota: number;
net_weight: number;
cpu_weight: number;
net_limit: AccountResourceInfo;
cpu_limit: AccountResourceInfo;
ram_usage: number;
permissions: Permission[];
total_resources: ResourceOverview | null;
self_delegated_bandwidth: ResourceDelegation | null;
refund_request: RefundRequest | null;
voter_info: any;
rex_info: any;
}
export interface AccountResult {
account_name: string;
permission_name: string;
authorizing_account?: Authorization;
authorizing_key?: string;
weight: number;
threshold: number;
}
/** Return value of `/v1/chain/get_accounts_by_authorizers` */
export interface GetAccountsByAuthorizersResult {
accounts: AccountResult[];
}
export interface GetActivatedProtocolFeaturesParams {
limit?: number;
search_by_block_num?: boolean;
reverse?: boolean;
lower_bound?: number;
upper_bound?: number;
}
export interface ActivatedProtocolFeature {
feature_digest: string;
activation_ordinal: number;
activation_block_num: number;
description_digest: string;
dependencies: string[];
protocol_feature_type: string;
specification: {
name: string;
value: string;
};
}
/** Return value of `/v1/chain/get_activated_protocol_features` */
export interface GetActivatedProtocolFeaturesResult {
activated_protocol_features: ActivatedProtocolFeature[];
more?: number;
}
/** Return value of `/v1/chain/get_block_info` */

@@ -85,4 +243,23 @@ export interface GetBlockInfoResult {

block_num: number;
ref_block_num: number;
ref_block_prefix: number;
}
export interface PackedTransaction {
id: string;
signatures: string[];
compression: number | string;
packed_context_free_data: string;
context_free_data: string[];
packed_trx: string;
transaction: Transaction;
}
export interface PackedTrx {
signatures: string[];
compression: number;
packed_trx: string;
packed_context_free_data: string;
}
export interface TransactionReceipt extends TransactionReceiptHeader {
trx: PackedTransaction;
}
/** Return value of `/v1/chain/get_block` */

@@ -97,3 +274,5 @@ export interface GetBlockResult {

schedule_version: number;
new_producers: ProducerScheduleType | null;
producer_signature: string;
transactions: any;
id: string;

@@ -110,17 +289,50 @@ block_num: number;

}
/** Return value of `v1/chain/get_block_header_state */
export interface ProducerKey {
producer_name: string;
block_signing_key: string;
}
export interface BlockSigningAuthority {
threshold: number;
keys: KeyWeight[];
}
export interface ProducerAuthority {
producer_name: string;
authority: [number | string, BlockSigningAuthority];
}
export interface ProducerAuthoritySchedule {
version: number;
producers: ProducerAuthority[];
}
export interface ProducerScheduleType {
version: number;
producers: ProducerKey[];
}
export interface ScheduleInfo {
schedule_lib_num: number;
schedule_hash: string;
schedule: ProducerScheduleType;
}
export interface IncrementalMerkle {
_active_nodes: string[];
_node_count: number;
}
export interface ProtocolFeatureActivationSet {
protocol_features: string[];
}
/** Return value of `/v1/chain/get_block_header_state` */
export interface GetBlockHeaderStateResult {
id: string;
header: SignedBlockHeader;
pending_schedule: any;
activated_protocol_features: any;
pending_schedule: ScheduleInfo;
activated_protocol_features: ProtocolFeatureActivationSet;
additional_signatures: string[];
block_num: number;
dpos_proposed_irreversible_blocknum: number;
dpos_irreversible_blocknum: number;
active_schedule: any;
blockroot_merkle: any;
producer_to_last_produced: any;
producer_to_last_implied_irb: any;
block_signing_key: string;
confirm_count: any;
active_schedule: ProducerAuthoritySchedule;
blockroot_merkle: IncrementalMerkle;
producer_to_last_produced: Map<string, number>;
producer_to_last_implied_irb: Map<string, number>;
valid_block_signing_authority: any;
confirm_count: number[];
}

@@ -139,4 +351,17 @@ /** Subset of `GetBlockHeaderStateResult` used to calculate TAPoS fields in transactions */

wasm: string;
abi: Abi;
abi?: Abi;
}
/** Return value of `/v1/chain/get_code_hash` */
export interface GetCodeHashResult {
account_name: string;
code_hash: string;
}
/** Return value of `/v1/chain/get_currency_stats` */
export interface GetCurrencyStatsResult {
[key: string]: {
supply: string;
max_supply: string;
issuer: string;
};
}
/** Return value of `/v1/chain/get_info` */

@@ -149,3 +374,3 @@ export interface GetInfoResult {

last_irreversible_block_id: string;
last_irreversible_block_time: string;
last_irreversible_block_time?: string;
head_block_id: string;

@@ -158,3 +383,30 @@ head_block_time: string;

block_net_limit: number;
server_version_string?: string;
fork_db_head_block_num?: number;
fork_db_head_block_id?: string;
server_full_version_string?: string;
}
/** Return value of /v1/chain/get_producer_schedule */
export interface GetProducerScheduleResult {
active: ProducerAuthoritySchedule | null;
pending: ProducerAuthoritySchedule | null;
proposed: ProducerAuthoritySchedule | null;
}
export interface ProducerDetails {
owner: string;
producer_authority?: any[];
url: string;
is_active?: number;
total_votes: string;
producer_key: string;
unpaid_blocks?: number;
last_claim_time?: string;
location?: number;
}
/** Return value of `/v1/chain/get_producers` */
export interface GetProducersResult {
rows: ProducerDetails[];
total_producer_vote_weight: string;
more: string;
}
/** Return value of `/v1/chain/get_raw_code_and_abi` */

@@ -166,2 +418,3 @@ export interface GetRawCodeAndAbiResult {

}
/** Return value of `/v1/chain/get_raw_abi` */
export interface GetRawAbiResult {

@@ -173,2 +426,44 @@ account_name: string;

}
export interface DeferredTransaction extends Transaction {
deferred_transaction_generation?: {
sender_trx_id: string;
sender_id: string;
sender: string;
};
}
export interface GeneratedTransaction {
trx_id: string;
sender: string;
sender_id: string;
payer: string;
delay_until: string;
expiration: string;
published: string;
packed_trx?: string[];
transaction?: DeferredTransaction[];
}
/** Return value of `/v1/chain/get_scheduled_transactions` */
export interface GetScheduledTransactionsResult {
transactions: GeneratedTransaction[];
more: string;
}
/** Return value of `/v1/chain/get_table_rows` and `/v1/chain/get_kv_table_rows` */
export interface GetTableRowsResult {
rows: any[];
more: boolean;
next_key: string;
next_key_bytes: string;
}
export interface GetTableByScopeResultRow {
code: string;
scope: string;
table: string;
payer: string;
count: number;
}
/** Return value of `/v1/chain/get_table_by_scope` */
export interface GetTableByScopeResult {
rows: GetTableByScopeResultRow[];
more: string;
}
/** Arguments for `push_transaction` */

@@ -181,1 +476,81 @@ export interface PushTransactionArgs {

}
export interface DBSizeIndexCount {
index: string;
row_count: number;
}
/** Return value of `/v1/db_size/get` */
export interface DBSizeGetResult {
free_bytes: number;
used_bytes: number;
size: number;
indices: DBSizeIndexCount[];
}
export interface TraceApiAction {
global_sequence: number;
receiver: string;
account: string;
action: string;
authorization: Authorization[];
data: any;
return_value: any;
}
export interface TraceApiTransactionHeader {
expiration: string;
ref_block_num: number;
ref_block_prefix: number;
max_net_usage_words: number;
max_cpu_usage_ms: number;
delay_sec: number;
}
export interface TraceApiTransaction {
id: string;
actions: TraceApiAction[];
status?: string;
cpu_usage_us?: number;
net_usage_words?: number;
signatures?: string[];
transaction_header?: TraceApiTransactionHeader;
}
/** Return value of `/v1/trace_api/get_block` */
export interface TraceApiGetBlockResult {
id: string;
number: number;
previous_id: string;
status: string;
timestamp: string;
producer: string;
transaction_mroot?: string;
action_mroot?: string;
schedule_version: number;
transactions: TraceApiTransaction;
}
export interface OrderedActionResult {
global_action_seq: number;
account_action_seq: number;
block_num: number;
block_time: string;
action_trace: any;
}
/** Return value of `/v1/history/get_actions` */
export interface GetActionsResult {
actions: OrderedActionResult[];
last_irreversible_block: number;
time_limit_exceeded_error?: boolean;
}
/** Return value of `/v1/history/get_transaction` */
export interface GetTransactionResult {
id: string;
trx: any;
block_time: string;
block_num: number;
last_irreversible_block: number;
traces: any[];
}
/** Return value of `/v1/history/get_key_accounts` */
export interface GetKeyAccountsResult {
account_names: string[];
}
/** Return value of `/v1/history/get_controlled_accounts` */
export interface GetControlledAccountsResult {
controlled_accounts: string[];
}

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

Object.defineProperty(exports, "__esModule", { value: true });
;
//# sourceMappingURL=eosjs-rpc-interfaces.js.map
/**
* @module Serialize
*/
import { TransactionHeader } from './eosjs-api-interfaces';
import { Abi, BlockTaposInfo } from './eosjs-rpc-interfaces';

@@ -258,7 +259,3 @@ import { Query } from './eosjs-api-interfaces';

/** TAPoS: Return transaction fields which reference `refBlock` and expire `expireSeconds` after `timestamp` */
export declare const transactionHeader: (refBlock: BlockTaposInfo, expireSeconds: number) => {
expiration: string;
ref_block_num: number;
ref_block_prefix: number;
};
export declare const transactionHeader: (refBlock: BlockTaposInfo, expireSeconds: number) => TransactionHeader;
/** Convert action data to serialized form (hex) */

@@ -276,5 +273,5 @@ export declare const serializeActionData: (contract: Contract, account: string, name: string, data: any, textEncoder: TextEncoder, textDecoder: TextDecoder) => string;

export declare const serializeAnyObject: (buffer: SerialBuffer, obj: any) => void;
export declare const deserializeAnyObject: (buffer: SerialBuffer, state?: SerializerState) => {};
export declare const deserializeAnyObject: (buffer: SerialBuffer, state?: SerializerState) => any;
export declare const serializeAnyArray: (buffer: SerialBuffer, arr: Anyvar[]) => void;
export declare const deserializeAnyArray: (buffer: SerialBuffer, state?: SerializerState) => any[];
export declare const serializeQuery: (buffer: SerialBuffer, query: Query) => void;

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

import { SignatureProvider, SignatureProviderArgs } from './eosjs-api-interfaces';
import { PushTransactionArgs } from './eosjs-rpc-interfaces';
/** Signs transactions using WebAuthn */

@@ -13,7 +14,3 @@ export declare class WebAuthnSignatureProvider implements SignatureProvider {

/** Sign a transaction */
sign({ chainId, requiredKeys, serializedTransaction, serializedContextFreeData }: SignatureProviderArgs): Promise<{
signatures: string[];
serializedTransaction: Uint8Array;
serializedContextFreeData: Uint8Array;
}>;
sign({ chainId, requiredKeys, serializedTransaction, serializedContextFreeData }: SignatureProviderArgs): Promise<PushTransactionArgs>;
}
{
"name": "eosjs",
"version": "21.1.0-31-6067080",
"version": "21.1.0-32-8065061",
"description": "Talk to eos API",

@@ -13,3 +13,4 @@ "main": "dist/index.js",

"test-node": "jest src/tests/*node*",
"test-all": "yarn test && yarn test-node && yarn cypress",
"test-types": "jest src/tests/type-checks.test.ts",
"test-all": "yarn test && yarn test-node && yarn test-types && yarn cypress",
"build": "rimraf dist && tsc -p ./tsconfig.json && node scripts/copy-ripe-md.js",

@@ -40,2 +41,3 @@ "build-web": "webpack --config webpack.prod.js && webpack --config webpack.debug.js",

"@types/node": "^14.14.25",
"@types/node-fetch": "^2.5.8",
"@types/pako": "^1.0.1",

@@ -47,7 +49,8 @@ "clean-webpack-plugin": "^3.0.0",

"jest": "^26.6.3",
"jest-extended": "^0.11.5",
"jest-fetch-mock": "^3.0.3",
"rimraf": "^3.0.2",
"ts-jest": "^26.5.1",
"ts-loader": "^8.0.16",
"typescript": "^3.9.8",
"ts-loader": "^8.0.17",
"typescript": "^3.9.9",
"webpack": "^4.46.0",

@@ -61,2 +64,5 @@ "webpack-cli": "^3.3.12"

],
"setupFilesAfterEnv": [
"jest-extended"
],
"moduleFileExtensions": [

@@ -63,0 +69,0 @@ "ts",

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