Command Palette

Search for a command to run...

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

cksol

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

Integrate ckSOL (chain-key SOL) into an IC app. Covers converting SOL to ckSOL via per-account Solana deposit addresses (get_deposit_address + deposit_sol…

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

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

ckSOL Integration

What This Is

ckSOL is an ICRC-1/ICRC-2 token backed 1:1 by SOL (9 decimals, 1 ckSOL = 1_000_000_000 lamports). The ckSOL minter derives one Solana deposit address per ICRC account from its threshold-Ed25519 key. It sweeps deposited SOL to its main address and mints once the sweep is finalized. For withdrawals it burns ckSOL via an ICRC-2 allowance and sends SOL using durable-nonce transactions, which never expire. It talks to Solana through the SOL RPC canister. Only native SOL is supported: no SPL tokens.

Source: github.com/dfinity/cksol. Minter v0.1.0 has run on mainnet since 2026-10.

Canister IDs

Mainnet (Solana mainnet) Staging (Solana Devnet, token "ckDevnetSOL")
Minter lh22c-kyaaa-aaaar-qb5nq-cai ljyxk-riaaa-aaaar-qb5mq-cai
Ledger ls5lp-lqaaa-aaaar-qb5oa-cai la34w-haaaa-aaaar-qb5na-cai
Index 2ezyf-hqaaa-aaaar-qb6ga-cai 2r6ji-gyaaa-aaaar-qb6fq-cai
Minter main Solana address GXVewvv6HehcLFYCmwpqh5CrMjqN9zJ8rqzGq3HEt9Ax Br8eRkeya8hy3sHCYqtWqGeNNZ349aPSUKGVYFWKKer1

The ledger fee is 500 lamports. get_minter_info (query) on 2026-11-02 returned: minimum_deposit_amount = 20_000_000 (0.02 SOL), minimum_withdrawal_amount = 2_000_000 (0.002 SOL), withdrawal_fee = 1_000_000 (0.001 SOL), deposit_sol_required_cycles = 1_000_000_000_000, and deposit_sol_fee = 45_000_000_000. deposit_sol_fee is in cycles, not lamports. Read these values at runtime.

How the deposit address is computed

The minter uses non-hardened derivation from the IC threshold Ed25519 key key_1, with path [minter canister id bytes, [0x01], owner principal bytes, 32-byte subaccount (zeros for default)]. The Solana address is the base58 of the derived 32-byte public key. It is deterministic and stable, one address per (owner, subaccount), and is a plain system account. The minter's main address is the key at the empty path, so it can never collide with a deposit address. You can derive it offline (deriveDepositAddressOffline below) or call get_deposit_address, an update call that anyone may make for any non-anonymous owner.

Deposit: SOL → ckSOL (deployed "manual" flow)

  1. Address. get_deposit_address(record { owner = opt <principal>; subaccount = opt <32 bytes> | null }) returns a base58 address. If owner is null, it defaults to the caller.
  2. Send SOL to that address from any wallet or exchange, in one or several transfers (no memo). The total balance must reach minimum_deposit_amount.
  3. Notify. deposit_sol(record { owner = opt <principal>; subaccount }) with cycles attached (≥ deposit_sol_required_cycles). The minter reads the finalized balance and charges about 2.3B cycles for getBalance plus deposit_sol_fee (45B), refunding the rest. It then queues sweepable = balance − 890_880 (the rent-exemption threshold stays on the address, once per address) and returns Ok(deposit_id : nat64). Only canisters can attach cycles, so a frontend cannot call deposit_sol directly: route it through your backend canister. owner may be any principal, so a backend can pay for a user-owned account.
  4. Sweep and mint happen on minter timers, about a minute each. Up to 10 deposits are swept per Solana transaction, and each deposit pays a 5_000-lamport fee share. ckSOL is minted only after the sweep is finalized. The user receives sweepable − 5_000 lamports.
  5. Track with deposit_sol_status(deposit_id) (query): Queued { sweepable_amount } → Swept { signature } → Finalized { signature } → Minted { block_index; minted_amount }. A Dropped { signature } status means the sweep failed or expired, nothing was minted, and the funds are still on the address: call deposit_sol again. A Quarantined { signature } status needs a minter upgrade: use a different subaccount for new deposits.

At most one deposit per account is in flight. Calling deposit_sol again while one is queued, swept or finalized returns the same deposit_id and refunds all cycles, so retries are safe. Example: the first deposit of exactly 1 SOL mints 999_104_120 lamports, the minimum 0.02 SOL mints 19_104_120, and a later deposit to the same address loses only the 5_000 fee share.

Upcoming automatic flow, not on mainnet as of 2026-11-02. watch_deposit_address(record { subaccount }) is free, needs no cycles, and has owner = caller. The minter then scans the address for about 24 h and sweeps automatically, deducting automatic_deposit_fee (0.002 SOL). Status is Watching | Detected { deposit_id }, and you follow it with deposit_sol_status. Before using it, check that the endpoint exists: icp canister metadata lh22c-kyaaa-aaaar-qb5nq-cai candid:service -n ic.

Withdrawal: ckSOL → SOL

  1. icrc2_approve on the ckSOL ledger, with spender = minter and amount ≥ the withdrawal amount. Burns are fee-free, and the approve itself costs 500 lamports.
  2. `withdraw_sol(reco
Полный SKILL.md на GitHub

Установить cksol в Claude Code и Claude Desktop

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

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

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

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

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

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

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

LICENSESOURCE.mdTRUST.auto.yaml

FAQ

Что делает скилл cksol?

Integrate ckSOL (chain-key SOL) into an IC app. Covers converting SOL to ckSOL via per-account Solana deposit addresses (get_deposit_address + deposit_sol with cycles, works from exchanges), withdrawing ckSOL to SOL (icrc2_approve + withdraw_sol), tracking deposit/withdrawal status, deposit-address derivation, fees, minimums, and which calls belong in the frontend vs a backend canister. Use when the user mentions ckSOL, Solana deposits or withdrawals on ICP, or moving SOL to/from the Internet Computer. Do NOT use for plain ICRC-1 ckSOL transfers (use icrc-ledger), SPL tokens, or signing arbitrary Solana transactions from a canister (use the SOL RPC canister / threshold Ed25519 directly).

Как установить скилл cksol?

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

Скилл cksol запускает скрипты?

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

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

Сравнить cksol с