Initialize a BitClout node client
This will be the identity used by the client in requests and for signing transactions (optional).
It must be an instance of WebAccount (for sending requests on behalf of client-side users), SeedAccount (for server-side bots exclusively - NEVER ASK A USER FOR THEIR SEED PHRASE), ReadonlyIdentity (which is just a read-only public key and can't sign transactions), or any custom class that extends Identity.
You can also supply a 12-word seed phrase mnemonic if you want to automatically generate a SeedAccount. Or, pass a bitclout public key to automatically generate a ReadonlyIdentity.
Finally, if you pass null or undefined, the client will be created without an identity, but won't be able to access many endpoints.
URL of the BitClout node (without the final slash). This is bitclout.com by default, though it is recommended to host your own node.
Other configuration for the client
Node admin endpoints
TODO
Client's identity instance, used for generating and signing transactions, etc.
Make a call to the node API
Endpoint to call (nodeUrl/api/v0/ENDPOINT)
JSON body (or query params for GET request)
GET or POST; defualts to POST
the API response
Check if a transaction is currently in the mempool
This is the transaction hash hex, not the full transaction hex.
Follow a user.
The public key of the user to follow
The follow transaction result
Get state of BitClout, such as cost of profile creation and diamond tiers
Gets the current exchange rate
Checks the sync status of the node. Throws an error if check is not succesful.
ok: true
if the node is running and synced, otherwise throws an error.
Like a post
The hash hex of the post to like
The like transaction result
Send bitclout to another wallet
The BitClout public key OR username of the recipient
How many nanos of BitClout to send
The transaction result
Give diamonds to a post
The recipient of the diamonds (the creator of the post)
The post hash hex
How many diamonds? Use BitcloutClient.getAppState to get the diamond tiers.
The diamond transaction result
Signs and submits a transaction
The unsigned transaction hex
The API response
Submit a post
The transaction result
Submits a signed transaction using the /submit-transaction endpoint
The signed transaction hex
The API response
Transfers some creator coin to another wallet
The Bitclout public key of the coin's creator
The Bitclout public key or username of the coin recipient
The amount of nanos of coin to transfer
The transfer transaction result
Unfollow a user.
The public key of the user to unfollow
The follow transaction result
Unlike a post
The hash hex of the post to unlike
The like transaction result
Update profile
Object of fields to update
Information about the update transaction
Uploads an image to the BitClout node from current identity
Generated using TypeDoc
A BitClout node API client
Example: