#601

Globales Ranking · von 601 Skills

bsocial AI Agent Skill

Quellcode ansehen: b-open-io/bsv-skills

Critical

Installation

npx skills add b-open-io/bsv-skills --skill bsocial

18

Installationen

BSocial

Complete on-chain social protocol for BSV blockchain. Posts, likes, follows, messages, reposts, and friend requests using BitcoinSchema.org standards.

When to Use

  • Create social content (posts, replies, reposts)
  • Social actions (likes, follows, friend requests)
  • Real-time messaging (channels, direct messages)
  • Query social data by address or transaction

Create via CLI Scripts

Build and broadcast social transactions using raw WIF keys and the @1sat/templates BSocial class (included in this plugin).

Post

bun run skills/bsocial/scripts/create-post.ts <wif> "Post content" [options]

# Options:
#   --channel <name>    Post to a channel
#   --url <url>         Associate with URL
#   --tags <t1,t2>      Comma-separated tags
#   --dry-run           Build tx without broadcasting

Reply

bun run skills/bsocial/scripts/create-reply.ts <wif> <txid> "Reply content" [--tags <t1,t2>]

Like

bun run skills/bsocial/scripts/create-like.ts <wif> <txid>

Follow

bun run skills/bsocial/scripts/create-follow.ts <wif> <bapId>

Repost

bun run skills/bsocial/scripts/create-repost.ts <wif> <txid> [--context <type> --value <val>]

Message

bun run skills/bsocial/scripts/create-message.ts <wif> "Message" [options]

# Options:
#   --channel <name>    Send to channel
#   --to <bapId>        Direct message to user

Friend

bun run skills/bsocial/scripts/create-friend.ts <wif> <bapId>

Read Operations

Query social data from the BMAP API.

Posts

bun run skills/bsocial/scripts/read-posts.ts <address> [--limit 20] [--json]

Likes

bun run skills/bsocial/scripts/read-likes.ts --address <addr>
bun run skills/bsocial/scripts/read-likes.ts --txid <txid>

Follows

bun run skills/bsocial/scripts/read-follows.ts <address> [--limit 100] [--json]

Messages

bun run skills/bsocial/scripts/read-messages.ts --channel <name>
bun run skills/bsocial/scripts/read-messages.ts --address <addr>

Friends

bun run skills/bsocial/scripts/read-friends.ts <address> [--json]

Using @1sat/actions (via 1sat plugin)

For BRC-100 wallet users, @1sat/actions provides high-level social actions that handle B:// + MAP + AIP construction and wallet signing automatically. This requires the 1sat plugin and the @1sat/actions package — it is not part of bsv-skills.

See the 1sat:transaction-building skill for details.

import { createSocialPost, createContext } from '@1sat/actions'

const ctx = createContext(wallet)

const result = await createSocialPost.execute(ctx, {
  app: 'my-app',           // MAP attribution — identifies the calling application
  content: 'Hello BSV!',
  contentType: 'text/plain', // or 'text/markdown'
  tags: ['intro', 'bsv'],   // optional
})

// result: { txid, rawtx, error }

The action:

  • Signs with the wallet's BAP identity key via AIP (using WalletSigner from @1sat/templates)
  • Stores the 0-sat OP_RETURN output in the bsocial basket for post history
  • Tags outputs with MAP fields (app:my-app, type:post, tag:intro, etc.) for filtered queries

Query post history: wallet.listOutputs({ basket: 'bsocial' })

Protocol Stack

[B Protocol] | [MAP Protocol] | [AIP Protocol]
   content       metadata         signature
  • B Protocol: Binary content storage (text, media)
  • MAP Protocol: Metadata key-value pairs (app, type, context)
  • AIP Protocol: Author signature for verification

Context Types

Context Use Case
tx Reply/like a transaction
channel Post/message to named channel
bapID Target specific identity
provider Associate with external URL or provider
videoId Reference a video
geohash Geolocation context
btcTx Reference a BTC transaction
ethTx Reference an ETH transaction

Dependencies

  • @bsv/sdk - Transaction building
  • @1sat/templates - BSocial protocol templates (Signer abstraction, BSocial class)
  • @1sat/actions - BRC-100 action system (external — requires the 1sat plugin)

API

Base URL: https://bmap-api-production.up.railway.app

REST Endpoints

Endpoint Description
/social/post/bap/{bapId} Posts by BAP ID
/social/feed/{bapId} Feed for BAP ID
/social/post/{txid}/like Likes for a post
/social/bap/{bapId}/like Likes by user
/social/friend/{bapId} Friends for BAP ID
/social/@/{bapId}/messages Messages for user
/social/channels/{channelId}/messages Channel messages

Query API (fallback)

  • Query: /q/{collection}/{base64Query}
  • SSE: /s/{collection}/{base64Query}

Ingest

  • POST /ingest with { rawTx: tx.toHex() }

Friend Encryption

Friend requests use Type42 key derivation with BRC-43 invoice numbers (2-friend-{sha256(friendBapId)}) via the BRC-100 wallet.

import { Hash, Utils } from "@bsv/sdk";
const { toHex, toArray } = Utils;

const keyID = toHex(Hash.sha256(toArray(friendBapId, "utf8")));

// Get encryption pubkey for friend request
const { publicKey } = await wallet.getPublicKey({
  protocolID: [2, "friend"],
  keyID,
  counterparty: "self",
});

// Encrypt private message for friend
const { ciphertext } = await wallet.encrypt({
  protocolID: [2, "friend"],
  keyID,
  counterparty: friendIdentityKey,
  plaintext: toArray("secret message", "utf8"),
});

// Decrypt message from friend
const { plaintext } = await wallet.decrypt({
  protocolID: [2, "friend"],
  keyID,
  counterparty: friendIdentityKey,
  ciphertext,
});

See Also

Installationen

Installationen 18
Globales Ranking #601 von 601

Sicherheitsprüfung

ath Safe
socket Critical
Warnungen: 2 Bewertung: 77
snyk High
EU EU-Hosted Inference API

Power your AI Agents with the best open-source models.

Drop-in OpenAI-compatible API. No data leaves Europe.

Explore Inference API

GLM

GLM 5

$1.00 / $3.20

per M tokens

Kimi

Kimi K2.5

$0.60 / $2.80

per M tokens

MiniMax

MiniMax M2.5

$0.30 / $1.20

per M tokens

Qwen

Qwen3.5 122B

$0.40 / $3.00

per M tokens

So verwenden Sie diesen Skill

1

Install bsocial by running npx skills add b-open-io/bsv-skills --skill bsocial in your project directory. Führen Sie den obigen Installationsbefehl in Ihrem Projektverzeichnis aus. Die Skill-Datei wird von GitHub heruntergeladen und in Ihrem Projekt platziert.

2

Keine Konfiguration erforderlich. Ihr KI-Agent (Claude Code, Cursor, Windsurf usw.) erkennt installierte Skills automatisch und nutzt sie als Kontext bei der Code-Generierung.

3

Der Skill verbessert das Verständnis Ihres Agenten für bsocial, und hilft ihm, etablierte Muster zu befolgen, häufige Fehler zu vermeiden und produktionsreifen Code zu erzeugen.

Was Sie erhalten

Skills sind Klartext-Anweisungsdateien — kein ausführbarer Code. Sie kodieren Expertenwissen über Frameworks, Sprachen oder Tools, das Ihr KI-Agent liest, um seine Ausgabe zu verbessern. Das bedeutet null Laufzeit-Overhead, keine Abhängigkeitskonflikte und volle Transparenz: Sie können jede Anweisung vor der Installation lesen und prüfen.

Kompatibilität

Dieser Skill funktioniert mit jedem KI-Coding-Agenten, der das skills.sh-Format unterstützt, einschließlich Claude Code (Anthropic), Cursor, Windsurf, Cline, Aider und anderen Tools, die projektbezogene Kontextdateien lesen. Skills sind auf Transportebene framework-agnostisch — der Inhalt bestimmt, für welche Sprache oder welches Framework er gilt.

Data sourced from the skills.sh registry and GitHub. Install counts and security audits are updated regularly.

EU Made in Europe

Chat with 100+ AI Models in one App.

Use Claude, ChatGPT, Gemini alongside with EU-Hosted Models like Deepseek, GLM-5, Kimi K2.5 and many more.

App herunterladen:

Kundensupport