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
0answers
2 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
18 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
17 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
15 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
14 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
1answer
20 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
2answers
43 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 ...
0
votes
1answer
26 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
1
vote
1answer
27 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
35 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
35 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
30 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
30 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
34 views

dApps: How to run transactions from web app in decentralized way?

I'm thinking about the way how to build truly decentralized web applications. Smart contracts looks like the good idea how to run server logic. To be able to push transactions (actions) from web ...
0
votes
2answers
34 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
23 views

How to get timestamp through eosjs in seconds?

I want to get the timestamp of the block in Seconds but eosjs library returns it in an iso string format. Is there a way to receive timestamp in seconds or convert the string to seconds? Example: What ...
1
vote
1answer
46 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.
0
votes
2answers
110 views

Status of EOS Powerup feature

I have following questions on EOS Powerup: Is the EOS Powerup model optional? When is this expected to go live? The link here mentions April 8 where as https://eosauthority.com/powerup/ mentions that ...
0
votes
2answers
64 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
29 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; } }; ...
1
vote
1answer
29 views

EOSIO Error: 3040006 from api

from this afternoon we receive the error in question from the api, without having changed anything after several months of use. Anyone have an idea why?
0
votes
1answer
28 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....
1
vote
2answers
57 views

Prometheus exporter for eosio

I am new to Prometheus and Grafana. I need Prometheus eos exporter for the purpose of Eosio private blockchain dashboard. I researched but didn't get any expected results. I need to show the eos node (...
2
votes
1answer
30 views

Is having hashes of document certificates in EOS blockchain for tamper proof a good use case for EOS?

I have a application where I want to store a SHA256 hash of a document in a Blockchain. I want it to have a good life, ie storing the SHA256 hasha as a data in a transaction should bot be deleted ...
2
votes
1answer
40 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
0answers
5 views

Why scatter can only sign string within 12 characters?

when use scatter sign a string, you can sign message like this i have a dream but can't sign the message international song because the word international is more than 12 chars, why there's the limit?
0
votes
0answers
9 views

Generate Keypair from Mnemonic/seed in new eosjs

in the new eosjs, is there a way to generate keypair from seed. the older version have a method seedPrivate() but its deprecated in new version.
1
vote
1answer
16 views

Usecase of EOS for DApps

I have watched several tutorials for building DApps with EOS. But, All they did in tutorials was deploying smart contract and storing data in the tables. What is the point of doing that?(storing data ...
0
votes
1answer
23 views

Advantage of storing data in EOS compared to traditional database

I am learning blockchain concept and EOS. From my understanding, data which is stored in blockchain can not be modified. But, data in table in EOS can actually be modified? Then what is difference ...
0
votes
1answer
31 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
0answers
17 views

transaction authorization failed in execute A Multisig Transaction

I am facing this error,i follow all step first i propose a multisig transaction from the account of "adeelabbasna" then i approved the transaction with account of "rajazahoor11", ...
0
votes
1answer
40 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
35 views

CORs Error for /v1/chain/push_transactions To Production Block Producer (Not localhost)

All of my other POST calls to a production EOS BP are succeeding no problem. However, when I use push_transactions via ScatterJS I get a 500 CORs error. const networkJson = { blockchain:'eos', ...
0
votes
1answer
59 views

Eosjs. How to add new key to JsSignatureProvider

Here: var privateKeys = [...]; var sp = new JsSignatureProvider(privateKeys); var key = 'ASG...'; sp.addKey(key); // (1) I want to add new key to JsSignatureProvider, but I can't find method like (...
0
votes
1answer
56 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 ...
0
votes
1answer
29 views

How to integrate Restfull API with smart contract using c#?

I am new to EOSIO. I referred eos.io for learning. Now I need to learn how to integrate API with a smart contract. I am willing to do this in c#. I got answers mostly for eosjs which is used in nodejs,...
2
votes
1answer
24 views

How to use eosjs V20 to create and sign a offline actions?

when I create actions like this,and prapare to use JsSignatureProvider to sign (async()=>{ let actions = [{ account: 'tommy', name: 'hi', authorization: [{ actor: 'tommy', ...
4
votes
1answer
61 views

Trying to execute a smartcontract action using a multisig account, but it shows executed even when the transc fails due to smartcontract constraints

I'm proposing a transaction to execute an action of some smartcontract, the transaction is showing executed irrespective of failure or success of the smartcontract action(say transferFunds), this is ...
0
votes
1answer
218 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
1answer
118 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('...
0
votes
1answer
75 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
2answers
199 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:...
1
vote
1answer
105 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.
1
vote
2answers
107 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....
0
votes
2answers
41 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'...
1
vote
2answers
113 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('...
1
vote
1answer
236 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, ...
0
votes
1answer
45 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 ...
1
vote
1answer
56 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', //'...
1
vote
1answer
73 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: '...