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);
});