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?
EOS.IO Stack Exchange is a question and answer site for users and developers of distributed applications built on top of the blockchain operating system, EOS.IO. It only takes a minute to sign up.
Sign up to join this communityIn 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?
This module is often used in conjunction with get_table_rows(). If this is the case, you no longer need to encode names when making requests to this method. Simply pass the key as part of the lower_bound
parameter.
For example you may make a request like this:
const resp = await rpc.get_table_rows({
json: true, // Get the response as json
code: 'eosio', // Contract that we target
scope: 'eosio', // Account that owns the data
table: 'deposits', // Table name
lower_bound: 'ACCOUNT_NAME_HERE',
limit: 1 // Maximum number of rows
});