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
5 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
36 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":"...
0
votes
0answers
6 views

“JsSignatureProvider is not a constructor” in Firebase Cloud Function

I run the following locally in my machine (or in any of my remote servers) and I get no problem: const JsSignatureProvider = require('eosjs/dist/eosjs-jssig').default; const signature = new ...
0
votes
0answers
2 views

eosjs sign data does not match with eosio assert_recover_key data

at client, I create a signature from seed like this. the key pair is [ '5KgLbwEy7d4qufeLqPnPL1YQU1tscJXCnpqTTn7REaZsjYBjDWr', 'EOS5Mk748B6ojrZdTHP8BoLBXyKjQzzthaqGa4v97vfiGEfbEM2Np'] import ...
0
votes
0answers
9 views

It didn't match the Provied keys in eosjs

First I got a error: eos.min.js:1 {"code":500,"message":"Internal Service Error","error":{"code":3090003,"name":"unsatisfied_authorization","what":"Provided keys, permissions, and delays do not ...
0
votes
1answer
26 views

duplicate key value violates unique constraint “_block_number_txid_pkey”

i get this error when i run it 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) ...
1
vote
3answers
37 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)? ...
0
votes
1answer
28 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 ...
1
vote
0answers
18 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://...
1
vote
1answer
28 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 ...
3
votes
1answer
27 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("...
0
votes
0answers
7 views

JsSignatureProvider in a node or electron context

According eosjs documentation 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 ...
0
votes
0answers
46 views

Search in a multi_index table by multiple fields (compound search)

Here is defined a sample table with four fields, two of them (account and type) I am going to use in my compound search: struct [[eosio::table]] total { uint64_t id; uint64_t account; ...
0
votes
1answer
21 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.
1
vote
1answer
35 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: ...
0
votes
1answer
27 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.
0
votes
0answers
17 views

How to use eosjs with scatter to deploy contract?

I am working on a use case that requires the smart contract to be deployed from frontend, and I am using Scatter as the wallet for the keys. Is there a way to deploy contracts on EOS Network using Eos....
0
votes
0answers
17 views

How can I get transaction receipt using its id in EOSJS or via RPC? [duplicate]

I want to get transaction by its hash using eosjs or rpc method.
0
votes
0answers
9 views

EOS token payment gateway

I was trying to create an API which integrates with nodeos on my server, rpc calls can be made by the web api for the purpose of a payment gateway for eos . My question is how to integrate an API with ...
0
votes
1answer
22 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 ...
0
votes
0answers
40 views

How to encode account name (to get uint64) using eosjs2?

I'm migrating from @scatterjs/eosjs eosjs@16.0.9 to @scatterjs/eosjs2 eosjs@20.0.0. using eosjs I had the following solution: Eos.modules.format.encodeName(name, false) using eosjs2 I found the ...
0
votes
1answer
29 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 ...
1
vote
1answer
134 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
44 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('...','...');...
1
vote
1answer
34 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('...
0
votes
1answer
160 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 ...
2
votes
1answer
65 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?
4
votes
1answer
158 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 ...
0
votes
0answers
37 views

How to validate public key in eos using java?

As there are function in eosjs-ecc library to validate keys in JavaScript: const ecc = require('eosjs-ecc') const pubkey = 'EOSXXXXXXXXXXXXXXXXXXXXXX' const wif = '5HXXXXXXXXXXXXXXXXXXXXXXXX' ...
0
votes
1answer
27 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://...
1
vote
0answers
56 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
0
votes
0answers
33 views

Error while pushing a transaction using python?

after successfully signed the transaction, when i try to push it using the pyton api from the eos developers portal, i got the following error {'code': 500, 'message': 'Internal Service Error', '...
0
votes
1answer
97 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/...
0
votes
1answer
75 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
64 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 (...
0
votes
1answer
108 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 ...
0
votes
1answer
64 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 ...
2
votes
1answer
34 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?
0
votes
0answers
29 views

error while compiling code in eosstudio?

Recentlty, i tried a eosio IDE named eosstudio,which is pretty impresive.The problem i face while compiling my code is given in the picture.then I got an advice from a telegram channel that,chenge the ...
1
vote
2answers
108 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.
0
votes
1answer
27 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/...
0
votes
0answers
19 views

eosjs dist files generation issue under Wsl

I would like to have a copy of the eosjs browser files as the generation of theses files (dist files) doesn't work under windows (wsl : unbuntu) where can I get these files? (I've tried to use ...
1
vote
2answers
60 views

how to avoid scatter confirmation message?

I have built an dapp EOS blockchain. It's almost like twitter where the user can tweet and also use as a microblogging site in EOS blockchain.I have used scatter as transaction signer for using my ...
0
votes
0answers
32 views

eosjs-ecc in other languages?

I'm looking for a way to do this https://github.com/EOS-Nation/eos-encrypt/blob/master/examples/encrypt-multiple-keys.ts it Java and Swift. Did anyone try to port it?
0
votes
1answer
37 views

How to add the formula of ram calculate price for eos in our project?

Actually I am building an application and I would like to add the ram calculation for eos there. if anyone wants to calculate the ram for the accounts creation, he can use our website.thanks.
1
vote
1answer
146 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
44 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 ...
3
votes
2answers
135 views

EOS connection to react native app

Can someone share an example of EOS blockchain integration with react-native? I am new to EOS development and I am struggling to integrate it in react-native app, there are always some missing ...
1
vote
1answer
45 views

How can I query data from smart contract data base?

I mean not just printing data on the console, like in the documentation examples, or by get_table_rows API, but return it as function result, or maybe there is another way. The idea is that I need an ...
1
vote
0answers
58 views

Demux: How to deserialize transaction data from MongoActionReader stored in MongoDB by mongo_db_plugin?

When I use NodeosActionReader I can get data passed as parametters to actions via payload.data.parametter. However when I use MongoActionReader payload.data contains only hex data. How to deserialize ...