Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

wallet-integration

БесплатноБез исполняемых скриптовНе проверен

Integrate an external wallet (signer) into an IC dapp with @icp-sdk/signer — the relying-party side of the ICRC signer standards. Covers picking a transport…

jiayaoqijiaот jiayaoqijia★ 81 звезда на GitHub

Об этом скилле

Wallet Integration

What This Is

Connecting an external wallet to your dapp so the user approves actions in the wallet rather than handing your app a key. @icp-sdk/signer is the relying-party client: your app is the relying party, the wallet is the signer, and they exchange JSON-RPC 2.0 messages over a transport defined by the ICRC signer standards.

This skill covers integrating a signer. Implementing one is out of scope — consent screens, prompt registration and account custody are the wallet's job.

Examples use OISY (https://oisy.com/sign), but nothing here is OISY-specific. For another web signer the transport URL is usually the only change, and BrowserExtensionTransport discovers extension signers you never hardcoded. What a given signer actually supports is a separate question from which transport reaches it — negotiate it rather than assuming (see Negotiate capabilities and pitfall 5).

Standard What it gives you API
ICRC-25 Capability discovery + permission lifecycle getSupportedStandards, requestPermissions, getPermissions
ICRC-27 The user's accounts getAccounts
ICRC-29 Popup transport over postMessage PostMessageTransport
ICRC-49 Execute a canister call SignerAgent (or callCanister, the raw primitive)
ICRC-94 Browser-extension discovery BrowserExtensionTransport.discover
ICRC-167 Top-level redirect transport UrlTransport (new in signer 6)

What the model is

Every write is an individual, user-approved act. Your app asks the wallet to execute one canister call (ICRC-49); the wallet shows the user what it is about to do, the user approves, and the wallet signs and submits it. Your app never holds a key and never acts on the user's behalf unattended.

That is the whole shape, and it is what makes wallet integration appropriate for deliberate, high-value actions — transfers, approvals, mints — and inappropriate for anything frequent or invisible. If a user should not see a prompt per action, you do not want a wallet; you want authentication.

When NOT to use this skill

  • A session — sign in once, then act many times. That is authentication, not wallet integration: a delegation is scoped and issued by an identity provider. Use the user-sign-in skill. ICRC-34 exists, but it is an auth mechanism and out of scope here.
  • Internet Identity sign-in → the user-sign-in skill. II is an identity provider, not an ICRC-25 signer.
  • Letting an agent or CLI act as the user → the agent-web-identity skill.
  • Building a wallet → out of scope, as above.

Prerequisites

npm i '@icp-sdk/signer@^6' '@icp-sdk/core@^6'

Add @icp-sdk/canisters@^4 if you call ICP/ICRC ledgers (it brings @dfinity/utils@^5 as a peer). Pin @icp-sdk/core to ^6: signer 6 peers it, and so do @icp-sdk/auth@^10 and @icp-sdk/canisters@^4.

The transport URL must be a secure context — HTTPS, localhost, or 127.0.0.1.

Pick a transport

The transport is the only part that knows how the wallet is reached; the Signer API above it is identical whichever you choose.

Transport Mechanism Use when
PostMessageTransport Popup, handshaken with icrc29_status, then postMessage Default for web wallets like OISY
UrlTransport Navigates the top-level window; wallet returns to your callbackUrl Mobile, or anywhere popups are blocked
BrowserExtensionTransport Extensions announce themselves on window events Extension wallets; discovering unknown signers
import { Signer } from '@icp-sdk/signer';
import { PostMessageTransport } from '@icp-sdk/signer/web';

// One Signer per wallet connection; safe to create at module scope.
const signer = new Signer({
  transport: new PostMessageTransport({ url: 'https://oisy.com/sign' })
});

Extension (ICRC-94)

import { Signer } from '@icp-sdk/signer';
import { BrowserExtensionTransport } from '@icp-sdk/signer/extension';

// Discovery order is whichever extension announced first, not a user
// preference, so return the list rather than choosing. Each provider carries
// { uuid, name, icon, rdns } — enough to render a picker.
function discoverExtensionSigners() {
  return BrowserExtensionTransport.discover();
}

// Build the signer only from the uuid the user picked.
async function connectExtensionSigner(uuid: string) {
  const transport = await BrowserExtensionTransport.findTransport({ uuid });
  return new Signer({ transport });
}

Redirect (ICRC-167)

UrlTransport unloads your page on every request, so it keeps a call-order journal in sessionStorage and replays it when the wallet returns. Two rules make or break it:

  1. Issue the same requests, in the same order, on every load. Branch only on values recovered from ea
Полный SKILL.md на GitHub

Установить wallet-integration в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

LICENSESOURCE.mdTRUST.auto.yaml

FAQ

Что делает скилл wallet-integration?

Integrate an external wallet (signer) into an IC dapp with @icp-sdk/signer — the relying-party side of the ICRC signer standards. Covers picking a transport (popup via ICRC-29 / top-level redirect via ICRC-167 / browser extension via ICRC-94) then negotiating capabilities, the permission and account lifecycle, and executing canister calls the user approves through SignerAgent (ICRC-49). Uses OISY as the worked example but applies to any ICRC-25 signer. Do NOT use for Internet Identity login (use the user-sign-in skill) or for implementing a wallet yourself. Use when the developer mentions wallet integration or OISY or @icp-sdk/signer or approving a transaction in a wallet popup.

Как установить скилл wallet-integration?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл wallet-integration запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить wallet-integration с