CREATED BY MICHAEL STRONG ON 4/9/2019
click above to view developer comments to this article

DOCUMENTATION - MESSAGE API

TRANSACTION SPECIFICATIONS

The quickest way to get started is by using the console project available in the Downloads category, there you will find both a compiled executable and VS solution implementing all methods in the API. Please refer to details below if wishing to utilize your own resource for building and transmitting messages or articles. Before posting articles, please use the following page to test your content and ensure that it displays as intended.
TEST ARTICLE

|> TRANSACTION OVERVIEW
All posted data should be transmitted as a single, variable length hex string after combining hex values representing the Transaction, LinkedTransaction, PublicKey, Signature and Message. The endpoint will break it down as follows:
transaction: position 0, length 16
linked Transaction: position 16, length 16
public Key: position 32, length 20
signature: position 52, length 65
message: position 117, length (total length - 117)

|> TRANSACTION BUILD STEPS
1. Message. May be a few words commenting on existing post or new article as json object.
2. Signature. Sign (ECDSA) the message with your private key, use the compact message signing method which is standard in bitcoin and results in 65 bytes...
3. Public Key. Get RIPEMD hash type for public key.
4. TxnID. Result of hex encoding above values then performing MD5 hash of: 3 + 2 + 1
5. LinkedTxn. The TxnID of existing message or article you are responding to.
{00000000000000000000000000000000 if not a response}
6. Transaction: (data to post) result of 4 + 5 + 3 + 2 + 1

|> POSTING THE TRANSACTION
1. Endpoint Base URI
https://bitfi.dev/NoxMessages/API/PostMsg.aspx
2. URI Parameters
TxnType {0 for message,1 for article,2 for download type,3 for status update}
ArticleCategory, ArticleTitle, ArticleSubTitle, ArticleDescription, ArticleTag
{applicable if TxnType is 1. Use 0 for default, or 1 for featured}
{example https://bitfi.dev/NoxMessages/API/PostMsg.aspx?TxnType=0}
3. Method. Post - The posted data is result of build steps above without any additional values.
4. Response. /success/ and /error_message/ form json response object.
Example response when posting empty message:
{"success":false,"error_message":"Message is empty..."}