Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bright-doves-respond.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@geoprotocol/geo-sdk": minor
---

Add the canonical `geo.responses` namespace for curation, stance, and veracity actions while keeping `geo.entityVotes` as a deprecated compatibility API.
39 changes: 34 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -864,24 +864,53 @@ await walletClient.sendTransaction({
});
```

### `geo.entityVotes`
### `geo.responses`

Upvote, downvote, or withdraw a vote on an entity:
Respond to an entity on three independent axes:

- Curation: `upvote`, `downvote`, and `unvote`
- Stance: `agree`, `disagree`, and `unagree`
- Veracity: `verify`, `dispute`, and `unverify`

Each clear method removes only its matching response kind. For example,
`unverify` does not remove an upvote or agreement from the same user.

Create curation response calldata:

```ts
const upvote = geo.entityVotes.upvote({
const upvote = geo.responses.upvote({
authorSpaceId,
spaceId,
entityId,
});

const downvote = geo.entityVotes.downvote({
const downvote = geo.responses.downvote({
authorSpaceId,
spaceId,
entityId,
});

const withdraw = geo.entityVotes.withdraw({
const unvote = geo.responses.unvote({
authorSpaceId,
spaceId,
entityId,
});
```

Create stance response calldata:

```ts
const agree = geo.responses.agree({ authorSpaceId, spaceId, entityId });
const disagree = geo.responses.disagree({ authorSpaceId, spaceId, entityId });
const unagree = geo.responses.unagree({ authorSpaceId, spaceId, entityId });
```

Create veracity response calldata:

```ts
const verify = geo.responses.verify({ authorSpaceId, spaceId, entityId });
const dispute = geo.responses.dispute({ authorSpaceId, spaceId, entityId });
const unverify = geo.responses.unverify({
authorSpaceId,
spaceId,
entityId,
Expand Down
Loading
Loading