The eCash Chat protocol adopts the following onchain hex prefixes:
To assist with web apps in rendering these actions accordingly, here are some example breakdowns:
Send a direct wallet to wallet message
OP_RETURN Hex
6a04636861742a6a7573742061206e6f726d616c2077616c6c657420746f2077616c6c6574206d657373616765f09f918d
Hex breakdown
- 6a (OP_RETURN)
- 04 (pushdata byte indicating 4 bytes / 8 chars)
- 63686174 (eCash Chat's protocol prefix)
- 2a (pushdata byte indicating 42 bytes / 84 chars)
- 6a7573742061206e6f726d616c2077616c6c657420746f2077616c6c6574206d657373616765f09f918d (the utf8 message)
Send an encrypted direct wallet to wallet message
OP_RETURN Hex
6a04636861740470617373203165376334343363336363346365633338326562343733303839366238313433
Hex breakdown
- 6a (OP_RETURN)
- 04 (pushdata byte indicating 4 bytes / 8 chars)
- 63686174 (eCash Chat's protocol prefix)
- 04 (pushdata byte indicating 4 bytes / 8 chars)
- 70617373 (eCash Chat's encryption prefix)
- 20 (pushdata byte indicating 32 bytes / 64 chars)
- 3165376334343363336363346365633338326562343733303839366238313433 (the encrypted utf8 message)
Post a message to townhall
OP_RETURN Hex
6a046368617404706f737423636865636b2074686973206f7574205b79745d74416c367350524651676b5b2f79745d
Hex breakdown
- 6a (OP_RETURN)
- 04 (pushdata byte indicating 4 bytes / 8 chars)
- 63686174 (eCash Chat's protocol prefix)
- 04 (pushdata byte indicating 4 bytes / 8 chars)
- 706f7374 (eCash Chat's townhall post prefix)
- 23 (pushdata byte indicating 35 bytes / 70 chars)
- 636865636b2074686973206f7574205b79745d74416c367350524651676b5b2f79745d (the post content)
Post a reply to an existing message on townhall
OP_RETURN Hex
6a046368617404686173682087928ef3d1c89be1a0e961b45a27680d96258b7b3a05d36115381739b335df943754686973206973206d79207265706c7920746f2074686520654361736820696e74726f20766964656f202d20636f6f6c20737475666621
Hex breakdown
- 6a (OP_RETURN)
- 04 (pushdata byte indicating 4 bytes / 8 chars)
- 63686174 (eCash Chat's protocol prefix)
- 04 (pushdata byte indicating 4 bytes / 8 chars)
- 68617368 (eCash Chat's townhall reply post prefix)
- 20 (pushdata byte indicating 32 bytes / 64 chars)
- 87928ef3d1c89be1a0e961b45a27680d96258b7b3a05d36115381739b335df94 (txid of original post)
- 37 (pushdata byte indicating 55 bytes / 110 chars)
- 54686973206973206d79207265706c7920746f2074686520654361736820696e74726f20766964656f202d20636f6f6c20737475666621 (the reply message)
First, run the development server:
npm install
npm run dev
Open http://localhost:3000 with your browser.
Runs the app in development mode.
The page will reload if you make edits. You will also see any lint errors in the console.
npm run test
The easiest way to deploy to the Vercel Platform.
Check out Next.js deployment documentation for more details.
In the project directory, run:
npm run build
Builds the app for production to the build
folder.