把文件直接送進你用戶的錢包。

用 Wallet 協定(簡單的 API 與 Webhook),把合約、帳單、發票、保單、通知和簽署請求,送進你的用戶本就信任的錢包。

把一份合約派送到用戶錢包
await wallet.assets.deliver({
  walletId,
  type: "contract",
  title: "Service Agreement",
  requireSignature: true,
  agentAssist: true
})

Wallet 協定如何運作

1

註冊一次派送

一次 API 呼叫,把合約、帳單或通知註冊為可派送的錢包資產——有類型、有版本、可追溯。

2

送進用戶的錢包

用戶在自己信任的錢包裡收到文件,可以閱讀、簽署並妥善保存。

3

訂閱事件回執

開啟、簽署與驗證等事件,透過 Webhook 即時回傳到你的系統。

API 參考(預覽版)

Wallet 協定就是一組普通的 HTTPS API:一個端點把有類型的文件派送進錢包,Webhook 把後續發生的事回傳給你。

鑑權

在 x-api-key 請求標頭中傳入你的 API 金鑰。金鑰在錢包的「整合」頁自助建立,按整合隔離權限。

x-api-key: wlt_live_xxxxxxxxxxxxxxxx

派送一份文件

POST 一個 envelope 即可派送合約、帳單、發票、保單或通知。target 支援錢包地址、錢包 ID 或數字門牌;帶上 idempotencyKey 可安全重試。

POST https://service.icloudportal.com/api/theWallet.protocol.deliverAsset
x-api-key: wlt_live_xxxxxxxxxxxxxxxx
Content-Type: application/json

{
  "protocolVersion": "2026-01",
  "idempotencyKey": "order-2026-0611-001",
  "source": { "system": "acme-billing", "organizationName": "Acme Ltd" },
  "target": { "walletAddress": "alex@wallet.thewallet.ai" },
  "asset": {
    "type": "contract",
    "title": "Service Agreement",
    "requiresSignature": true
  },
  "options": { "requireUserConfirmation": true }
}

回應

{
  "status": 0,
  "data": {
    "deliveryId": "dlv_9f2…",
    "assetId": "ast_71c…",
    "inboxItemId": "inb_2ab…",
    "signatureRequestId": "sig_e04…",
    "status": "delivered",
    "requireUserConfirmation": true,
    "reused": false
  }
}

Webhook

在「整合」頁註冊 Webhook 端點即可接收派送事件——例如文件落入錢包時的 asset.created——自動簽名並重試。

{
  "eventType": "asset.created",
  "data": {
    "assetId": "ast_71c…",
    "assetType": "contract",
    "walletId": "wlt_3d8…",
    "status": "received"
  }
}

接入 AI Agent(MCP)

The Wallet 提供 MCP 伺服器:Claude 等 Agent 框架可以直接派送文件、發起簽署、請求錢包主人授權——Agent 來準備,主人來確認。

{
  "mcpServers": {
    "thewallet": {
      "command": "npx",
      "args": ["@thewallet/mcp"],
      "env": { "THEWALLET_API_KEY": "wlt_live_xxxxxxxxxxxxxxxx" }
    }
  }
}

取得你的開發者金鑰

先免費建立錢包,然後在「整合」頁即可自助建立 API 金鑰,無需聯絡銷售。錢包級派送與完整 API 包含在平台版中。

以上為 API 預覽。歡迎聯絡我們取得搶先體驗與整合支援。