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
3
votes
1answer
252 views

Deploy Contract from browser using eosjs

so I would like to deploy an EOS contract using eosjs. I encountered several problems (especially with converting the .abi and .wasm files). All the examples either use node (so fs is available) or an ...
0
votes
1answer
70 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 ...
2
votes
2answers
303 views

A possible alternative sign in/login process instead of firebase auth / amazon cognito using an eos contract?

I had the the idea of a secure alternative login process using an EOS smart contract instead of firebase or Amazon cognito. I would like to know if something like this feasible? My idea is somewhat ...
0
votes
1answer
32 views

Smart contract redeem token action - Example

Do you have some example that shows how to design an action for a smart contract that when the user sends a REDEEMCODE action the smart contract will transfer some quantity of a custom token for the ...
1
vote
2answers
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 ...
0
votes
1answer
311 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 ...
0
votes
1answer
30 views

How much RAM saved / latency added from new KV Table

How much RAM do the KV Tables save / how much additional latency does this storage type add to the trx lifecycle? https://github.com/EOSIO/eos/releases/tag/v2.1.0
0
votes
1answer
252 views

Setting eosio.code permission for contract account in eosjs

I am trying to set the eosio.code permission for my contract on account kbo2byvpkbiy (private blockchain). The reason I want to do this is calling eosio.token/transfer from within this contract. All ...
0
votes
2answers
87 views

How to create an EOS account using eosjs without existing account and its private key

I have a question about EOS, eosio and eosjs. I want to create an EOS account using frontend website that I developed. I I recognize that creating an account needs existing account, and needs its ...
0
votes
1answer
44 views

How to obtain signatures?

I'm trying to send a transaction by using eos push_transaction, but I don't have signatures. I found some exaples, they have signatures like below, they start with SIG_K1_ I have a transaction object. ...
0
votes
1answer
45 views

How much RAM to buy?

How can one determine the amount of RAM to buy for a new account and for regular transfer actions? The page here recommends 4K of RAM: https://support.bancor.network/hc/en-us/articles/360018325291-...
0
votes
1answer
93 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\":...
0
votes
0answers
13 views

Is there a C++ library just like eosjs?

I want to sign and send transactions (generally trigger any smart contract action) from a c++ external app. How can I do this? If my app was in javascript, that would be easy since I know that I can ...
0
votes
1answer
116 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":{"...
0
votes
0answers
12 views

How to make the code automatic appove smart contract action?

The environment is like this The user will click the login button to log in to the cloud wallet, so that the code gets the user's login permissions, but when performing certain actions, you still need ...
0
votes
0answers
24 views

Signing a transaction on an edge device without TAPoS fields and push it separately to the chain

I do have a use case where I need to sign a transaction on an edge device without having connection to the chain (but lets consider chain ID , user and private key are well known on the edge). I am ...
0
votes
2answers
47 views

How to listen/get on-chain data in real time

I know that I can use eosjs to read/query multi_index table data from the chain. However, my goal is to listen to/on these changes. Specifically, I want to receive a notification whenever something ...
0
votes
1answer
38 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; } }; ...
0
votes
0answers
20 views

Is there a small C++ library or a simple gist/function just for signing transactions?

I'm building an app that consists of two services, one service will run on the edge and the other in the cloud. Obviously, I want the service on the edge to be lightweight since It will run on ...
0
votes
1answer
20 views

WARN: 10 attempts to find canonical signature

What does this warning mean? WARN: 10 attempts to find canonical signature This is a warning as I understand from eosjs.
0
votes
1answer
46 views

Name should be less than 13 characters, or less than 14 if last character is between 1-5 or a-j

i am facing this error when i hit my Post API,Basically i am creating this API for propose the Multisig Transaction. And i am follow the documentation of EOSJS from offical website of EOSIO. MY naming ...
0
votes
1answer
87 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://...
2
votes
1answer
46 views

Multinode data with eosjs

I need to prepare eosio dashboard for that I need multi nodes information. I am using eosjs nodejs library to get genesis node chain information. Can I get which other nodes are connected with genesis ...
0
votes
1answer
25 views

Creating an account key pair outside of using eosjs

Hello Guys is there any method through which I can create a valid EOSIO key pair without using EOSJS, If that's not possible can any one explain how does eosjs-ecc create those keys and can I ...
0
votes
0answers
24 views

Serializing EOS transactions offline use eosjs

can anyone suggest any advice into serializing offline eos transactions? We are using the eosjs api serializeTransactionsWithActions method to serialize transactions and we implemented an Offline Abi ...
0
votes
1answer
44 views

EOS 'newaccount' action generates the error Error: missing authority.keys (type=key_weight[])

I have created a MultiNode Setup using the Bios Boot sequence https://developers.eos.io/welcome/latest/tutorials/bios-boot-sequence. And created the accounts as 'eosio' & 'accountnum11'. I am ...
0
votes
1answer
24 views

Signing and submission of transaction seperately

is there any way where we can have a user sign a transaction using their private key on the front end. And we get the signed transaction transfer it to our server over the internet and push the ...
1
vote
3answers
164 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 ...
1
vote
1answer
64 views

Code sample to use PowerUp feature

Can someone point me to code samples on how to use PowerUp feature? Also, how can a wallet be setup to use it automatically? Thanks in advance.
3
votes
1answer
141 views

modules.format.encodeName() replacement in 20.0.0?

In eosjs@16.0.9 I have a Eos.modules.format.encodeName() Is there something like that in eosjs@20.0.0 or what can I use to replace it?
1
vote
1answer
266 views

Max inline action depth per transaction reached on simple EOS transfer action call?

I am seeing the error Error 3040000: Transaction exception Ensure that your transaction satisfy the contract's constraint! Error Details: max inline action depth per transaction reached after a ...
1
vote
2answers
314 views

New JSSignatureProvider is not a function in EOSJS

Version of EOSJS eos@fffff and eos@beta3 Describe the bug const JsSignatureProvider = require('eosjs/dist/eosjs-jssig'); const signature = new JsSignatureProvider([privKey]); TypeError: ...
0
votes
1answer
57 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 ...
0
votes
2answers
61 views

How to get irreversible status in eosjs?

I am currently using api.transact to send the transaction to the eos Blockchain. I want a way to check for irreversile status so that I can confirm that the transaction has happened successfuly. Is ...
0
votes
1answer
39 views

dApps: Public networks & Messaging

Could you please help me to figure out the following questions? Is it safe if users of a decentralized application use public nodes endpoint via RPC to make transactions to smart contracts? Such as ...
0
votes
1answer
40 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 ...
0
votes
1answer
232 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 ...
3
votes
1answer
169 views

EOSJS how to query the top voters

I can get some unsorted voters by using await eos.getTableRows({ json: true, code: 'eosio', scope: 'eosio', table: 'voters', // tableKey, // lowerBound, // upperBound, ...
1
vote
2answers
309 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 ...
0
votes
1answer
299 views

WAX - Signature error : "Message: transaction declares authority, but does not have signatures for it."

I'm trying to send a transaction from my react frontend to local chain, I have signed in wax cloud wallet and made a transaction. But at last I met this signature error. "Message: transaction ...
0
votes
1answer
43 views

Difference between send and push transaction

So I've been thinking about this from the start but haven't found any resources on how they differ. On the eosio chain api reference, there is a send_transaction method and a push_transaction method. ...
0
votes
1answer
75 views

Claim rewards system (Something like how alien worlds give rewards to players)

I'm trying to make something similar to alien worlds, how can I transfer tokens from the contract to the user but have the resource costs go to the user using EOSJS?
0
votes
1answer
36 views

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

I am trying to sign transaction and push manually using eosjs. const signatureProvider = new JsSignatureProvider([privateKey]); const sigResult = await signatureProvider.sign({ chainId: ...
0
votes
1answer
39 views

How to use resource_payer on eosjs

EOSJS added a new feature to their library and now we can specify the resource payer. I wanted to try and use it but their example doesn't work.
1
vote
0answers
20 views

How can I use nonsecure connection to localhost instead of secure one

I'm pretty new with EOS programming and I'm trying to run simple broadcast transaction. I'm using following code: let transaction = EosioTransaction() transaction.rpcProvider = EosioRpcProvider(...
0
votes
2answers
104 views

How to call Wax action in PHP

All of the tutorials on building dApps, they use Javascript and then they tell you how NOT to do it by using your PK to create a signature. So I'd like to use PHP on the backend and grab my key from a ...
1
vote
1answer
32 views

How to validate data from new return data value feature stored in block header

How would one go about validating the data from the block header of a return data value action? It seems like a cool feature, but you'd need a full history node to validate wouldn't you? https://...
0
votes
1answer
43 views

Buyng Ram EOSIO

Hello i want to make api for buying RAM so is there any api available or any library please let me know but im already using eosjs ,eos-api of nodejs please let me know in comment thank you
0
votes
1answer
33 views

EOSIO retrieve 12 char name from blockchain api

Hello is there any function available from which we can retrieve 12 char name by giving private key ? or you can say api function or eos library for import eos account
0
votes
1answer
71 views

How do I record LOG in eosio smart contract?

I deployed and tested eosio smart contract. I want to record the logs of a smart contract using the web API. How can I do this? I searched but didn't get any satisfying answer. I tried to get logs by ...