How to programmatically register a name in Blockstack ID?

How can I programmatically register a name in Blockstack ID?

What tooling are you using? cli ? or lib?

with CLI I’ve been able to reg a name and also set its zonefile in a single command, here is an example

$ blockstack -y -p YOURWALLETPASSWORD register samplename.id /home/temp/temp_zonefile.json

obviously its starts with the blockstack command, then the -y parameter is to force yes, regardless of price, then the -p parameter to include password, followed by your actual wallets password (YOURWALLETPASSWORD) then the register command, followed by the path of the temp_zonefile.json

The formatting of the zonefile is seemingly subjective, but if your intention is the create a profile, then follow the profile standard in formatting.

Hope this helps a bit, but realize this is probably the non-ideal way to do this since you will likely want to use the lib :stuck_out_tongue:

Yes, I need some form of Blackstack API exposed by some service on the Internet or exposed by some client library (for NodeJS in my case). CLI won’t work for me. Any other ideas?