API Reference
Interactive API docs located at: https://api.v2.walletchat.fun/docs/index.html
Last updated
Interactive API docs located at: https://api.v2.walletchat.fun/docs/index.html
Last updated
Full API reference is included here, subsections are broken out in the navigate pane. Current API version is: https://api.v2.walletchat.fun
TODO: need a creation API for communities, which includes specificied welcome message text, Twitter handle, page title
Wallet Address
Wallet Address
This used for UI purposes, checking if a user/wallet has bookmarked a community.
Wallet Address
NFT Contract Address
No body
Get all group chat items for a given wallet (useraddress) for a given NFT Contract Address (TODO: fix up var names)
NFT Address
FROM: wallet address
For group chat unread counts, currently the database stores a timestamp for each time a user enters a group chat. We though in the design it would be impractical to keep a read/unread count copy per user per message, but if this method doesn't proof to be fine grained enough, we could add a boolean relational table of read messgages per user.
Common Name Mapped to User/Community
Get Unread count for specifc NFT context given a wallet address and specific NFT
Wallet Address
NFT Contract Address
NFT ID
Get Each 1-on-1 Conversation, NFT and Community Chat For Display in Inbox
Wallet Address
Message Type - nft|community|dm|all
Get chat data between the given two addresses, TO and FROM and interchangable here
TO: Wallet Address
FROM: Wallet Address
Load only messages after this time
Get all specified NFT contract and ID items for a given wallet address
Wallet Address
NFT Contract Address
NFT ID
Get ALL NFT context items for a specifc NFT context convo between two wallets
NFT Contract Address
NFT ID
TO: Wallet Address
FROM: Wallet Address
API user could check this directly via any third party service like NFTPort, Moralis as well
NFT Contract Address
Wallet Address
As part of the login process, we need a user to sign a nonce genrated from the API, to prove the user in fact the owner of the wallet they are siging in from. JWT currently set to 24 hour validity (could change this upon request)
wallet address to get nonce to sign
No body
Every call the to API after this signin should present the JWT Bearer token for authenticated access. Upon request we can change the timeout to greater than 24 hours, or setup an addtional dedicated API for an agreed upon development and maintenance cost
Community Chat Data
For DMs, Chatitem data struct is used to store each message and associated info. REQUIRED: fromaddr, toaddr, message (see data struct section at bottom of page for more detailed info on each paramter) Other fields are generally filled in by the backed REST API and used as return parameters ID is auto generated and should never be used as input.
USE IF USING LIT ENCRYPTION
*** REQUIRED INPUT ***
AUTO-GENERATED (PRIMARY KEY)
*** REQUIRED INPUT ***
ONLY USED FOR NFT DM CONTEXT
ONLY USED FOR NFT DM CONTEXT
DEFAULT FALSE
AUTO-SET BY BACKED FOR RETURN VALUE
AUTO-SET BY REST API
USED FOR SORTING WHEN TIME FORMAT NEEDED
*** REQUIRED INPUT ***
Comments are meant to be public, someday having an up/downvote method for auto-moderation
Currently used for all messages outside of DMs
Give a common name (Kevin.eth, BillyTheKid, etc) to an Address
ADDRESS
DOMAIN
NAME
SITE USER SIGNED UP FROM
Currently this only update the message read/unread status. It could update the entire JSON struct upon request, however we only needed this functionality currently and it saved re-encryption of the data. TODO: TO/FROM address in the URL is not needed/not used anymore.
USE IF USING LIT ENCRYPTION
*** REQUIRED INPUT ***
AUTO-GENERATED (PRIMARY KEY)
*** REQUIRED INPUT ***
ONLY USED FOR NFT DM CONTEXT
ONLY USED FOR NFT DM CONTEXT
DEFAULT FALSE
AUTO-SET BY BACKED FOR RETURN VALUE
AUTO-SET BY REST API
USED FOR SORTING WHEN TIME FORMAT NEEDED
*** REQUIRED INPUT ***
Update settings, email address, daily notifications and per DM notifications
DOMAIN
Publickey string json:"publickey"
AUTO-GENERATED (PRIMARY KEY)
RECEIVE NOTIFICATION FOR EVERY DM RECEIVED (string value true/false)
RECEIVE DAILY NOTIFICATION SUMMARY EMAIL (string value true/false)
LATEST SITE WHERE NOTIFICATIONS EMAIL WAS ENTERED
USER CONFIRMED EMAIL OR NOT (string value true/false)
*** REQUIRED INPUT ***
Users will get an email when signing-up to verify email, to ensure we do not send spam
DOMAIN
Publickey string json:"publickey"
AUTO-GENERATED (PRIMARY KEY)
RECEIVE NOTIFICATION FOR EVERY DM RECEIVED (string value true/false)
RECEIVE DAILY NOTIFICATION SUMMARY EMAIL (string value true/false)
LATEST SITE WHERE NOTIFICATIONS EMAIL WAS ENTERED
USER CONFIRMED EMAIL OR NOT (string value true/false)
*** REQUIRED INPUT ***