Questions tagged [javascript]

All questions related to the use of JavaScript within the EOSIO framework

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

EOSJS get information about a list of the multi-index table rows

Suppose that I have a user table, where each user has a status. TABLE user_info { name username; uint64_t status = 0; auto primary_key() const { return username.value; } }; ...
towi_parallelism's user avatar
0 votes
1 answer
84 views

EOSIO unsupported key_type uint64_t

I am using a secondary key to get table rows: static async getItemById(itemId){ try{ const rpc = new JsonRpc(process.env.REACT_APP_EOS_HTTP_ENDPOINT); const result = await rpc....
towi_parallelism's user avatar
0 votes
1 answer
641 views

Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

I am working on an EOS dApp that is listing dogs (it could be other items) and displaying them on an HTML page. The dApp has a function in its JS file to add dogs. This dApp is working with nodeos up ...
vinchik's user avatar
1 vote
1 answer
126 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
1 vote
2 answers
300 views

How can you use the ONLY_BILL_FIRST_AUTHORIZER feature for updateauth?

When I try to put 2 authorities to updateauth I get this error Error: updateauth action should only have one declared authorization so how can I use another accounts CPU to change my keys not using ...
josh arnet's user avatar
0 votes
1 answer
541 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
3 votes
1 answer
376 views

Sending transaction with Scatter from a single-page application

Request for help: I need a simple example of sending transaction (pushing a contract action test) by Scatter written in plain JS for a single-page browser scrip without any requirjs , vue , angularjs ...
Spark E2's user avatar
0 votes
0 answers
106 views

Transaction signing error

Good morning, everyone I use EOS UAL to login at frontend, and it works, but there is troubles while signing transaction. Done signing like in an example https://github.com/EOSIO/tropical-example-web-...
Ivan Lemeshonok'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
1 vote
1 answer
75 views

Encrypt a message in the memo field using the receivers public key

I'm looking to see if it is possible to use the memo field as a way to send encrypted messages to an account by using the receiver's public key to do the encryption. Since the receiver has the private ...
Patoshi パトシ'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
0 votes
1 answer
74 views

Scatter detection delay issue

I am working on developing a web app in EOS. I am using scatter browser extension to sign the transactions. During page load, the status of scatter is checked using the following code const setStatus ...
Muhzin's user avatar
  • 510
3 votes
2 answers
708 views

State History Plugin. How to deserialize the data?

I cannot find any implementation of a consumer for the state_history_plugin. The official Nodeos webpage suggests the fill-postgresql repo. But, I cannot compile it -- even after building the ...
zeh's user avatar
  • 201
1 vote
0 answers
128 views

Tutorial on how to connect a website login to logging in with Scatter Desktop?

I have a website with the ability to login with your username / password. But I want to create a way to login with Scatter Desktop. Are there any tutorials on how one can go about doing this? My ...
Patoshi パトシ's user avatar
2 votes
1 answer
619 views

How reproduce sha256 in Javascript?

I actually use an implementation like the dice contract : https://github.com/EOSIO/eos/tree/v1.2.0/contracts/dice You create a key and his hash with sha256, you first send the hash and then the key ...
Paul-Alexandre Tessier's user avatar
2 votes
2 answers
287 views

Get the last transaction from the blockchain

I'm looking for a way to get the latest transaction recorded on a particular account. For example, I'm trying to get the latest transaction for "newdexpocket", how can I do that using nodejs? Here's ...
Linda's user avatar
  • 185
1 vote
1 answer
61 views

Which eos block explorers have an API endpoint to query accounts?

Which eos block explorers has an api endpoint where I can query an account? I want to pull in account json data into my javascript application.
Patoshi パトシ's user avatar
1 vote
3 answers
336 views

Interacting with a smart contract

How can a user interact with the contract? Is typing the command cleos push action the only option?
Gaurav Kumar's user avatar
2 votes
1 answer
750 views

how to start a non producing block and connect to block producer?

I have an application which requires to perform many transactions and I want some non block producing node to connect the BP nodes? I want to start non-producing blocks and connect to block producing ...
yash vadhvani's user avatar
2 votes
1 answer
71 views

I Need Help Setting Up a Back-End Infrastructure for my Future DApp

I'm going through the process of designing a desktop DApp. I'm going to use GraphQL API's to connect the EOS blockchain to a Node.js server that'll use MongoDB with Electron.js and React.js on the ...
Brian M.'s user avatar
  • 141
2 votes
1 answer
214 views

Why is a BlockIndexState model required when using demux.js?

I was checking the project eosio-project-demux-example since I want to use demux.js in my own project. I have doubts about the mongoose model BlockIndexState. I would like to know what is it used for....
Racsoraul's user avatar
3 votes
1 answer
2k views

sign & push transaction separately eosjs

Goal: be able to separately create, sign and broadcast a transaction: Global for both approaches: const privkey = '5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3'; Approach 1: ...
Marcel's user avatar
  • 383
2 votes
1 answer
92 views

getActions(accountName), possible names? | actions.action_trace.act.name

Using eosjs, I query all outgoing transactions using const actions = (await eos.getActions(accountName)).actions; map it, and console.log() the sorted and filtered result. The problem is, ...
Marcel's user avatar
  • 383
1 vote
2 answers
416 views

Get the block_num_hint for calling eos.getTransaction(id, blockNumHint)?

How can I get the block_num_hint for calling eos.getTransaction(transactionID, blockNumHint) ? Using eosjs or any other library/api. I tested it without, with only 1 above or below and received ...
Marcel's user avatar
  • 383
3 votes
1 answer
304 views

list of confirmed and unconfirmed transactions of address / account

I wanna show users a list of confirmed and unconfirmed transactions of a specific EOS address or account name, using eosjs. Similar like a Ethereum block explorer. Any ideas or work arounds? If ...
Marcel's user avatar
  • 383
2 votes
1 answer
108 views

EOSJS Api Is it possible to iterate over and eval the functions?

Backstory: I'm creating a UI and I'd like an option for advanced users to be able to execute any function in the API. I've successfully imported the eosio_system.json file which contains all the API ...
altShiftDev's user avatar
  • 1,135
4 votes
3 answers
3k views

How to get operations history of account?

Should I analyze all the blocks or are there some methods in the eosjs library?
 Captain's user avatar
2 votes
1 answer
488 views

Accessing EOS from the front-end Javascript without NodeJs backend or cleos

Basically, I am looking for a library, like the Ethereum's web3js, for accessing EOS via the web using Javascript. Ideally, I want users to enter their EOS account name and let me query the main net (...
Kabir's user avatar
  • 843
7 votes
3 answers
591 views

Which NodeJs UI Framework is most suitable for EOSJS

I'd like to know which Framework you should use in eosjs. I have little experience with JavaScript and so I don't know which Framework works best together with eosjs or does the framework even matter? ...
Mangooxx's user avatar
  • 341
1 vote
0 answers
198 views

Exception when accessing a contract with eosjs 13.1.0 on Dawn 4.2 [closed]

when switching from Dawn 4.0 / eosjs 11.0.01 to Dawn 4.2 / eosjs 13.1.0, I bumped into the following problem: const eosioToken = 'eosio.token' try { const eosioTokenClientAccount = await eos....
Pierre Pontevia's user avatar
0 votes
1 answer
238 views

does eosjs only support eosio and eosio.token contract?

I suppose lookupAsync and lookup should remove 'contract' param. For example, my contract name is 'adv', if I use 'adv' as contract name, it will post a wrong argument to get_currency_stats like this: ...
user854's user avatar
  • 23
3 votes
1 answer
3k views

Reading table rows with EOSJS

Is there a way to receive the return output of an action with EOSJS? Say for example I have an action that reads columns from a table, sums a row and returns the result. How would I structure the ...
Mitch Pierias's user avatar
5 votes
2 answers
1k views

EOSJS HTTP CORS error

I'm trying to simply connect to my local EOS block from within a React Component with the following code; import EOSJS from 'eosjs'; const config = { keyProvider: ['INSERT_PRIVATE_KEY_HERE'], ...
Mitch Pierias's user avatar
1 vote
0 answers
139 views

Failed to deserialize variant EOSJS

I am following this tutorial https://github.com/eosasia/ping-eos I am trying to connect my web application to my smart contract. when i use cleos to test the smart contract i am able to see that the ...
wandos's user avatar
  • 221
7 votes
5 answers
2k views

EOSJS tutorials

I have checked Where can I find complete (whole stack) EOS dApp development example projects? With smart-contracts, the necessary C++ coding and a browser interface? But I haven't found a full EOSJS ...
wandos's user avatar
  • 221
1 vote
0 answers
102 views

What are the units of the total_votes in the producer_info structure?

The structure is defined here https://github.com/EOSIO/eos/blob/7bce267c6e48bcbf2d81f0ed51a3771501fdbb7b/contracts/eosio.system/eosio.system.abi#L134 total_votres is a float64 The value reported by ...
MarkLockettAU's user avatar
5 votes
1 answer
135 views

How difficult would it be to incorporate AssemblyScript?

It would be awesome to see support for AssemblyScript (which compiles typescript to wasm). So how can we do this? The database interface seems like the main headache. Boost seems to be way too ...
wanheda's user avatar
  • 303
2 votes
1 answer
395 views

How can I fetch the list of the active block producers and standby block producers using eosjs?

At this time, is it possible for me to do so when the BPs have not been elected? I need this for a block explorer I'm building using eosjs.
Jordi Goyanes's user avatar
3 votes
2 answers
541 views

Where is the API for block producer voting in EOSJS?

I have found the 'system voteproducer' command in cleos. Should I make a raw transaction or something like that?
MarkLockettAU's user avatar
5 votes
2 answers
145 views

EOS.IO utilization with Django?

Has anybody been able to utilize EosJs or any other type of implementation with django? I'd like to be able to build my dApp utilizing the testnet, but I'm not quite sure how to approach the problem.
Ramy2800's user avatar