Questions tagged [eosjs]

QAs about the JavaScript module eosjs which uses RPC-APIs to interact with an EOS.IO blockchain.

Filter by
Sorted by
Tagged with
0 votes
1 answer
234 views

Get transaction EOSJS

I used the following function to get transaction with eosjs, but it doesn't display all the content. (async () => { await rpc.history_get_transaction('...
Emilien's user avatar
  • 15
0 votes
1 answer
126 views

eoslime: Provided keys, permissions, and delays do not satisfy declared authorizations

When Trying to run my test with eoslime test and calling eoslime.Contract.deploy(...., ....) I get Error: the string "{\"code\":500,\"message\":\"Internal Service Error\",\"error\":{\"code\":...
heinob's user avatar
  • 101
0 votes
2 answers
545 views

Error: fetching abi for eosio: deadline exceeded by xx us

When launching a transaction like: await eosioApi.transact({ actions: [ { account: "eosio", name: 'newaccount', authorization: [{ actor:...
heinob's user avatar
  • 101
1 vote
1 answer
266 views

How to generate Key Pairs with eosjs

How to generate eos Key Pairs with eosjs? I have installed EOSIO for development of my Dapp and can't figure out how to create Key Pairs with eosjs.
Emilien's user avatar
  • 15
1 vote
2 answers
180 views

How to get account name or list of accounts from a public key using eosjs? Account is on Jungle testnet

const { Api, JsonRpc } = require('eosjs'); const fetch = require('node-fetch'); const rpc = new JsonRpc('https://api.jungle.alohaeos.com:443', { fetch }); let validAccounts =await rpc....
AditiB's user avatar
  • 235
0 votes
2 answers
95 views

I have some doubts about open function of eosio.token smartcontract

async function openAccount (tokenCreator ) { try{ const result = await api.transact({ actions: [{ account: tokenCreator, //'eosio.token', name: 'open', //'transfer'...
AditiB's user avatar
  • 235
1 vote
2 answers
361 views

Error: assertion failure with message: comparison of assets with different symbols is not allowed

I am trying to create and account from another account, both on JungleNet. I am using junglenet rpc. Here is my code: const {Api, JsonRpc} = require('eosjs'); const {JsSignatureProvider} = require('...
falcon's user avatar
  • 31
1 vote
1 answer
353 views

I'm trying to transact EOS using Scatter in eosjs version 20.0. I'm getting the "f not a function" error. Can someone please guide me?

const ScatterJS = require('scatterjs-core').default const ScatterEOS = require('scatterjs-plugin-eosjs2').default const Eos = require('eosjs') const fetch = require('fetch'); //node only const { Api, ...
AditiB's user avatar
  • 235
0 votes
1 answer
87 views

Can't create EOS Account with eosjs library (UnhandledPromiseRejectionWarning)

I have already run this code few weeks back and back then it was working perfectly but now it's giving me an error: UnhandledPromiseRejectionWarning: Error: account names can only be 12 chars long I ...
guruprakash gupta's user avatar
1 vote
1 answer
100 views

Can I transfer EOS from one account to other using eosjs or is EOS only used for buying RAM and staking? (Both accounts are on jungle testnet)

async function sendEos (sender, receiver ) { try{ const result = await api.transact({ actions: [{ account: 'eosio.token', //'eosio.token', name: 'transfer', //'...
AditiB's user avatar
  • 235
1 vote
1 answer
125 views

How to use a secondary account to pay for primary accounts cpu/ram using eosjs java script library

I am trying to use a secondary account to pay for cpu/ram for the primary accounts eosio.tokens how do I do that using eosjs library My current action looks like this actions: [{ account: '...
f4r4's user avatar
  • 113
0 votes
1 answer
164 views

Unable to creating Eos account with nodejs using eosjs library

I have no idea where am i making mistake? please help. const express = require('express'); const path= require('path'); const app =express(); const { Api, JsonRpc, RpcError } = require('eosjs'); ...
guruprakash gupta's user avatar
0 votes
1 answer
348 views

How to sign this EOS transaction provided with below code and response?

This below code is working fine in testnet. I want to do transaction, signing and broadcasting individually. I generated the raw transaction, but I don't understand how to sign it. I have provided the ...
Deepak Garg's user avatar
0 votes
1 answer
204 views

How to read a table of a contract?

I'm trying to dump all rows of the sellorder, buyorder and tmporder table of the newdexpublic smart contract. My code is as the following: const fetch = require('node-fetch'); // node only; not ...
soulmachine's user avatar
0 votes
1 answer
185 views

How to retrieve filtered multi-index table data?

I have a smart contract that has a multi-index table called reservations - account, time, date, entity. From the code I am trying to use get_table_rows to get all reservations related to a given ...
Viktor Gagaleski's user avatar
0 votes
1 answer
186 views

How to get a list of actions belong to a transaction with eosjs?

Given a transaction id, how to get all actions of this transaction? For example, this transaction 3871d503ec18800861f83851762455491c88e459e0c70d830ed0120134083501 has a inline action that calls ...
soulmachine's user avatar
0 votes
2 answers
263 views

how to create a unique user name using public or private key in nodejs?

Like BTC, ETH etc has address, do EOS has address or username etc, I am using below code to generate the public and private key, we do transaction in bitcoin,ethereum etc with a unique address sample ...
Deepak Garg's user avatar
0 votes
1 answer
531 views

How to get Block using JsonRpc from eosjs using nodejs?

Whenever I try to get the block using the eosjs in NodeJS like in the example I get the error 'Invalid Block number or ID, must be greater than 0 and less than 64 characters' Altho when I use other ...
Roy's user avatar
  • 1
0 votes
1 answer
136 views

Unknown action hashit in contract eosio

stdClass Object ( [code] => 500 [message] => Internal Service Error [error] => stdClass Object ( [code] => 3050000 [name] => action_validate_exception [what] => Action validate exception [details] => ...
Sunny Kasera's user avatar
0 votes
1 answer
563 views

Invalid packed transaction

I am trying RPC API. Here is the code which I am using on cmd for testing a dummy transaction. curl --request POST --url http://localhost:8080/v1/chain/push_transaction --header 'accept: application/...
Sunny Kasera's user avatar
0 votes
1 answer
43 views

Can we use addresses to query balances from EOSJS?

I wanted to know if we could use addresses instead of account names to query balances (get_currency_balance) from eosjs?
coder123's user avatar
  • 141
0 votes
1 answer
62 views

Cannot create account using EOSJS 16: Permissions Error

I know EOSJS 16 is deprecated, but I want to know how to solve this following error in it. var Eos = require('eosjs'); // Default configuration var config = { chainId: 'CID', // 32 byte (64 ...
coder123's user avatar
  • 141
0 votes
1 answer
138 views

Not able to run EOSIO module for demux

while trying to run demux, I am getting an error. The proper initialization has not occurred. Failed to migrate the postgres database. The full error code is this: {"name":"demux","hostname":"...
coder123's user avatar
  • 141
2 votes
1 answer
56 views

duplicate key value violates unique constraint "_block_number_txid_pkey"

I get this error when I run demux postgres the first time: Key (block_number)=(1) already exists The code abruptly stops. How do I fix this? dataType:undefined detail:"Key (block_number)=(1) ...
Bhaskar's user avatar
  • 31
1 vote
3 answers
120 views

Is it posible to deny EOS transfers for Account?

Imagine I have account A and account B. Account A is the "owner" of B and A wants to deny EOS Transfers for Account B and allow all other Actions(that means A should have full "active" operations)? ...
DarDev's user avatar
  • 21
0 votes
1 answer
232 views

How to import eosjs-ecc into a react typescript project

I created a 'create react app' with typescript and I now want to import and use eosjs-ecc Can I just import it with yarn add eosjs-ecc and then do import ecc from 'eosjs-ecc' or do I need to clone ...
Bill's user avatar
  • 291
1 vote
0 answers
169 views

Unable to retrieve user tokens using get_currency_balance

I am trying to get user tokens with the following method: static async getUserTokens(userAccount) { console.log("Get tokens for: " + userAccount); try { const rpc = new JsonRpc("http://...
Viktor Gagaleski's user avatar
1 vote
1 answer
62 views

What are the patterns and anti-patterns when programming for EOS?

When programming smart contracts or writing eosjs code, there are certain pitfalls that you might fall into if you are not careful. What are some of the patterns and anti-patterns to be aware of that ...
Phillip Hamnett - EOS42's user avatar
3 votes
1 answer
73 views

How do i convert a 128_t binary hex to decimal in eosjs?

I have the value: 200000000000000000000000000000 which is represented as: 0x00000040952fe4da5c1f3c8602000000 that i'm trying to convert in eosjs. signedBinaryToDecimal(hexToUint8Array("...
Michael Fletcher's user avatar
0 votes
1 answer
660 views

Is there public node available for nodeos & keosd?

Is there any public node url exists of nodeos and keosd for EOSIO mainnet and testnet? Using that URL will access all RPC methods of chain and wallet.
chinmay's user avatar
1 vote
1 answer
808 views

On method call: "assertion failure with message: read"

I am calling a method that is completely commented out. I am calling it from EOStudio and from command line tools. Is this a bug or does someone know how to fix this? assertion failure with message: ...
errolflynn's user avatar
0 votes
1 answer
345 views

Get address or eos account transactions

I want to get transaction list of request address or account using EOSJS or any RPC method. Kindly guide for it. As per check EOS dev documentation unable to find method which fullfill this.
chinmay's user avatar
0 votes
1 answer
61 views

Create account in EOS using RPC method or npm package [duplicate]

I wants to create account in EOS using RPC method or Npm package.As per review dev doc of EOS not found any methods for it. I am implementing this in nodejs. Kindly guide for it, how can i process ...
chinmay's user avatar
0 votes
2 answers
124 views

How to programmatically send tokens using EOSJS safely?

According to the EOSJS readme: Using the JsSignatureProvider in the browser is not secure and should only be used for development purposes. Use a secure vault outside of the context of the ...
marijn's user avatar
  • 71
1 vote
2 answers
3k views

Transaction requires authority, but does not have signatures for it

I am trying to send tokens from one account to another using eosjs & reactjs with the standard eosio.token contract but I have issues with the authority. Can someone please explain the meaning of ...
Viktor Gagaleski's user avatar
0 votes
1 answer
79 views

EOSLime with Kylin: Account Creation

EOSLime does not seem to be able to create accounts with Kylin chain thru my method. It produces an error that there is insufficient RAM. My method: let default_a = eoslime.Account.load('...','...');...
errolflynn's user avatar
2 votes
1 answer
357 views

TypeError: f is not a function

I'm trying out the eosjs official documentation, but can't make any RPC calls. This is how I've initialized everything: const { Api, JsonRpc, RpcError } = require('eosjs'); const { fetch } = require('...
Kartik Shah's user avatar
0 votes
1 answer
560 views

How to create a multi-sig proposal with eosjs?

I am trying to create a multi-sig proposal (eosio.msig::propose) using eosjs v20.0.0. The proposed transaction is arbitrary but in my case, I would like to propose an updateauth action. The ...
telos nut's user avatar
3 votes
2 answers
176 views

modules.format.encodeName() replacement in 20.0.0?

In [email protected] I have a Eos.modules.format.encodeName() Is there something like that in [email protected] or what can I use to replace it?
Ivan Lemeshonok's user avatar
4 votes
2 answers
879 views

Get Table Rows with Pagination

How do we get records from a table by pages? My requirement: I have a table with 100 records and want to display all these records in my front-end-application with 10 records per page and if the user ...
Karthi's user avatar
  • 41
0 votes
1 answer
169 views

How to avoid CORS error on testnet?

When accessing an eos contract via eosjs, it works fine on a local net, but raises an error on testnet (jungle): Access to fetch at 'https://jungle.eosn.io/v1/chain/get_abi' from origin 'http://...
Lazaridis's user avatar
3 votes
1 answer
668 views

Error: fetching abi for <accountname>: Read past end of buffer

I am trying to send transaction but getting this error Error: fetching abi for : Read past end of buffer
kashish gulati's user avatar
1 vote
1 answer
394 views

Installing and running an EOS mainnet node

The purpose of this installation is for me to be able to make /v1/chain/ mainnet API requests on a remote server that I have access to that won't disrupt mainnet itself. I tried using EOSNation/...
eosftw's user avatar
  • 11
0 votes
1 answer
134 views

Error while signing a transaction using nodejs wallet API?

I am building an eosdapp using nodejs code.I got the wallet api from the developers portal,but when i run the code i get the following error. {"code":500,"message":"Internal Service Error","error":{"...
sachin murali's user avatar
0 votes
1 answer
598 views

EOSJS error Non-base58 character

Please help! I'm currently encountering the ff. error Uncaught Error: Non-base58 character at Object.decode (eosjs-jssig.js:26) at Object.checkDecode (eosjs-jssig.js:15) at y (...
Ericko's user avatar
  • 1
0 votes
1 answer
303 views

Cannot create account using the EOSJS Create Account

eosjs 20.0.0 cannot create new account using the eosjs rpc call see following code snippet below. const addPrivateKey = "EOS8i1CXTY4Sz39XaQWX2RpccsCZ1nWM3w9zRhjCFChdci2Y65ck4"; const rpc = new ...
user3077's user avatar
0 votes
1 answer
157 views

How to unlock my wallet using nodejs?

The code given below is my nodejs code forunlocking my wallet name "seek".I got this API from eos developers portal,but don't know how to pass input data(wallet name and password) into it.Please help ...
sachin murali's user avatar
2 votes
1 answer
49 views

Is there any way to discard a committed transaction?

I always have this doubt whenever i push a transcation. Is there any way to cancel a committed transaction before it's verifed by the block producers?
sachin murali's user avatar
1 vote
2 answers
213 views

Is there any IDE for eos smart contract?

Is there any IDE for compiling eos smart contract? for example ethereum have remix to compile and run solidity based smart contract.
sachin murali's user avatar
0 votes
1 answer
69 views

Any python api for getting account name by inputting public key?

Is there any python api for getting account name by inputting public key? I have got this code from developers portal, but I don't know how to use it. import requests url = "http://host/:port/v1/...
sachin murali's user avatar