AGENT SKILL

sage-offers

Sage offer operations for peer-to-peer trading. Create offers, view, accept, combine, import, cancel offers.

License 许可
MIT
最近更新
2026-08-23
Stars
★ 1
Forks
0

01 前言 Front Matter

name
sage-offers
description
Sage offer operations for peer-to-peer trading. Create offers, view, accept, combine, import, cancel offers.

03 SKILL.md 正文

Sage Offers

Peer-to-peer offer trading system.

Endpoints

Create Offer

{
  "requested_assets": [
    {"asset_id": null, "amount": "1000000000000"}
  ],
  "offered_assets": [
    {"asset_id": "a628c1c2...", "amount": "1000"}
  ],
  "fee": "100000000",
  "receive_address": null,
  "expires_at_second": null,
  "auto_import": true
}
  • asset_id: null = XCH
  • Returns {"offer": "offer1...", "offer_id": "..."}

Accept Offer

{
  "offer": "offer1...",
  "fee": "100000000",
  "auto_submit": true
}

View Offer (without accepting)

{
  "offer": "offer1..."
}

Returns offer summary and status.

Query Offers

Endpoint Payload Description
get_offers {} List all offers
get_offer {"offer_id": "..."} Get specific offer
get_offers_for_asset {"asset_id": "..."} Filter by asset
import_offer {"offer": "offer1..."} Import external offer

Cancel/Delete

Endpoint Payload Description
delete_offer {"offer_id": "..."} Delete local (not on-chain)
cancel_offer {"offer_id": "...", "fee": "...", "auto_submit": true} Cancel on-chain
cancel_offers {"offer_ids": [...], "fee": "...", "auto_submit": true} Bulk cancel

Combine Offers

Merge multiple compatible offers:

{
  "offers": ["offer1...", "offer1..."]
}

Offer Amount Structure

{
  "asset_id": "a628c1c2...",
  "hidden_puzzle_hash": null,
  "amount": "1000"
}

Offer Record Structure

{
  "offer_id": "...",
  "offer": "offer1...",
  "status": "pending",
  "requested": [...],
  "offered": [...],
  "expires_at_second": null
}

Status values: "pending", "completed", "cancelled", "expired"

Examples

# Create offer: 1 XCH for 1000 SBX
sage_rpc make_offer '{
  "requested_assets": [{"asset_id": null, "amount": "1000000000000"}],
  "offered_assets": [{"asset_id": "a628c1c2...", "amount": "1000"}],
  "fee": "100000000",
  "auto_import": true
}'

# View offer
sage_rpc view_offer '{"offer": "offer1abc..."}'

# Accept offer
sage_rpc take_offer '{
  "offer": "offer1abc...",
  "fee": "100000000",
  "auto_submit": true
}'

# Cancel offer
sage_rpc cancel_offer '{
  "offer_id": "abc123",
  "fee": "100000000",
  "auto_submit": true
}'

Notes

  • Offers are bech32-encoded strings starting with offer1
  • delete_offer only removes from local database
  • cancel_offer spends offered coins on-chain to invalidate
  • Combine offers for complex multi-party trades

04 同仓库更多 Skills

kbarbel640-del
kbarbel640-del/skills

crowd-prompting

A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.

★ 1
kbarbel640-del
kbarbel640-del/skills

dilemm-ai

Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).

★ 1
kbarbel640-del
kbarbel640-del/skills

arxiv-paper-reviews

Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.

★ 1
kbarbel640-del
kbarbel640-del/skills

arxiv-paper-reviews

Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.

★ 1
kbarbel640-del
kbarbel640-del/skills

git-summary

Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.

★ 1
kbarbel640-del
kbarbel640-del/skills

agent-constitution

Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.

★ 1