node-js-sample-client/nestsample.js
//add xp of this achievement to user's account and update level
add xp of this achievement to user's account and update level
add xp of this achievement to user ' s account and update level
async function issue_achievement() {
  try {
    await globals.WAX.transaction({
      actions: [
        {
          account: globals.NEST_CONTRACT,
          name: "achievearn",
          authorization: [
            {
              actor: globals.WAX_ACCOUNT,
              permission: "active",
            },
          ],
          data: {
            owner: globals.WAX_ACCOUNT, 
            username: "", 
            achieveid: 0, 
          },
        },
      ],
    });
  } catch (error) {
    console.log(error);
  }
}
async function issue_achievement ( ) { try { await globals . WAX . transaction ( { actions : [ { account : globals . NEST_CONTRACT , name : "achievearn" , authorization : [ { actor : globals . WAX_ACCOUNT , permission : "active" , } , ] , data : { owner : globals . WAX_ACCOUNT , username : "" , achieveid : 0 , } , } , ] , } ) ; } catch ( error ) { console . log ( error ) ; } }
add xp of this achievement to user's account and update level
add xp of this achievement to user ' s account and update level
//Your WAX account //WAX account of user to earn achievement //Achievement's id on TABLE achievements