---
GroupId: "SWS-5"
Title: "Following Interface"
Description: "This document describes the standard interface for SmartWeave Contracts that represent a list for the tracking of unique blockchain addresses (i.e. "following")."
Topics:
- "specs"
- "standard"
- "sws"
- "smartweave"
- "following"
- "social"
Authors:
- "36Ar8VmyC7YS7JGaep9ca2ANjLABETTpxSeA7WOV45Y"
Forks: ""
---
Status: Draft
Version: 1.0.0
Author: Jim Toth ([email protected])
This document describes the standard interface for SmartWeave Contracts that represent a list for the tracking of unique blockchain addresses (i.e. "following").
While it is possible to design a protocol using simple data uploads to represent a unique list of blockchain addresses, at scale this begins to behave like the SmartWeave Protocol itself. Additionally, developers may wish to implement custom logic for following list contracts for different purposes, such as enabling chain-verified collaboration on these contracts.
The base specification describes a simple interface for adding, removing, and reading the represented list of blockchain addresses. Note that tracked addresses may be from any blockchain.
follow(address: string) => void
- Adds
address
to the list - SHOULD THROW if
address
is already found in the list
unfollow(address: string) => void
- Removes
address
from the list - SHOULD THROW if
address
is not found in the list
following() => string[]
- Returns a list of
address
strings currently tracked by the contract