steem-js icon indicating copy to clipboard operation
steem-js copied to clipboard

claim_account and create_claimed_account need a dedicated API

Open DoctorLai opened this issue 6 years ago • 0 comments

These two are very useful operations, and currently, there are no dedicated APIs for this. Users have to do the following or use the dsteem library.


const ac_key = "";
const user = "";

const keys = {active: ac_key};

const op = [
  "claim_account",
  {
    "fee": "0.000 STEEM",
    "creator": user,
    "extensions": []
  }
];

const tx = {
    extensions: [],
    operations: [
        op
    ]
};

steem.broadcast.send(tx, keys, (r) => {
    console.log(r);
});

DoctorLai avatar Apr 27 '20 15:04 DoctorLai