Questions tagged [eosjs]
QAs about the JavaScript module eosjs which uses RPC-APIs to interact with an EOS.IO blockchain.
53
questions with no upvoted or accepted answers
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?
3
votes
1
answer
309
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 ...
3
votes
1
answer
191
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,
...
2
votes
2
answers
331
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 ...
2
votes
0
answers
27
views
How to deserialise extended amount?
How to deserialise extended amount from "0x00924c50832000000000000000000000" to a number in JS or PHP?
2
votes
0
answers
169
views
How to calculate the minimum RAM & minimum Stake required for a new account?
In the browser via eosjs, I have made the below function adapted from the docs but how do I calculate the minimum RAM in bytes, stake_net_quantity and the stake_cpu_quantity?
I understand these ...
1
vote
1
answer
39
views
I want to store additional data on the "submit_transaction" using transact on the api object
I am new to the eosio platform. My goal is to store additional data onto the testnet.eos.io and receive a transaction_id which I managed to do. However on searching my transaction_id I see my ...
1
vote
0
answers
46
views
How to catch transaction errors?
I'm trying to send a specific number of transactions per day to a smart contract.
Because of low CPU stake I easily get CPU error.
My goal is to catch this error and handle it in order to keep trying ...
1
vote
0
answers
24
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(...
1
vote
1
answer
130
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.
1
vote
0
answers
169
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
2
answers
396
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: ...
1
vote
0
answers
95
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 ...
1
vote
0
answers
41
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 ...
1
vote
3
answers
195
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
0
answers
347
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
0
answers
83
views
Transaction exception while pushing transaction
While calling the push transaction API with the following body
{
"signatures": ["SIG_K1_K5umBpyieHE6czvtDMEAVjypG5Zz5sYo4NKbUkqJfe562mX22aLGwwZsYSQJLhBZi5s3hvjg6zVfS3ZucM97Ji5KNXSm4a"],
...
1
vote
0
answers
138
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
0
answers
110
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
0
answers
220
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 ...
1
vote
2
answers
346
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
0
answers
98
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
0
answers
317
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
0
answers
153
views
How to get assertion messages from Nodeos?
When I trigger a failing eosio_assert my Nodeos instance outputs something like:
2018-08-01T16:45:42.006 thread-0 http_plugin.cpp:476 handle_exception ] Exception Details: 3050003 ...
1
vote
0
answers
281
views
Using recover_key with eosjs
I want to validate user signatures in my smart contract. As I understood, I am supposed to do that with recover_key function from crypto.h
I am using JavaScript with eosjs and eosjs-ecc for ...
1
vote
1
answer
77
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....
0
votes
0
answers
5
views
i transfered over 300$ using EOSNCONTRACT wallet to another wallet but the token failed to deliver
I transferred the eos token from one wallet to another using the eosncontract wallet address
Transaction id: 4458b2639b7cc5ffdde7785ed31d39a4910322baf2c220f0c0bc7d063e11e551
and ...
0
votes
0
answers
18
views
Error: assertion failure with message: Signing value already used
I try to do several actions in one transaction on Wax blockchain in Node.JS. All accounts share same active key.
Sometimes it works and everything is fine, but mostly I get an error: "assertion ...
0
votes
1
answer
182
views
What causes this error: Error: Required configuration or TAPOS fields are not present
What causes this error?
Error: Required configuration or TAPOS fields are not present
I am pushing transactions to a mainnet block producer and I am receiving this error intermittently.
Any help would ...
0
votes
1
answer
105
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
2
answers
369
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
1
answer
68
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 ...
0
votes
1
answer
66
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
1
answer
59
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
1
answer
67
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 ...
0
votes
1
answer
136
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
1
answer
39
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
1
answer
101
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
1
answer
62
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
2
answers
198
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
1
answer
73
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
1
answer
104
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
1
answer
74
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
1
answer
379
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
1
answer
126
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
1
answer
87
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
1
answer
348
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 ...
0
votes
1
answer
531
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
1
answer
62
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
1
answer
169
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://...