Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [eosjs]

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

0
votes
1answer
12 views

Access public variables of a TABLE in an EOS Smart Contract

I'm trying to access data inside a smart contract. The contract is visible here for example. The documentation for the smart contract is accessible here An example of an instance of the contract (...
0
votes
1answer
35 views

get data from a smart contract

I am a bit out of my depth here but I'm trying hard to keep up. I'm trying to call a method from a smart contract on EOS. That's the Bancor Smart Contract I'm interested in in particular. Just for ...
0
votes
0answers
30 views

Unsatisfied authorization error after manually signing a transaction with ecc.signHash

I am trying to create an unsigned transaction and broadcast it. I've used the following lines of code, and called transferSignPushTransaction with valid parameters... async function ...
2
votes
1answer
77 views

Calling a Smart Contract action through EOSJS

I have a local EOS network and I am trying to make my application work through a web page. I am using eosjs version 16.0.9. I downloaded it and ran npm install. I am able to run the following code ...
1
vote
0answers
25 views

Payment to dapp with text comments best practice

I am new in eos, so maybe i say something strange. I want to create a dapp that can receive payments from mobile wallets with text comments. I imagine this like front end where user type text and ...
0
votes
2answers
28 views

How to “get currency balance” with mongo_db_plugin?

I'm struggling to find the answer to that issue and thought maybe the collective knowledge might be helpful ;-) I'm trying to get the balance of a certain token for a specific account from the ...
0
votes
2answers
36 views

using keosd in eosjs

It seems that eosjs examples do not use keosd to retrieve the private keys or to sign a transaction. https://eosio.github.io/eosjs/ It says "Using the default JsSignatureProvider in the browser is ...
0
votes
0answers
14 views

How to create Hex data in Node.js RPC api

I'm looking at the node.js RPC api get_required_keys The transaction parameter looks like this. { "ref_block_num": "100", "ref_block_prefix": "137469861", "expiration": "2017-09-25T06:28:49",...
1
vote
2answers
63 views

How to implement “cleos push action” in Node.js via RPC or eosjs?

I'm working on Todos example in the following link. To Do list smart contract By using cleos utility, everything works fine. Now, I'm trying to access the smart contract with Node.js RPC. How ...
4
votes
1answer
26 views

EOSJS vote producer fails when voting for more than two producers?

We're trying to use scatter + eosjs for voting. This works fine if you pick one or two producers but any more than that and you get the following 500 error - POST https://api.kylin.alohaeos.com/...
1
vote
0answers
19 views

How to deploy my samrt contract on testnet in EOS [duplicate]

I have successfully pushed the transaction and deployed the smart contract on private net, I want to know How to deploy it on testnet. I have created the account on Jungle testnet.. Kindly tell me ...
1
vote
1answer
36 views

eosjs, have getActions working both ways

I've been struggling with that for a couple days and I'm crawling out for help now ;-) I've been using eosjs to parse the Actions of an account but all I can see are the transactions created by the ...
1
vote
0answers
78 views

Error 3090003 - How to provide signatures for eosio.code?

When I try call custom smart contract action I get this error. message":"transaction declares authority: '{\"actor\":\"triviafrenzy\",\"permission\":\"active\"}', but does not have ...
1
vote
1answer
21 views

How do I get my transaction Id to sign the transaction?

While signing the transaction there are 3 parameters that we need to pass, 1) txn 2) keys 3) id How Can I get my id and also what should be the structure of the transaction parameter, Kindly help
1
vote
0answers
26 views

Transaction exception while pushing transaction

While calling the push transaction API with the following body { "signatures": ["SIG_K1_K5umBpyieHE6czvtDMEAVjypG5Zz5sYo4NKbUkqJfe562mX22aLGwwZsYSQJLhBZi5s3hvjg6zVfS3ZucM97Ji5KNXSm4a"], ...
1
vote
1answer
25 views

Standard of communications between dapps and dapp browsers

I am building a dapp on EOS, and wondered what is the best practice of communicating with the dapp browser. For example on Ethereum I implemented the web3 library and all commands and apis were ...
1
vote
1answer
37 views

unsatisfied authorization error while push transaction

While using the push transaction I am getting the below error, Kindly help { "code": 500, "message": "Internal Service Error", "error": { "code": 3090003, "name": "unsatisfied_authorization", "what": ...
1
vote
1answer
31 views

What is a packed transaction?

This could be a noob question. While going through the community, I have seen some questions regarding packed transaction. Can anyone explain what is a packed transaction?
1
vote
0answers
26 views

generate eos keypair from Mnemonic/Seed

is it possible and is it secure to generate eos keypair using bip39 mnemonic seed? something like: const hdkey = require('hdkey') const wif = require('wif') const ecc = require('eosjs-ecc') const ...
1
vote
0answers
19 views

latest EOSJS (20.0.0-beta2): missing node_modules/eosjs/lib/index.js?

Trying to import latest build of EOSJS but getting error: Error: ENOENT: no such file or directory, open '.../node_modules/eosjs/lib/index.js' previous versions 'work' until I try to access the Rpc....
2
votes
3answers
60 views

Need to perform automatic smart contract function execution

Can we have a function in a smart contract to be executed automatically after some time? for example, transfer some tokens after every 5 seconds.
1
vote
0answers
16 views

Maximum call stack size exceeded with scatterjs and eosjs

Use in vue const eosOptions = { expireInSeconds: 60 } const network ={ blockchain: 'eos', protocol: 'http', host: 'jungle.cryptolions.io', port: 18888, chainId:'...
1
vote
0answers
53 views

List of transactions from a contract

I've been on this all day and can't figuring it out on my own so I'm reaching out for your help ;-) How can I get the list of ALL the transactions associated with an account? I've tried to play ...
0
votes
0answers
12 views

secure open source Payment Gateway

I'm working on an open source multi coin payment gateway to create EOS accounts, just like https://zeos.co EOS, BTC, BCH and ETH will be supported. My plan so far: The front-end checks if the ...
1
vote
0answers
8 views

How to deserialise extended amount?

How to deserialise extended amount from "0x00924c50832000000000000000000000" to a number in JS or PHP?
1
vote
2answers
93 views

How to transfer/deposit tokens on Front end Dapp with Scatter?

I am working on an EOS frontend Dapp with Scatter on local chain. I am getting a problem with transfer/deposit tokens from one account to another. After logging into scatter with "test1" and trying to ...
1
vote
0answers
39 views

scatter get identity generating a new publickey instead of using the keypair in the identity

I am trying to verify if account name belong to a publickey gotten in the client side with the browser. Why does scatter getIdenity function returns the right identity with the right eos account but ...
1
vote
0answers
86 views

How to call a contract from scatter

I want to make a transaction with Scatter but I'm getting this error function callContract(){ const account = scatter.identity.accounts.find(x => x.blockchain === 'eos'); const ...
1
vote
2answers
60 views

Querying EOSIO system contract table

How do I query an EOSIO system contract table ? As a learning challenge, I am trying to figure out how to calculate the amount of EOS votes cast and aggregate attributes of vote. Can I use eosjs to ...
2
votes
2answers
105 views

Getting Error while creating new account using EOSjs on Jungle-testnet

I am creating accounnt using EOSjs(20.0.0-beta1).My account_creat function goes like this: const createNewAccount = async ( account_name, owner_publicKey, active_publicKey ) => { try { ...
1
vote
1answer
23 views

Data bandwidth usage fees in eos

Where is smart contract data like a table stored? When I use eojs and execute getTableRows for example, are there any fees or limits?
3
votes
1answer
104 views

How can I get an accounts currency balance using eosjs

In the new version of eosjs, the getCurrencyBalance() method is no longer supported. How can I still get the currency balance of an account using eosjs?
2
votes
0answers
72 views

How to make a random uint64 to send to an EOS contract

My friend had made an EOS contract and he has asked me to submit a random uint64, I need to generate this in nodejs. Do I need to use a library like big number https://www.npmjs.com/package/big-...
2
votes
1answer
24 views

How to make “Game Items”

I have seen "game items" listed on https://bloks.io/account/rektplebeian how are these items created, and issued?
1
vote
1answer
41 views

Same name table of different contracts got merged

I wrote a contract, suppose C defining the multi-index table T. Table struct has two parameter suppose x and y. x was the primary key. I made some entries in T and when i tried to access it back, I ...
2
votes
1answer
55 views

How can I scan transactions on some contract address with eosjs

I want to scan transactions on some contract address and store this data to the DB with eosjs. How can I do this?
2
votes
4answers
161 views

Error in eosjs account creation on localnet

I am trying to create an account using eosjs in node.js. I am using : eos = Eos({keyProvider}); eos.transaction(tr => { tr.newaccount({ creator: 'eosio', name: '...
1
vote
0answers
48 views

how to create signature using cleos or other tools? [duplicate]

The contract I am trying to interact with has the following ABI: { "name": "resolvebet", "base": "", "fields": [{ "name": "bet_id", "type": "uint64" },{ "name": "...
5
votes
2answers
168 views

Multiple EOS transfers in a single transaction

Is it possible to pack a few transfers of EOS token to different accounts inside of single transaction? I know it's possible to pack multiple arbitrary actions inside one tx, but what about EOS token ...
2
votes
1answer
87 views

How to access data returned from eosjs?

I am struggling to find the right way to access the data in my react component. This is my action creator. I save every row returned from the promise into an array export function getBlocks(){ ...
2
votes
1answer
44 views

I want to perform 2000 transactions but when i am looping trough the eosjs code it throws an error

The error name is expired_tx_exception and the code for the same is 3040005 please tell me how can I perform these much transactions per seconds. I am able to perform 250 transactions per seconds but ...
2
votes
1answer
45 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 ...
4
votes
2answers
513 views

What is the best way of storing data on EOS blockchain?

I come across a situation where i need to implement a relational database for an application. Now my question is how to implement it and where should i save the data? also i don't want to save data on ...
0
votes
1answer
50 views

how can I implement recovery key thing in eos private network?

There are two keys associated with wallet 1st active and 2nd owner key. What if I forget this keys and want to recover how can I do that on a private network?
2
votes
1answer
201 views

Provided keys, permissions, and delays do not satisfy , but does not have signatures for it under a provided delay of 0 ms

my Code var EosApi = require('eosjs-api'); const Eos = require("eosjs"); // ./cleos create key #OwnerKey // Private key: 5KVihg2u3yZpBtoLhRGvqf6vBsq9swjyvUkvbpMVMQWz11NbMa2 // Public key: ...
2
votes
1answer
133 views

how to create private network same as mainnet?

I want to build a private network same as the mainnet of eos. Just like it's mainnet I want to have 21 producers I want voting and etc. etc. how exactly I can do that can anyone list the steps for the ...
2
votes
3answers
201 views

How to create wallet using eosjs or RPC call

I want to perform cleos create wallet -n <wallet_name> using an RPC call or any predefined library like eosjs. Please Help... EOS version : 1.2.0
2
votes
1answer
572 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: ...
5
votes
1answer
251 views

Can we set permission using eosjs?

Using cleos, we can set the permissions like this: cleos set account permission <your-account> active '{"threshold": 1,"keys": [{"key": "<your-key>","weight": 1}],"accounts": [{"...
2
votes
1answer
159 views

EOSJS - error message when eos.transfer(..)

When I try to call eos.transfer(..) I'm getting this error { message: 'assertion failure with message: unable to find key', file: 'wasm_interface.cpp', line_number: 930, method: 'eosio_assert' } ...