I am creating accounnt using EOSjs(20.0.0-beta1).My account_creat function goes like this:
const createNewAccount = async (
account_name,
owner_publicKey,
active_publicKey
) => {
try {
const result = await api.transact (
{
actions: [
{
account: 'eosio',
name: 'newaccount',
authorization: [
{
actor: 'nirdxxxxxxxx',
permission: 'active',
},
],
data: {
creator: 'nirdxxxxxxxx',
name: account_name,
owner: {
threshold: 1,
keys: [
{
key: owner_publicKey,
weight: 1,
},
],
accounts: [],
waits: [],
},
active: {
threshold: 1,
keys: [
{
key: active_publicKey,
weight: 1,
},
],
accounts: [],
waits: [],
},
},
},
{
account: 'eosio',
name: 'buyrambytes',
authorization: [
{
actor: 'nirdxxxxxxxx',
permission: 'active',
},
],
data: {
payer: 'nirdxxxxxxxx',
receiver: account_name,
bytes: 8192,
},
},
{
account: 'eosio',
name: 'delegatebw',
authorization: [
{
actor: 'nirdxxxxxxxx',
permission: 'active',
},
],
data: {
from: 'nirdxxxxxxxx',
receiver: account_name,
stake_net_quantity: '1.0000 EOS',
stake_cpu_quantity: '1.0000 EOS',
transfer: false,
},
},
],
},
{
blocksBehind: 3,
expireSeconds: 30,
}
);
console.log ('transaction_id is : ', result.transaction_id);
return trans_id;
} catch (err) {
console.log ('error is : ___', err);
}
};
when I execute the code it gives error:
missing newaccount.newact (type=name)
at Object.serializeStruct [as serialize] (/home/nirdesh.kumar/node_modules/eosjs/dist/eosjs-serialize.js:566:27)
Is this error due to version(20.0.0-beta)? Did jungle net changed something because this code working 2 days ago?