ScratchChat is a demo app that uses Scratchpads via the dweb REST API.
Messaging is free once ScratchChat has been initialised, because it uses Autonomi Scratchpads to share messages. You will though need a funded wallet to pay to create them in the first place.
So to get chatting:
- Setup a Wallet
- Install dweb
- Use ScratchChat
- Find People to chat with
Set up a Wallet
-
Check if you have a wallet using the
ant-cli
(install withcargo install ant-cli
if you don’t have it yet):ant wallet balance
-
If you don’t have a wallet yet, create it with
ant wallet create
or import an existing wallet for which you already have the private key, withant wallet import
-
If you don’t have funds, head over to the Autonomi Community Faucet
-
You will need to share the secret key of your wallet with
dweb
, so get your secret key with:ant wallet export
-
On Linux and MacOS you can either put
export SECRET_KEY=<PRIVATE-KEY>
in your .bashrc and then open a new terminal, or pass it when you start the dweb server with:export SECRET_KEY=<PRIVATE-KEY> dweb serve
Install dweb
If you don’t have Rust you will need to install that first - see Get Rust.
If you have Rust installed:
cargo install dweb-cli --locked
Note: when installing dweb on Ubuntu, you may encounter missing openssl libraries. Do a sudo apt update
and then sudo apt install librust-openssl-dev
, and finally restart the dweb install.
Once you have dweb
installed you’ll be able to find other websites and apps in the awesome index with dweb open awesome
.
Use ScratchChat
Once you have a funded wallet and have installed dweb-cli
, start the dweb server:
dweb serve
In a different terminal, open ScratchChat:
dweb open scratchchat
When ScratchChat loads for the first time, it creates two Scratchpads to store your settings and share your messages, and then shows your address in the UI.
You need to add someone’s ScratchChat address as a ‘follow’ to see their messages, and they need to add your address to see yours. So post your address in this thread if you want others to follow and chat with you.
ScratchChat works more like a social network such as Mastodon or Twitter, but with a chat style interface.
Messaging is free!
Although you need a wallet with a tiny amount of ARB-ETH and ANT to pay for the creation of two Scratchpads (current cost ~2 cents), that’s it. And thanks to @ambled who made the Autonomi Community Faucet and some generous donors, you can get enough tokens to do all that for free. (See Set up a Wallet).
Scratchpads cost more to create than a regular ‘chunk’ stored on Autonomi, and this pays for them to be updated for free. But they are still very cheap (about 2 cents right now, which seems appropriate ).
The Autonomi Community Faucet can be used to start your journey by issuing your initial funds. You should receive enough funds to create your Scratchpads and upload a small image to use as your avatar.
Find People to chat with
Share your address in a reply and I’ll add it to the list below:
happybeing a83c68c0d90c592037b769bb5cfaa7f669db39a7c23f02b0b52abf3bd50293e93b790383155de26b22fab9b15d0cdc0b
ambled / xd7 a344fca57238f1f198ed72ca3dd21809b00be0365c95599b16eb7a7c11069c94ebcae690169553c870c38aa369dcc5cc
Toivo 8ca210b850277d1a7e875e8f39af625872e4f2859e811a87942330f062ec0eb6f06a0fae322209c2fefbb9c418600912
southside 8ce56fcf2c4772f5265f21a7778b8abe0d0dcf7e93028adc4c5b9ea1ba39bb8d7fcf187764dbb98821900f8314057a6e
If you want to create more personas and chat with their unique ScratchChat address you can do this by loading ScratchChat and then adding the name of a persona to the URL in the address bar. Something like this:
http://127.0.0.1:34375/?person=mark2
Add an Avatar
You’ll need the address of a small image file to paste into ‘My Settings’ (don’t forget to ‘Save Changes’).
If you want to upload an image to use as an avatar you can do this as follows:
ant file upload -p --max-fee-per-gas 10000000 <filename>
The faucet should have provided enough funds to do this too.