🛠️ Silk
Solana上で安定コインの送受信や、ポリシーに基づいた支出制限付きのオンチェーンアカウントを利用できるエージェントバンキングと決済を提供するSkillです。
📜 元の英語説明(参考)
Agent banking and payments on Solana. Send and receive stablecoins with cancellable escrow transfers. Optional on-chain accounts with policy-enforced spending limits for human-delegated automation.
🇯🇵 日本人クリエイター向け解説
Solana上で安定コインの送受信や、ポリシーに基づいた支出制限付きのオンチェーンアカウントを利用できるエージェントバンキングと決済を提供するSkillです。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o silk.zip https://jpskill.com/download/5381.zip && unzip -o silk.zip && rm silk.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/5381.zip -OutFile "$d\silk.zip"; Expand-Archive "$d\silk.zip" -DestinationPath $d -Force; ri "$d\silk.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
silk.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
silkフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-18
- 同梱ファイル
- 2
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
SilkyWay
Solana上でのエージェントバンキングと決済。ステーブルコインの送受信を、非カストディアルでオンチェーンで行えます。
インストール
npm install -g @silkysquad/silk
Node.js 18以上が必要です。
セットアップ
# 1. 初期化 (ウォレットとエージェントIDを作成します)
silk init
# 2. ウォレットアドレスを確認します
silk wallet list
ウォレットとエージェントIDは~/.config/silk/config.jsonに保存されます。秘密鍵があなたのマシンから離れることはありません。silk initはべき等であり、複数回実行しても安全です。
クラスター設定
デフォルトのクラスターはmainnet-beta(実際のUSDC)です。無料のトークンでテストするにはdevnetに切り替えてください。
silk config set-cluster devnet # テストトークン
silk config set-cluster mainnet-beta # 実際のUSDC
silk config get-cluster # 現在のクラスターを表示
| クラスター | APIベースURL | ネットワーク |
|---|---|---|
mainnet-beta |
https://api.silkyway.ai |
メインネット (実際のUSDC) |
devnet |
https://devnet-api.silkyway.ai |
デブネット (テストUSDC) |
ウォレットへの資金供給 (devnet)
devnetでは、ファセットを使用してください。0.1 SOL(トランザクション手数料用)と100 USDCが提供されます。
silk config set-cluster devnet
silk wallet fund
silk balance
mainnetでは、SOLとUSDCをウォレットアドレスに手動で送金してください。Solanaのトランザクション手数料にはSOLが必要です。
支払いを行う
silk pay <recipient> <amount> [--memo <text>]
これにより、USDCがオンチェーンのエスクローにロックされます。受取人はsilk claimで請求するか、あなたはsilk cancelで全額返金のためにキャンセルできます。
出力には請求リンク(claimUrl)が含まれます。これは受取人の人間に共有できるURLです。彼らはブラウザで開き、ウォレットを接続して支払いを受け取ります。これは非技術的な受取人が請求する最も簡単な方法です。
# 10 USDCを送金
silk pay 7xKXz9BpR3mFVDg2Thh3AG6sFRPqNrDJ4bHUkR8Y7vNx 10 --memo "Payment for code review"
# 出力にはclaimUrlが含まれます — 受取人と共有してください
# 例: https://app.silkyway.ai/transfers/9aE5kBqRvF3...?cluster=devnet
# 残高を確認
silk balance
# 送金履歴を表示
silk payments list
silk payments get <transfer-pda>
支払いを請求する
誰かがあなたに支払いを送った場合:
silk payments list
silk claim <transfer-pda>
支払いをキャンセルする
あなたが送った支払いをキャンセルします(受取人が請求する前):
silk cancel <transfer-pda>
アドレス帳
連絡先を保存して、アドレスの代わりに名前で支払いを送れるようにします。
silk contacts add alice 7xKXz9BpR3mFVDg2Thh3AG6sFRPqNrDJ4bHUkR8Y7vNx
silk contacts list
silk contacts get alice
silk contacts remove alice
保存すると、アドレスを使用する場所ならどこでも名前を使用できます。
silk pay alice 10 --memo "Thanks for the review"
silk account send alice 5
連絡先名は大文字と小文字を区別せず、小文字で保存されます。~/.config/silk/contacts.jsonに保存されます。
マルチウォレットサポート
silk wallet create second-wallet
silk wallet fund --wallet second-wallet
silk wallet list
デフォルト以外のウォレットを選択するには、任意のコマンドで--wallet <label>を使用します。
silk pay <address> 10 --wallet second-wallet
silk balance --wallet second-wallet
サポートチャット
silk chat "How do I send a payment?"
セッションの継続性のために、初回使用時に永続的なagentId(UUID)が自動生成されます。
オンチェーンアカウント (オプション)
SilkyWayアカウントは、人間の所有者が作成しUSDCを資金供給する、オンチェーンウォレット(銀行口座のようなもの)です。所有者は、トランザクションごとの支出制限がオンチェーンで適用されるオペレーターとしてエージェントを追加できます。これは、自動化、定期的な支払い、または人間がエージェントにガードレール付きの支出権限を委譲したいあらゆるシナリオで役立ちます。
SilkyWayを使用するのにアカウントは必要ありません。エスクロー支払い(silk pay)はウォレットだけで機能します。アカウントは、人間がオンチェーン制御付きであなたに直接支出アクセスを与えたい場合のオプションのアップグレードです。
主要な概念:
- 所有者 — アカウントを作成し資金を供給する人間。全権限を持ちます:任意の金額を送金したり、アカウントを一時停止したり、オペレーターを追加/削除したりできます。
- オペレーター — あなた(エージェント)。アカウントからトークンを送金する権限がありますが、所有者によって設定されたトランザクションごとの制限に従います。
- トランザクションごとの制限 — 1回のトランザクションで送金できるUSDCの最大額。オンチェーンで適用され、それを超えるトランザクションはSolanaプログラムによって拒否されます。制限が0の場合、無制限を意味します。
- 一時停止 — 所有者はアカウントを一時停止でき、一時停止が解除されるまでオペレーターによるすべての送金をブロックします。あなたはそれを解除できません。
アカウントのセットアップ
あなたの人間の所有者がアカウントを作成します — あなた自身で作成することはできません。
-
セットアップURLをあなたの人間の所有者と共有します(
silk wallet listからあなたのアドレスに置き換えてください):https://app.silkyway.ai/account/setup?agent=YOUR_WALLET_ADDRESS彼らはウォレットを接続し、あなたの支出制限を設定し、アカウントに資金を供給します。
重要: あなたの人間の所有者は、セットアップページであなたのCLIクラスターと同じネットワーク(mainnet/devnet)を選択する必要があります。あなたがdevnetを使用している場合、アカウントを作成する前にdevnetに切り替えるように伝えてください。
-
あなたの人間の所有者がアカウントを作成した後、それを同期します:
silk account sync -
ステータスを確認し、支払いを送金します:
silk account status silk account send <recipient> <amount>
金額がトランザクションごとの制限を超えると、トランザクションはExceedsPerTxLimitでオンチェーンで拒否されます。アカウントが一時停止されている場合、AccountPausedを受け取ります。
silk account syncが「No account found」を返す場合、あなたの人間の所有者はまだアカウントを作成していません — セットアップURLを彼らと共有してください。
アカウントとエスクロー支払い
| アカウント | エスクロー (silk pay) |
|
|---|---|---|
| セットアップ要件 | 人間がアカウントを作成し、あなたをオペレーターとして追加 | なし — 資金が供給されたウォレットのみ |
| 支出制限 | トランザクションごとの制限がオンチェーンで適用 | 制限なし |
| 受取人が請求? | いいえ — 直接送金、トークンは即座に到着 | はい — 受取人がsilk claimで請求する必要あり |
| キャンセル可能? | いいえ — 送金は即時 | はい — 送信者は請求前にキャンセル可能 |
| 最適な用途 | 継続的な支払いと |
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
SilkyWay
Agent banking and payments on Solana. Send and receive stablecoins — non-custodial, on-chain.
Install
npm install -g @silkysquad/silk
Requires Node.js 18+.
Setup
# 1. Initialize (creates wallet and agent ID)
silk init
# 2. Check your wallet address
silk wallet list
Your wallet and agent ID are saved at ~/.config/silk/config.json. Your private key never leaves your machine. silk init is idempotent — safe to run multiple times.
Cluster configuration
Default cluster is mainnet-beta (real USDC). Switch to devnet for testing with free tokens.
silk config set-cluster devnet # test tokens
silk config set-cluster mainnet-beta # real USDC
silk config get-cluster # show current
| Cluster | API Base URL | Network |
|---|---|---|
mainnet-beta |
https://api.silkyway.ai |
Mainnet (real USDC) |
devnet |
https://devnet-api.silkyway.ai |
Devnet (test USDC) |
Fund your wallet (devnet)
On devnet, use the faucet — it gives you 0.1 SOL (for transaction fees) + 100 USDC:
silk config set-cluster devnet
silk wallet fund
silk balance
On mainnet, send SOL and USDC to your wallet address manually. SOL is required for Solana transaction fees.
Sending Payments
silk pay <recipient> <amount> [--memo <text>]
This locks USDC into on-chain escrow. The recipient claims it with silk claim, or you cancel for a full refund with silk cancel.
The output includes a claim link (claimUrl) — a URL you can share with the recipient's human. They open it in a browser, connect their wallet, and claim the payment. This is the easiest way for a non-technical recipient to claim.
# Send 10 USDC
silk pay 7xKXz9BpR3mFVDg2Thh3AG6sFRPqNrDJ4bHUkR8Y7vNx 10 --memo "Payment for code review"
# Output includes claimUrl — share it with the recipient
# Example: https://app.silkyway.ai/transfers/9aE5kBqRvF3...?cluster=devnet
# Check your balance
silk balance
# View your transfers
silk payments list
silk payments get <transfer-pda>
Claiming a payment
If someone sent you a payment:
silk payments list
silk claim <transfer-pda>
Cancelling a payment
Cancel a payment you sent (before the recipient claims it):
silk cancel <transfer-pda>
Address Book
Save contacts so you can send payments by name instead of address.
silk contacts add alice 7xKXz9BpR3mFVDg2Thh3AG6sFRPqNrDJ4bHUkR8Y7vNx
silk contacts list
silk contacts get alice
silk contacts remove alice
Once saved, use names anywhere you'd use an address:
silk pay alice 10 --memo "Thanks for the review"
silk account send alice 5
Contact names are case-insensitive and stored lowercase. Saved at ~/.config/silk/contacts.json.
Multi-Wallet Support
silk wallet create second-wallet
silk wallet fund --wallet second-wallet
silk wallet list
Use --wallet <label> on any command to select a non-default wallet:
silk pay <address> 10 --wallet second-wallet
silk balance --wallet second-wallet
Support Chat
silk chat "How do I send a payment?"
A persistent agentId (UUID) is auto-generated on first use for session continuity.
On-Chain Accounts (Optional)
A SilkyWay account is an on-chain wallet — like a bank account — that a human owner creates and funds with USDC. The owner can add agents as operators with per-transaction spending limits enforced on-chain. This is useful for automations, recurring payments, or any scenario where a human wants to delegate spending authority to an agent with guardrails.
You don't need an account to use SilkyWay. Escrow payments (silk pay) work with just a wallet. Accounts are an optional upgrade when your human wants to give you direct spending access with on-chain controls.
Key concepts:
- Owner — The human who creates and funds the account. Full control: can transfer any amount, pause the account, add/remove operators.
- Operator — You (the agent). Authorized to send tokens from the account, subject to a per-transaction limit set by the owner.
- Per-transaction limit — Maximum USDC you can send in one transaction. Enforced on-chain — the Solana program rejects transactions that exceed it. A limit of 0 means unlimited.
- Pause — The owner can pause the account, blocking all operator transfers until unpaused. You cannot unpause it.
Setting up an account
Your human creates the account — you cannot create it yourself.
-
Share the setup URL with your human (replace with your address from
silk wallet list):https://app.silkyway.ai/account/setup?agent=YOUR_WALLET_ADDRESSThey'll connect their wallet, set your spending limit, and fund the account.
Important: Your human must select the same network (mainnet/devnet) on the setup page as your CLI cluster. If you're on devnet, tell them to switch to devnet before creating the account.
-
After your human creates the account, sync it:
silk account sync -
Check your status and send payments:
silk account status silk account send <recipient> <amount>
If the amount exceeds your per-transaction limit, the transaction is rejected on-chain with ExceedsPerTxLimit. If the account is paused, you get AccountPaused.
If silk account sync returns "No account found", your human hasn't created the account yet — share the setup URL with them.
Accounts vs escrow payments
| Accounts | Escrow (silk pay) |
|
|---|---|---|
| Setup required | Human creates account + adds you as operator | None — just a funded wallet |
| Spending limits | Per-transaction limit enforced on-chain | No limits |
| Recipient claims? | No — direct transfer, tokens arrive immediately | Yes — recipient must silk claim |
| Cancellable? | No — transfer is instant | Yes — sender can cancel before claim |
| Best for | Ongoing payments with human oversight | One-off payments between parties |
If your human has set up an account for you, prefer silk account send — it's simpler (no claim step) and your human controls the spending limits.
CLI Reference
| Command | Description |
|---|---|
silk init |
Initialize CLI (create wallet, agent ID, and contacts file) |
silk wallet create [label] |
Create a new wallet |
silk wallet list |
List all wallets with addresses |
silk wallet fund [--sol] [--usdc] [--wallet <label>] |
Fund wallet from devnet faucet |
silk balance [--wallet <label>] |
Show SOL and USDC balances |
silk pay <recipient> <amount> [--memo <text>] [--wallet <label>] |
Send USDC payment into escrow |
silk claim <transfer-pda> [--wallet <label>] |
Claim a received payment |
silk cancel <transfer-pda> [--wallet <label>] |
Cancel a sent payment |
silk payments list [--wallet <label>] |
List transfers |
silk payments get <transfer-pda> |
Get transfer details |
silk contacts add <name> <address> |
Save a contact to the address book |
silk contacts remove <name> |
Remove a contact |
silk contacts list |
List all saved contacts |
silk contacts get <name> |
Look up a contact's address |
silk account sync [--wallet <label>] [--account <pda>] |
Discover and sync your on-chain account |
silk account status [--wallet <label>] |
Show account balance, spending limit, and pause state |
silk account send <recipient> <amount> [--memo <text>] [--wallet <label>] |
Send from account (policy-enforced on-chain) |
silk chat <message> |
Ask SilkyWay support agent a question |
silk config set-cluster <cluster> |
Set cluster (mainnet-beta or devnet) |
silk config get-cluster |
Show current cluster and API URL |
silk config reset-cluster |
Reset cluster to default (mainnet-beta) |
Use --wallet <label> on any command to select a non-default wallet. Recipients accept contact names or Solana addresses.
How Transactions Work
SilkyWay is non-custodial — your private keys never leave your machine.
Every payment follows a build-sign-submit flow:
- Build — The SDK calls an API endpoint with payment details. The backend builds an unsigned Solana transaction and returns it as base64.
- Sign — The SDK signs the transaction locally using your private key.
- Submit — The SDK sends the signed transaction to the backend, which forwards it to Solana.
The backend handles Solana complexity (PDA derivation, instruction building, blockhash management). It never sees your private key — all authorization is enforced on-chain by the Solana program.
API Endpoints
Base URL: https://api.silkyway.ai (mainnet) or https://devnet-api.silkyway.ai (devnet)
All requests use Content-Type: application/json.
Escrow Endpoints
POST /api/tx/create-transfer
Build an unsigned create_transfer transaction. Locks USDC into escrow.
Request:
{
"sender": "BrKz4GQN1sxZWoGLbNTojp4G3JCFLRkSYk3mSRWhKsXp",
"recipient": "7xKXz9BpR3mFVDg2Thh3AG6sFRPqNrDJ4bHUkR8Y7vNx",
"amount": 10.00,
"token": "usdc",
"memo": "Payment for code review"
}
| Field | Type | Required | Description |
|---|---|---|---|
sender |
string | yes | Sender's Solana public key |
recipient |
string | yes | Recipient's Solana public key |
amount |
number | yes | Amount in token units (e.g. 10.00 = 10 USDC) |
token |
string | yes | Token symbol (e.g. "usdc") |
memo |
string | no | Human-readable memo |
claimableAfter |
number | no | Unix timestamp — recipient cannot claim before this time |
You can also pass mint (token mint pubkey) or poolPda directly instead of token, but token is the simplest option.
Response:
{
"ok": true,
"data": {
"transaction": "AQAAAAAAAAAAAAAA...base64...AAAAAAA=",
"transferPda": "9aE5kBqRvF3mNcXz8BpR3mFVDg2Thh3AG6sFRPqNrDJ4",
"nonce": "1738900000000",
"message": "Sign and submit via POST /api/tx/submit"
}
}
The transferPda is the on-chain address for this escrow. Save it — you need it to claim or cancel.
POST /api/tx/claim-transfer
Build an unsigned claim_transfer transaction. Moves USDC from escrow to the recipient's wallet.
Only the designated recipient can claim. If claimableAfter was set, the claim will fail before that time.
Request:
{
"transferPda": "9aE5kBqRvF3mNcXz8BpR3mFVDg2Thh3AG6sFRPqNrDJ4",
"claimer": "7xKXz9BpR3mFVDg2Thh3AG6sFRPqNrDJ4bHUkR8Y7vNx"
}
| Field | Type | Required | Description |
|---|---|---|---|
transferPda |
string | yes | The transfer's on-chain PDA |
claimer |
string | yes | Recipient's Solana public key |
Response:
{
"ok": true,
"data": {
"transaction": "AQAAAAAAAAAAAAAA...base64...AAAAAAA=",
"message": "Sign and submit via POST /api/tx/submit"
}
}
Common errors:
ClaimTooEarly(6003) —claimableAfterhasn't passed yetTransferAlreadyClaimed(6000) — already claimedTransferAlreadyCancelled(6001) — sender cancelled firstUnauthorized(6004) — claimer is not the designated recipient
POST /api/tx/cancel-transfer
Build an unsigned cancel_transfer transaction. Refunds USDC from escrow back to the sender.
Only the original sender can cancel, and only while the transfer is still ACTIVE (not yet claimed).
Request:
{
"transferPda": "9aE5kBqRvF3mNcXz8BpR3mFVDg2Thh3AG6sFRPqNrDJ4",
"canceller": "BrKz4GQN1sxZWoGLbNTojp4G3JCFLRkSYk3mSRWhKsXp"
}
| Field | Type | Required | Description |
|---|---|---|---|
transferPda |
string | yes | The transfer's on-chain PDA |
canceller |
string | yes | Sender's Solana public key |
Response:
{
"ok": true,
"data": {
"transaction": "AQAAAAAAAAAAAAAA...base64...AAAAAAA=",
"message": "Sign and submit via POST /api/tx/submit"
}
}
Common errors:
TransferAlreadyClaimed(6000) — recipient already claimedTransferAlreadyCancelled(6001) — already cancelledUnauthorized(6004) — canceller is not the original sender
POST /api/tx/submit
Submit a signed transaction to Solana.
Request:
{
"signedTx": "AQAAAAAAAAAAAAAA...base64-signed...AAAAAAA="
}
Response:
{
"ok": true,
"data": {
"txid": "5UfDuXsrhFnxGZmyJxNR8z7Ee5JDFrgWHKPdTEJvoTpB3Qw8mKz4GQN1sxZWoGL"
}
}
GET /api/transfers/:pda
Get details for a single transfer.
Example: GET /api/transfers/9aE5kBqRvF3mNcXz8BpR3mFVDg2Thh3AG6sFRPqNrDJ4
Response:
{
"ok": true,
"data": {
"transfer": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"transferPda": "9aE5kBqRvF3mNcXz8BpR3mFVDg2Thh3AG6sFRPqNrDJ4",
"sender": "BrKz4GQN1sxZWoGLbNTojp4G3JCFLRkSYk3mSRWhKsXp",
"recipient": "7xKXz9BpR3mFVDg2Thh3AG6sFRPqNrDJ4bHUkR8Y7vNx",
"amount": "10000000",
"amountRaw": "10000000",
"status": "ACTIVE",
"memo": "Payment for code review",
"createTxid": "5UfDuXsrhFnxGZmyJxNR8z7Ee5JDFrgWHKPdTEJvoTpB",
"claimTxid": null,
"cancelTxid": null,
"claimableAfter": null,
"claimableUntil": null,
"createdAt": "2025-02-07T12:00:00.000Z",
"updatedAt": "2025-02-07T12:00:00.000Z",
"token": { "mint": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU", "symbol": "USDC", "decimals": 6 },
"pool": { "poolPda": "3Fk8vMYJbCbEB2jzRCdRG9rFJhN2TCmPia9BjEKpTk5R", "feeBps": 50 }
}
}
}
Note: amount is in raw token units. USDC has 6 decimals, so "10000000" = 10.00 USDC.
GET /api/transfers?wallet=\<pubkey>
List all transfers where the wallet is sender or recipient.
Example: GET /api/transfers?wallet=BrKz4GQN1sxZWoGLbNTojp4G3JCFLRkSYk3mSRWhKsXp
Response:
{
"ok": true,
"data": {
"transfers": [
{
"transferPda": "9aE5kBqRvF3mNcXz8BpR3mFVDg2Thh3AG6sFRPqNrDJ4",
"sender": "BrKz4GQN1sxZWoGLbNTojp4G3JCFLRkSYk3mSRWhKsXp",
"recipient": "7xKXz9BpR3mFVDg2Thh3AG6sFRPqNrDJ4bHUkR8Y7vNx",
"amount": "10000000",
"status": "ACTIVE",
"memo": "Payment for code review",
"createdAt": "2025-02-07T12:00:00.000Z",
"token": { "mint": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU", "symbol": "USDC", "decimals": 6 },
"pool": { "poolPda": "3Fk8vMYJbCbEB2jzRCdRG9rFJhN2TCmPia9BjEKpTk5R", "feeBps": 50 }
}
]
}
}
POST /api/tx/faucet
Airdrop devnet SOL or USDC. Devnet only.
Request:
{
"wallet": "BrKz4GQN1sxZWoGLbNTojp4G3JCFLRkSYk3mSRWhKsXp",
"token": "usdc"
}
token is optional. Omit or use "sol" for SOL airdrop, "usdc" for USDC mint.
Response:
{
"ok": true,
"data": {
"amount": 0.1,
"txid": "5UfDuXsrhFnxGZmyJxNR8z7Ee5JDFrgWHKPdTEJvoTpB3Qw8mKz4GQN1sxZWoGL"
}
}
Account Endpoints
GET /api/account/by-operator/:pubkey
Find accounts where your wallet is an operator. Used by silk account sync.
Example: GET /api/account/by-operator/7xKXz9BpR3mFVDg2Thh3AG6sFRPqNrDJ4bHUkR8Y7vNx
Response:
{
"ok": true,
"data": {
"accounts": [
{
"pda": "9aE5kBqRvF3mNcXz8BpR3mFVDg2Thh3AG6sFRPqNrDJ4",
"owner": "BrKz4GQN1sxZWoGLbNTojp4G3JCFLRkSYk3mSRWhKsXp",
"mint": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU",
"mintDecimals": 6,
"isPaused": false,
"balance": 10000000,
"operatorSlot": {
"index": 0,
"perTxLimit": 5000000,
"dailyLimit": 0
}
}
]
}
}
Returns an empty array if no accounts found — this means your human hasn't set up your account yet.
GET /api/account/:pda
Get full account details. Used by silk account status.
Example: GET /api/account/9aE5kBqRvF3mNcXz8BpR3mFVDg2Thh3AG6sFRPqNrDJ4
Response:
{
"ok": true,
"data": {
"pda": "9aE5kBqRvF3mNcXz8BpR3mFVDg2Thh3AG6sFRPqNrDJ4",
"owner": "BrKz4GQN1sxZWoGLbNTojp4G3JCFLRkSYk3mSRWhKsXp",
"mint": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU",
"mintDecimals": 6,
"isPaused": false,
"balance": 10000000,
"operators": [
{
"pubkey": "7xKXz9BpR3mFVDg2Thh3AG6sFRPqNrDJ4bHUkR8Y7vNx",
"perTxLimit": 5000000,
"dailyLimit": 0
}
]
}
}
Note: balance and perTxLimit are in raw token units. USDC has 6 decimals, so 5000000 = $5.00.
POST /api/account/transfer
Build an unsigned transfer transaction from a SilkyWay account. Used by silk account send.
Request:
{
"signer": "7xKXz9BpR3mFVDg2Thh3AG6sFRPqNrDJ4bHUkR8Y7vNx",
"accountPda": "9aE5kBqRvF3mNcXz8BpR3mFVDg2Thh3AG6sFRPqNrDJ4",
"recipient": "Dg2Thh3AG6sFRPqNrDJ4bHUkR8Y7vNx7xKXz9BpR3mFV",
"amount": 3000000
}
| Field | Type | Required | Description |
|---|---|---|---|
signer |
string | yes | Your wallet address (operator) |
accountPda |
string | yes | The account's on-chain PDA |
recipient |
string | yes | Recipient's Solana public key |
amount |
number | yes | Amount in raw token units (e.g. 3000000 = 3.00 USDC) |
Response:
{
"ok": true,
"data": {
"transaction": "AQAAAAAAAAAAAAAA...base64...AAAAAAA="
}
}
Sign and submit the returned transaction via POST /api/tx/submit.
Common errors:
ExceedsPerTxLimit— Amount exceeds your per-transaction spending limitAccountPaused— Account is paused by the owner; operator transfers blockedUnauthorized— Signer is not the owner or an operator on this account
POST /api/account/create
Build an unsigned create-account transaction. Used by the setup page (human-facing, not typically called by agents).
Request:
{
"owner": "BrKz4GQN1sxZWoGLbNTojp4G3JCFLRkSYk3mSRWhKsXp",
"mint": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU",
"operator": "7xKXz9BpR3mFVDg2Thh3AG6sFRPqNrDJ4bHUkR8Y7vNx",
"perTxLimit": 5000000
}
POST /api/account/deposit
Build an unsigned deposit transaction. Used by the setup page to fund the account.
Request:
{
"depositor": "BrKz4GQN1sxZWoGLbNTojp4G3JCFLRkSYk3mSRWhKsXp",
"accountPda": "9aE5kBqRvF3mNcXz8BpR3mFVDg2Thh3AG6sFRPqNrDJ4",
"amount": 10000000
}
POST /chat
Send a message to the SilkyWay support agent. Returns an AI-generated response.
Request:
{
"agentId": "uuid-v4",
"message": "How do I send a payment?"
}
| Field | Type | Required | Description |
|---|---|---|---|
agentId |
string | yes | UUID v4 identifying the agent (auto-generated by the SDK) |
message |
string | yes | The question to ask |
Response (200):
{
"ok": true,
"data": {
"message": "Use silk pay...",
"agentId": "uuid-v4"
}
}
Transfer Statuses
| Status | Description |
|---|---|
ACTIVE |
Tokens locked in escrow, awaiting claim or cancellation |
CLAIMED |
Recipient claimed the tokens |
CANCELLED |
Sender cancelled and reclaimed the tokens |
EXPIRED |
Transfer expired past its claimableUntil window |
Error Codes
Escrow Program Errors (Handshake)
| Code | Name | Description |
|---|---|---|
| 6000 | TransferAlreadyClaimed |
Transfer has already been claimed |
| 6001 | TransferAlreadyCancelled |
Transfer has already been cancelled |
| 6002 | TransferExpired |
Transfer has expired |
| 6003 | ClaimTooEarly |
Cannot claim before claimableAfter timestamp |
| 6004 | Unauthorized |
Signer is not authorized for this action |
| 6005 | PoolPaused |
The token's escrow pool is temporarily paused — try again later |
| 6006 | InsufficientFunds |
Sender has insufficient token balance |
Account Program Errors (Silkysig)
| Code | Name | Description |
|---|---|---|
| 6000 | Unauthorized |
Signer is not the owner or an operator on this account |
| 6001 | ExceedsPerTxLimit |
Transfer amount exceeds operator's per-transaction spending limit |
| 6002 | ExceedsDailyLimit |
Transfer exceeds operator daily limit (not yet enforced) |
| 6003 | AccountPaused |
Account is paused — operator transfers blocked until owner unpauses |
| 6004 | MaxOperatorsReached |
Account already has 3 operators (maximum) |
| 6005 | OperatorNotFound |
Specified operator not found on account |
| 6006 | OperatorAlreadyExists |
Operator is already on this account |
| 6007 | InsufficientBalance |
Account doesn't have enough tokens for this transfer |
| 6008 | MathOverflow |
Arithmetic overflow in calculation |
API Errors
| Error | HTTP | Description |
|---|---|---|
INVALID_PUBKEY |
400 | Invalid Solana public key format |
INVALID_AMOUNT |
400 | Amount must be positive |
MISSING_FIELD |
400 | Required field not provided |
TRANSFER_NOT_FOUND |
404 | No transfer found for the given PDA |
POOL_NOT_FOUND |
404 | No escrow pool found for this token |
TOKEN_NOT_FOUND |
400 | Token symbol or mint not recognized |
TX_FAILED |
400 | Transaction simulation or submission failed |
RATE_LIMITED |
429 | Too many faucet requests |
FAUCET_FAILED |
400 | Faucet airdrop failed |
Response Format
Success:
{
"ok": true,
"data": { ... }
}
Error:
{
"ok": false,
"error": "ERROR_CODE",
"message": "Human-readable description"
}
Security
- Non-custodial — the backend builds unsigned transactions; you sign locally with your private key before submitting
- Private keys are never transmitted to the server
- All authorization is enforced on-chain by the Solana program, not by the backend
- Keys are stored locally at
~/.config/silk/config.json— never share this file
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (22,366 bytes)
- 📎 README.md (2,119 bytes)