[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HP6JSTVESNC6P2K82G0T5P":3,"skill-same:01M6HP6JSTVESNC6P2K82G0T5P":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":56,"updatedAt":57,"install":58,"resources":71},"01M6HP6JSTVESNC6P2K82G0T5P","cksol",null,"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\u002Fwithdrawal 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\u002Ffrom 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 \u002F threshold Ed25519 directly).","jiayaoqijia\u002Fcryptoskill","jiayaoqijia","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1453879?v=4","01M6GMYTX7Q7S504VC6E756ENR","YQ","01M6GMYV1QKJ1CC75MTTGT9PR0",81,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fdfinity-official-cksol\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fdfinity-official-cksol\u002FSKILL.md",[],[5,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"get","when","transfers","sol","addresses","which","internet","chain","icp","app","frontend","withdraw","deposit","integrate","node","transactions","ed25519","code","status","cli","2026-11-10 10:12:30",false,"---\nname: cksol\ndescription: \"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\u002Fwithdrawal 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\u002Ffrom 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 \u002F threshold Ed25519 directly).\"\nlicense: Apache-2.0\ncompatibility: \"icp-cli >= 0.2.2, Node.js >= 22 for frontend code\"\nmetadata:\n  title: ckSOL (chain-key SOL)\n  category: DeFi\n---\n\n# ckSOL Integration\n\n## What This Is\n\nckSOL is an ICRC-1\u002FICRC-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.\n\nSource: `github.com\u002Fdfinity\u002Fcksol`. Minter v0.1.0 has run on mainnet since 2026-10.\n\n## Canister IDs\n\n| | Mainnet (Solana mainnet) | Staging (Solana Devnet, token \"ckDevnetSOL\") |\n|---|---|---|\n| Minter | `lh22c-kyaaa-aaaar-qb5nq-cai` | `ljyxk-riaaa-aaaar-qb5mq-cai` |\n| Ledger | `ls5lp-lqaaa-aaaar-qb5oa-cai` | `la34w-haaaa-aaaar-qb5na-cai` |\n| Index | `2ezyf-hqaaa-aaaar-qb6ga-cai` | `2r6ji-gyaaa-aaaar-qb6fq-cai` |\n| Minter main Solana address | `GXVewvv6HehcLFYCmwpqh5CrMjqN9zJ8rqzGq3HEt9Ax` | `Br8eRkeya8hy3sHCYqtWqGeNNZ349aPSUKGVYFWKKer1` |\n\nThe 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.\n\n## How the deposit address is computed\n\nThe 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.\n\n## Deposit: SOL → ckSOL (deployed \"manual\" flow)\n\n1. **Address.** `get_deposit_address(record { owner = opt \u003Cprincipal>; subaccount = opt \u003C32 bytes> | null })` returns a base58 address. If `owner` is null, it defaults to the **caller**.\n2. **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`.\n3. **Notify.** `deposit_sol(record { owner = opt \u003Cprincipal>; 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.\n4. **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.\n5. **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.\n\nAt 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.\n\n**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`.\n\n## Withdrawal: ckSOL → SOL\n\n1. `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.\n2. `withdraw_sol(record { address = \"\u003Cbase58>\"; amount = \u003Clamports : nat64>; from_subaccount = opt … })` burns from `caller + from_subaccount`. There is no owner argument. It returns `Ok { block_index }`, the burn index, which is also the withdrawal id.\n3. The minter batches up to 10 withdrawals per durable-nonce transaction. The destination receives `amount − withdrawal_fee`.\n4. Track with `withdraw_sol_status(record { block_index })`, an **update** call: `Pending → TxSent { transaction_id } → TxFinalized (Success | Failure) { transaction_id }`.\n\nBusiness errors come back as `Err`, not as traps: `ValueTooSmall`, `MalformedAddress`, `InvalidDestination` (Solana reserved\u002Fsysvar\u002Fprogram keys, the minter's main address, its nonce accounts), `InsufficientFunds`, `InsufficientAllowance`, `AlreadyProcessing` (one withdrawal per principal at a time), and `TemporarilyUnavailable`.\n\n## Who calls what\n\n| Step | Frontend (user identity) | Backend canister |\n|---|---|---|\n| `get_deposit_address` | ✅ (owner = user) | ✅ |\n| `deposit_sol` (needs cycles) | ❌ | ✅ passes `owner = opt user` |\n| `deposit_sol_status` | ✅ query | ✅ |\n| `icrc2_approve` + `withdraw_sol` | ✅ (burns from the user's own account) | ✅ only for tokens the canister owns (custodial subaccounts) |\n| `withdraw_sol_status` | ✅ | ✅ |\n\nNon-custodial pattern: the frontend shows the address, then calls the backend's `notifySolDeposit`, which calls `deposit_sol` for `owner = caller` with cycles. The frontend then polls `deposit_sol_status`, and the user withdraws directly from the frontend.\n\n## Mistakes That Break Your Build\n\n1. **Calling `deposit_sol` from the browser or without cycles.** It fails with `InsufficientCycles`. It must be called by a canister with `(with cycles = …)` \u002F `.with_cycles(…)`, or via `icp canister call … --proxy \u003Ccanister> --cycles \u003Cn>`.\n2. **Omitting `owner` when a canister calls `get_deposit_address` \u002F `deposit_sol`.** It defaults to the caller, which is your canister. The user's SOL is then looked up at, and minted to, the canister's account. Pass `owner = opt user`, and use the **same** `(owner, subaccount)` in both calls.\n3. **Using stale API names from older docs.** There is no `process_deposit` and no transaction-signature argument, and the withdrawal endpoint is `withdraw_sol`, not `withdraw`. The minter reads the address **balance**, so the user never needs a transaction signature. Track the result with `deposit_sol_status(deposit_id)`.\n4. **Expecting automatic detection on mainnet today.** Without `deposit_sol`, deposited SOL just sits on the deposit address. Nothing is lost, but nothing is minted until someone calls `deposit_sol`, or `watch_deposit_address` once it is deployed.\n5. **Depositing below the minimum.** `ValueTooSmall { balance; minimum_deposit_amount }` is checked against the address balance, which includes the 890_880-lamport rent threshold left by earlier sweeps. Top up and call again. Each rejected call still costs your canister about 2.3B cycles.\n6. **Sending SPL tokens (USDC on Solana, etc.) or using another chain.** Only native SOL is credited.\n7. **Promising 1:1 on the first deposit.** The first sweep of an address keeps 890_880 lamports there, each sweep costs a 5_000-lamport share, and withdrawals cost `withdrawal_fee`. Show users `minted_amount` from `deposit_sol_status`.\n8. **Unbounded `deposit_sol` relays.** Each accepted call spends about 47B cycles (about 0.07 USD) of **your** canister. Authenticate, rate-limit per user, and reject anonymous callers (see `canister-security`).\n9. **Using `u64` vs `nat` incorrectly.** Minter amounts are `nat64` lamports (`Lamport`), and ledger amounts are `nat`. `deposit_sol_fee` and `deposit_sol_required_cycles` are `nat` cycles.\n10. **Concurrent withdrawals from one principal.** `withdraw_sol` returns `AlreadyProcessing` while another withdrawal by the same principal is in progress. A custodial canister must serialize its withdrawals.\n\n## Implementation: frontend (TypeScript)\n\nThe `@icp-sdk\u002Fcanisters` package has no ckSOL module, so generate bindings from the deployed interface:\n\n```bash\nnpm i @icp-sdk\u002Fcore@^6 @icp-sdk\u002Fcanisters@^4 @dfinity\u002Futils@^5 @dfinity\u002Fic-pub-key@^1 bs58@^6\nicp canister metadata lh22c-kyaaa-aaaar-qb5nq-cai candid:service -n ic > cksol_minter.did\nnpx @icp-sdk\u002Fbindgen --did-file .\u002Fcksol_minter.did --out-dir .\u002Fsrc\u002Fbindings\n```\n\n```typescript\nimport { HttpAgent, type Identity } from \"@icp-sdk\u002Fcore\u002Fagent\";\nimport { Principal } from \"@icp-sdk\u002Fcore\u002Fprincipal\";\nimport { IcrcLedgerCanister } from \"@icp-sdk\u002Fcanisters\u002Fledger\u002Ficrc\";\nimport { createActor } from \".\u002Fbindings\u002Fcksol_minter\";\nimport { schnorr } from \"@dfinity\u002Fic-pub-key\";\nimport bs58 from \"bs58\";\n\nconst CKSOL_MINTER = Principal.fromText(\"lh22c-kyaaa-aaaar-qb5nq-cai\");\nconst CKSOL_LEDGER = Principal.fromText(\"ls5lp-lqaaa-aaaar-qb5oa-cai\");\n\nexport async function ckSol(identity: Identity) {\n  const agent = await HttpAgent.create({ identity });\n  return {\n    minter: createActor(CKSOL_MINTER.toText(), { agent }),\n    ledger: IcrcLedgerCanister.create({ agent, canisterId: CKSOL_LEDGER }),\n  };\n}\ntype Ctx = Awaited\u003CReturnType\u003Ctypeof ckSol>>;\n\n\u002F\u002F Deposit address: an update call; owner defaults to the caller when omitted.\nexport async function depositAddress({ minter }: Ctx, owner: Principal, subaccount?: Uint8Array) {\n  return minter.get_deposit_address({ owner, subaccount }); \u002F\u002F base58 Solana address\n}\n\n\u002F\u002F Same address computed offline (no IC call): mainnet Ed25519 \"key_1\",\n\u002F\u002F path = [minter canister id, [0x01], owner principal bytes, 32-byte subaccount].\nexport function deriveDepositAddressOffline(owner: Principal, subaccount: Uint8Array = new Uint8Array(32)) {\n  const master = schnorr.ed25519.PublicKeyWithChainCode.forMainnetKey(\"key_1\");\n  const path = new schnorr.ed25519.DerivationPath([\n    CKSOL_MINTER.toUint8Array(), new Uint8Array([1]), owner.toUint8Array(), subaccount,\n  ]);\n  const hex = master.deriveSubkeyWithChainCode(path).public_key.toHex();\n  return bs58.encode(Uint8Array.from(hex.match(\u002F..\u002Fg)!.map((b) => parseInt(b, 16))));\n}\n\n\u002F\u002F Track a deposit queued by deposit_sol (called by your backend, which attaches cycles).\nexport async function depositStatus({ minter }: Ctx, depositId: bigint) {\n  return minter.deposit_sol_status(depositId); \u002F\u002F NotFound | Queued | Swept | Finalized | Minted | Dropped | Quarantined\n}\n\nexport async function withdrawSol(ctx: Ctx, address: string, amountLamports: bigint) {\n  const info = await ctx.minter.get_minter_info();\n  if (amountLamports \u003C info.minimum_withdrawal_amount) throw new Error(\"below minimum_withdrawal_amount\");\n  await ctx.ledger.approve({ spender: { owner: CKSOL_MINTER, subaccount: [] }, amount: amountLamports });\n  const res = await ctx.minter.withdraw_sol({ address, amount: amountLamports });\n  if (res.__kind__ === \"Err\") throw new Error(res.Err.__kind__);\n  \u002F\u002F recipient receives amountLamports - info.withdrawal_fee\n  return res.Ok.block_index; \u002F\u002F poll withdraw_sol_status({ block_index })\n}\n\nexport async function withdrawStatus({ minter }: Ctx, blockIndex: bigint) {\n  return minter.withdraw_sol_status({ block_index: blockIndex }); \u002F\u002F NotFound | Pending | TxSent | TxFinalized\n}\n```\n\nThe user sends SOL with their own wallet (Phantom, Solflare, an exchange) to the returned address. No Solana SDK is needed in your app unless you want to build that transfer yourself.\n\n## Implementation: backend relay for `deposit_sol`\n\n### Rust\n\n`Cargo.toml` dependencies: `ic-cdk = \"0.19\"`, `candid = \"0.10\"`, `serde = { version = \"1\", features = [\"derive\"] }`, `serde_bytes = \"0.11\"`.\n\n```rust\nuse candid::{CandidType, Deserialize, Nat, Principal};\nuse ic_cdk::call::Call;\nuse ic_cdk::update;\n\nconst CKSOL_MINTER: &str = \"lh22c-kyaaa-aaaar-qb5nq-cai\";\nconst DEPOSIT_SOL_CYCLES: u128 = 1_000_000_000_000; \u002F\u002F >= get_minter_info().deposit_sol_required_cycles; unused part is refunded\n\n#[derive(CandidType, Deserialize)]\nstruct AccountArgs { owner: Option\u003CPrincipal>, subaccount: Option\u003Cserde_bytes::ByteBuf> }\n\n#[derive(CandidType, Deserialize, Debug)]\nstruct InsufficientCyclesError { expected: Nat, received: Nat }\n\n#[derive(CandidType, Deserialize, Debug)]\nenum DepositSolError {\n    InsufficientCycles(InsufficientCyclesError),\n    TemporarilyUnavailable(String),\n    AlreadyProcessing,\n    ValueTooSmall { balance: u64, minimum_deposit_amount: u64 },\n    Quarantined { deposit_id: u64 },\n}\n\nfn minter() -> Principal { Principal::from_text(CKSOL_MINTER).unwrap() }\n\nfn caller_not_anonymous() -> Principal {\n    let caller = ic_cdk::api::msg_caller();\n    assert_ne!(caller, Principal::anonymous(), \"Authentication required\");\n    caller\n}\n\n\u002F\u002F\u002F Solana deposit address of the caller's own ckSOL account (owner = caller, default subaccount).\n#[update]\nasync fn sol_deposit_address() -> Result\u003CString, String> {\n    let user = caller_not_anonymous();\n    let (address,): (String,) = Call::unbounded_wait(minter(), \"get_deposit_address\")\n        .with_arg(AccountArgs { owner: Some(user), subaccount: None })\n        .await\n        .map_err(|e| format!(\"{e:?}\"))?\n        .candid_tuple()\n        .map_err(|e| format!(\"{e:?}\"))?;\n    Ok(address)\n}\n\n\u002F\u002F\u002F After the user sent SOL to the deposit address: pay the cycles and queue the sweep.\n\u002F\u002F\u002F ckSOL is minted to the USER's account (owner = user), not to this canister.\n#[update]\nasync fn notify_sol_deposit() -> Result\u003Cu64, String> {\n    let user = caller_not_anonymous();\n    \u002F\u002F Abuse guard: this call spends ~47B cycles of THIS canister per successful deposit.\n    \u002F\u002F Add per-user rate limiting \u002F an in-flight set in production (see canister-security skill).\n    let (res,): (Result\u003Cu64, DepositSolError>,) = Call::unbounded_wait(minter(), \"deposit_sol\")\n        .with_arg(AccountArgs { owner: Some(user), subaccount: None })\n        .with_cycles(DEPOSIT_SOL_CYCLES)\n        .await\n        .map_err(|e| format!(\"deposit_sol rejected: {e:?}\"))?\n        .candid_tuple()\n        .map_err(|e| format!(\"{e:?}\"))?;\n    res.map_err(|e| format!(\"{e:?}\")) \u002F\u002F Ok(deposit_id) -> poll deposit_sol_status(deposit_id)\n}\n\nic_cdk::export_candid!();\n```\n\n### Motoko\n\n```motoko\nimport Principal \"mo:core\u002FPrincipal\";\nimport Runtime \"mo:core\u002FRuntime\";\n\npersistent actor {\n\n  type DepositSolError = {\n    #InsufficientCycles : { expected : Nat; received : Nat };\n    #TemporarilyUnavailable : Text;\n    #AlreadyProcessing;\n    #ValueTooSmall : { balance : Nat64; minimum_deposit_amount : Nat64 };\n    #Quarantined : { deposit_id : Nat64 };\n  };\n\n  transient let minter : actor {\n    get_deposit_address : shared { owner : ?Principal; subaccount : ?Blob } -> async Text;\n    deposit_sol : shared { owner : ?Principal; subaccount : ?Blob } -> async { #Ok : Nat64; #Err : DepositSolError };\n  } = actor \"lh22c-kyaaa-aaaar-qb5nq-cai\";\n\n  \u002F\u002F >= get_minter_info().deposit_sol_required_cycles (1T on 2026-11); the unused part is refunded.\n  transient let DEPOSIT_SOL_CYCLES = 1_000_000_000_000;\n\n  \u002F\u002F Solana deposit address of the caller's own ckSOL account.\n  public shared ({ caller }) func solDepositAddress() : async Text {\n    if (caller.isAnonymous()) { Runtime.trap(\"Authentication required\") };\n    await minter.get_deposit_address({ owner = ?caller; subaccount = null })\n  };\n\n  \u002F\u002F After the user sent SOL: pay the cycles and queue the sweep. ckSOL is minted to the CALLER's account.\n  \u002F\u002F Spends ~47B cycles of this canister per accepted deposit: rate-limit per user in production.\n  public shared ({ caller }) func notifySolDeposit() : async { #Ok : Nat64; #Err : DepositSolError } {\n    if (caller.isAnonymous()) { Runtime.trap(\"Authentication required\") };\n    await (with cycles = DEPOSIT_SOL_CYCLES) minter.deposit_sol({ owner = ?caller; subaccount = null })\n  };\n};\n```\n\n## Verify It Works\n\n```bash\n# Fees, minimums, required cycles\nicp canister call lh22c-kyaaa-aaaar-qb5nq-cai get_minter_info '()' -n ic --query\n\n# Deposit address for a principal (update call; any caller)\nicp canister call lh22c-kyaaa-aaaar-qb5nq-cai get_deposit_address \\\n  '(record { owner = opt principal \"YOUR-PRINCIPAL\"; subaccount = null })' -n ic\n# Expected: (\"7N9yLidkZCEvb1uWUQqRPD53KDUVXoghTF9gxJFBChDS\") — a base58 Solana address\n\n# After sending SOL: notify through a cycles-holding proxy canister you control\nicp canister call lh22c-kyaaa-aaaar-qb5nq-cai deposit_sol \\\n  '(record { owner = opt principal \"YOUR-PRINCIPAL\"; subaccount = null })' \\\n  -n ic --proxy \u003CPROXY_CANISTER_ID> --cycles 1000000000000\n# Expected: (variant { Ok = 42 : nat64 })\n\nicp canister call lh22c-kyaaa-aaaar-qb5nq-cai deposit_sol_status '(42 : nat64)' -n ic --query\n# Expected eventually: (variant { Minted = record { block_index = …; minted_amount = … } })\n\n# Withdraw 0.01 SOL\nicp canister call ls5lp-lqaaa-aaaar-qb5oa-cai icrc2_approve \\\n  '(record { spender = record { owner = principal \"lh22c-kyaaa-aaaar-qb5nq-cai\"; subaccount = null }; amount = 10_000_000 : nat })' -n ic\nicp canister call lh22c-kyaaa-aaaar-qb5nq-cai withdraw_sol \\\n  '(record { address = \"\u003CSOLANA_ADDRESS>\"; amount = 10_000_000 : nat64; from_subaccount = null })' -n ic\nicp canister call lh22c-kyaaa-aaaar-qb5nq-cai withdraw_sol_status '(record { block_index = \u003CBLOCK_INDEX> : nat64 })' -n ic\n```\n","# ckSOL Integration\n\n## What This Is\n\nckSOL is an ICRC-1\u002FICRC-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.\n\nSource: `github.com\u002Fdfinity\u002Fcksol`. Minter v0.1.0 has run on mainnet since 2026-10.\n\n## Canister IDs\n\n| | Mainnet (Solana mainnet) | Staging (Solana Devnet, token \"ckDevnetSOL\") |\n|---|---|---|\n| Minter | `lh22c-kyaaa-aaaar-qb5nq-cai` | `ljyxk-riaaa-aaaar-qb5mq-cai` |\n| Ledger | `ls5lp-lqaaa-aaaar-qb5oa-cai` | `la34w-haaaa-aaaar-qb5na-cai` |\n| Index | `2ezyf-hqaaa-aaaar-qb6ga-cai` | `2r6ji-gyaaa-aaaar-qb6fq-cai` |\n| Minter main Solana address | `GXVewvv6HehcLFYCmwpqh5CrMjqN9zJ8rqzGq3HEt9Ax` | `Br8eRkeya8hy3sHCYqtWqGeNNZ349aPSUKGVYFWKKer1` |\n\nThe 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.\n\n## How the deposit address is computed\n\nThe 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.\n\n## Deposit: SOL → ckSOL (deployed \"manual\" flow)\n\n1. **Address.** `get_deposit_address(record { owner = opt \u003Cprincipal>; subaccount = opt \u003C32 bytes> | null })` returns a base58 address. If `owner` is null, it defaults to the **caller**.\n2. **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`.\n3. **Notify.** `deposit_sol(record { owner = opt \u003Cprincipal>; 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.\n4. **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.\n5. **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.\n\nAt 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.\n\n**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`.\n\n## Withdrawal: ckSOL → SOL\n\n1. `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.\n2. `withdraw_sol(record { address = \"\u003Cbase58>\"; amount = \u003Clamports : nat64>; from_subaccount = opt … })` burns from `caller + from_subaccount`. There is no owner argument. It returns `Ok { block_index }`, the burn index, which is also the withdrawal id.\n3. The minter batches up to 10 withdrawals per durable-nonce transaction. The destination receives `amount − withdrawal_fee`.\n4. Track with `withdraw_sol_status(record { block_index })`, an **update** call: `Pending → TxSent { transaction_id } → TxFinalized (Success | Failure) { transaction_id }`.\n\nBusiness errors come back as `Err`, not as traps: `ValueTooSmall`, `MalformedAddress`, `InvalidDestination` (Solana reserved\u002Fsysvar\u002Fprogram keys, the minter's main address, its nonce accounts), `InsufficientFunds`, `InsufficientAllowance`, `AlreadyProcessing` (one withdrawal per principal at a time), and `TemporarilyUnavailable`.\n\n## Who calls what\n\n| Step | Frontend (user identity) | Backend canister |\n|---|---|---|\n| `get_deposit_address` | ✅ (owner = user) | ✅ |\n| `deposit_sol` (needs cycles) | ❌ | ✅ passes `owner = opt user` |\n| `deposit_sol_status` | ✅ query | ✅ |\n| `icrc2_approve` + `withdraw_sol` | ✅ (burns from the user's own account) | ✅ only for tokens the canister owns (custodial subaccounts) |\n| `withdraw_sol_status` | ✅ | ✅ |\n\nNon-custodial pattern: the frontend shows the address, then calls the backend's `notifySolDeposit`, which calls `deposit_sol` for `owner = caller` with cycles. The frontend then polls `deposit_sol_status`, and the user withdraws directly from the frontend.\n\n## Mistakes That Break Your Build\n\n1. **Calling `deposit_sol` from the browser or without cycles.** It fails with `InsufficientCycles`. It must be called by a canister with `(with cycles = …)` \u002F `.with_cycles(…)`, or via `icp canister call … --proxy \u003Ccanister> --cycles \u003Cn>`.\n2. **Omitting `owner` when a canister calls `get_deposit_address` \u002F `deposit_sol`.** It defaults to the caller, which is your canister. The user's SOL is then looked up at, and minted to, the canister's account. Pass `owner = opt user`, and use the **same** `(owner, subaccount)` in both calls.\n3. **Using stale API names from older docs.** There is no `process_deposit` and no transaction-signature argument, and the withdrawal endpoint is `withdraw_sol`, not `withdraw`. The minter reads the address **balance**, so the user never needs a transaction signature. Track the result with `deposit_sol_status(deposit_id)`.\n4. **Expecting automatic detection on mainnet today.** Without `deposit_sol`, deposited SOL just sits on the deposit address. Nothing is lost, but nothing is minted until someone calls `deposit_sol`, or `watch_deposit_address` once it is deployed.\n5. **Depositing below the minimum.** `ValueTooSmall { balance; minimum_deposit_amount }` is checked against the address balance, which includes the 890_880-lamport rent threshold left by earlier sweeps. Top up and call again. Each rejected call still costs your canister about 2.3B cycles.\n6. **Sending SPL tokens (USDC on Solana, etc.) or using another chain.** Only native SOL is credited.\n7. **Promising 1:1 on the first deposit.** The first sweep of an address keeps 890_880 lamports there, each sweep costs a 5_000-lamport share, and withdrawals cost `withdrawal_fee`. Show users `minted_amount` from `deposit_sol_status`.\n8. **Unbounded `deposit_sol` relays.** Each accepted call spends about 47B cycles (about 0.07 USD) of **your** canister. Authenticate, rate-limit per user, and reject anonymous callers (see `canister-security`).\n9. **Using `u64` vs `nat` incorrectly.** Minter amounts are `nat64` lamports (`Lamport`), and ledger amounts are `nat`. `deposit_sol_fee` and `deposit_sol_required_cycles` are `nat` cycles.\n10. **Concurrent withdrawals from one principal.** `withdraw_sol` returns `AlreadyProcessing` while another withdrawal by the same principal is in progress. A custodial canister must serialize its withdrawals.\n\n## Implementation: frontend (TypeScript)\n\nThe `@icp-sdk\u002Fcanisters` package has no ckSOL module, so generate bindings from the deployed interface:\n\n```bash\nnpm i @icp-sdk\u002Fcore@^6 @icp-sdk\u002Fcanisters@^4 @dfinity\u002Futils@^5 @dfinity\u002Fic-pub-key@^1 bs58@^6\nicp canister metadata lh22c-kyaaa-aaaar-qb5nq-cai candid:service -n ic > cksol_minter.did\nnpx @icp-sdk\u002Fbindgen --did-file .\u002Fcksol_minter.did --out-dir .\u002Fsrc\u002Fbindings\n```\n\n```typescript\nimport { HttpAgent, type Identity } from \"@icp-sdk\u002Fcore\u002Fagent\";\nimport { Principal } from \"@icp-sdk\u002Fcore\u002Fprincipal\";\nimport { IcrcLedgerCanister } from \"@icp-sdk\u002Fcanisters\u002Fledger\u002Ficrc\";\nimport { createActor } from \".\u002Fbindings\u002Fcksol_minter\";\nimport { schnorr } from \"@dfinity\u002Fic-pub-key\";\nimport bs58 from \"bs58\";\n\nconst CKSOL_MINTER = Principal.fromText(\"lh22c-kyaaa-aaaar-qb5nq-cai\");\nconst CKSOL_LEDGER = Principal.fromText(\"ls5lp-lqaaa-aaaar-qb5oa-cai\");\n\nexport async function ckSol(identity: Identity) {\n  const agent = await HttpAgent.create({ identity });\n  return {\n    minter: createActor(CKSOL_MINTER.toText(), { agent }),\n    ledger: IcrcLedgerCanister.create({ agent, canisterId: CKSOL_LEDGER }),\n  };\n}\ntype Ctx = Awaited\u003CReturnType\u003Ctypeof ckSol>>;\n\n\u002F\u002F Deposit address: an update call; owner defaults to the caller when omitted.\nexport async function depositAddress({ minter }: Ctx, owner: Principal, subaccount?: Uint8Array) {\n  return minter.get_deposit_address({ owner, subaccount }); \u002F\u002F base58 Solana address\n}\n\n\u002F\u002F Same address computed offline (no IC call): mainnet Ed25519 \"key_1\",\n\u002F\u002F path = [minter canister id, [0x01], owner principal bytes, 32-byte subaccount].\nexport function deriveDepositAddressOffline(owner: Principal, subaccount: Uint8Array = new Uint8Array(32)) {\n  const master = schnorr.ed25519.PublicKeyWithChainCode.forMainnetKey(\"key_1\");\n  const path = new schnorr.ed25519.DerivationPath([\n    CKSOL_MINTER.toUint8Array(), new Uint8Array([1]), owner.toUint8Array(), subaccount,\n  ]);\n  const hex = master.deriveSubkeyWithChainCode(path).public_key.toHex();\n  return bs58.encode(Uint8Array.from(hex.match(\u002F..\u002Fg)!.map((b) => parseInt(b, 16))));\n}\n\n\u002F\u002F Track a deposit queued by deposit_sol (called by your backend, which attaches cycles).\nexport async function depositStatus({ minter }: Ctx, depositId: bigint) {\n  return minter.deposit_sol_status(depositId); \u002F\u002F NotFound | Queued | Swept | Finalized | Minted | Dropped | Quarantined\n}\n\nexport async function withdrawSol(ctx: Ctx, address: string, amountLamports: bigint) {\n  const info = await ctx.minter.get_minter_info();\n  if (amountLamports \u003C info.minimum_withdrawal_amount) throw new Error(\"below minimum_withdrawal_amount\");\n  await ctx.ledger.approve({ spender: { owner: CKSOL_MINTER, subaccount: [] }, amount: amountLamports });\n  const res = await ctx.minter.withdraw_sol({ address, amount: amountLamports });\n  if (res.__kind__ === \"Err\") throw new Error(res.Err.__kind__);\n  \u002F\u002F recipient receives amountLamports - info.withdrawal_fee\n  return res.Ok.block_index; \u002F\u002F poll withdraw_sol_status({ block_index })\n}\n\nexport async function withdrawStatus({ minter }: Ctx, blockIndex: bigint) {\n  return minter.withdraw_sol_status({ block_index: blockIndex }); \u002F\u002F NotFound | Pending | TxSent | TxFinalized\n}\n```\n\nThe user sends SOL with their own wallet (Phantom, Solflare, an exchange) to the returned address. No Solana SDK is needed in your app unless you want to build that transfer yourself.\n\n## Implementation: backend relay for `deposit_sol`\n\n### Rust\n\n`Cargo.toml` dependencies: `ic-cdk = \"0.19\"`, `candid = \"0.10\"`, `serde = { version = \"1\", features = [\"derive\"] }`, `serde_bytes = \"0.11\"`.\n\n```rust\nuse candid::{CandidType, Deserialize, Nat, Principal};\nuse ic_cdk::call::Call;\nuse ic_cdk::update;\n\nconst CKSOL_MINTER: &str = \"lh22c-kyaaa-aaaar-qb5nq-cai\";\nconst DEPOSIT_SOL_CYCLES: u128 = 1_000_000_000_000; \u002F\u002F >= get_minter_info().deposit_sol_required_cycles; unused part is refunded\n\n#[derive(CandidType, Deserialize)]\nstruct AccountArgs { owner: Option\u003CPrincipal>, subaccount: Option\u003Cserde_bytes::ByteBuf> }\n\n#[derive(CandidType, Deserialize, Debug)]\nstruct InsufficientCyclesError { expected: Nat, received: Nat }\n\n#[derive(CandidType, Deserialize, Debug)]\nenum DepositSolError {\n    InsufficientCycles(InsufficientCyclesError),\n    TemporarilyUnavailable(String),\n    AlreadyProcessing,\n    ValueTooSmall { balance: u64, minimum_deposit_amount: u64 },\n    Quarantined { deposit_id: u64 },\n}\n\nfn minter() -> Principal { Principal::from_text(CKSOL_MINTER).unwrap() }\n\nfn caller_not_anonymous() -> Principal {\n    let caller = ic_cdk::api::msg_caller();\n    assert_ne!(caller, Principal::anonymous(), \"Authentication required\");\n    caller\n}\n\n\u002F\u002F\u002F Solana deposit address of the caller's own ckSOL account (owner = caller, default subaccount).\n#[update]\nasync fn sol_deposit_address() -> Result\u003CString, String> {\n    let user = caller_not_anonymous();\n    let (address,): (String,) = Call::unbounded_wait(minter(), \"get_deposit_address\")\n        .with_arg(AccountArgs { owner: Some(user), subaccount: None })\n        .await\n        .map_err(|e| format!(\"{e:?}\"))?\n        .candid_tuple()\n        .map_err(|e| format!(\"{e:?}\"))?;\n    Ok(address)\n}\n\n\u002F\u002F\u002F After the user sent SOL to the deposit address: pay the cycles and queue the sweep.\n\u002F\u002F\u002F ckSOL is minted to the USER's account (owner = user), not to this canister.\n#[update]\nasync fn notify_sol_deposit() -> Result\u003Cu64, String> {\n    let user = caller_not_anonymous();\n    \u002F\u002F Abuse guard: this call spends ~47B cycles of THIS canister per successful deposit.\n    \u002F\u002F Add per-user rate limiting \u002F an in-flight set in production (see canister-security skill).\n    let (res,): (Result\u003Cu64, DepositSolError>,) = Call::unbounded_wait(minter(), \"deposit_sol\")\n        .with_arg(AccountArgs { owner: Some(user), subaccount: None })\n        .with_cycles(DEPOSIT_SOL_CYCLES)\n        .await\n        .map_err(|e| format!(\"deposit_sol rejected: {e:?}\"))?\n        .candid_tuple()\n        .map_err(|e| format!(\"{e:?}\"))?;\n    res.map_err(|e| format!(\"{e:?}\")) \u002F\u002F Ok(deposit_id) -> poll deposit_sol_status(deposit_id)\n}\n\nic_cdk::export_candid!();\n```\n\n### Motoko\n\n```motoko\nimport Principal \"mo:core\u002FPrincipal\";\nimport Runtime \"mo:core\u002FRuntime\";\n\npersistent actor {\n\n  type DepositSolError = {\n    #InsufficientCycles : { expected : Nat; received : Nat };\n    #TemporarilyUnavailable : Text;\n    #AlreadyProcessing;\n    #ValueTooSmall : { balance : Nat64; minimum_deposit_amount : Nat64 };\n    #Quarantined : { deposit_id : Nat64 };\n  };\n\n  transient let minter : actor {\n    get_deposit_address : shared { owner : ?Principal; subaccount : ?Blob } -> async Text;\n    deposit_sol : shared { owner : ?Principal; subaccount : ?Blob } -> async { #Ok : Nat64; #Err : DepositSolError };\n  } = actor \"lh22c-kyaaa-aaaar-qb5nq-cai\";\n\n  \u002F\u002F >= get_minter_info().deposit_sol_required_cycles (1T on 2026-11); the unused part is refunded.\n  transient let DEPOSIT_SOL_CYCLES = 1_000_000_000_000;\n\n  \u002F\u002F Solana deposit address of the caller's own ckSOL account.\n  public shared ({ caller }) func solDepositAddress() : async Text {\n    if (caller.isAnonymous()) { Runtime.trap(\"Authentication required\") };\n    await minter.get_deposit_address({ owner = ?caller; subaccount = null })\n  };\n\n  \u002F\u002F After the user sent SOL: pay the cycles and queue the sweep. ckSOL is minted to the CALLER's account.\n  \u002F\u002F Spends ~47B cycles of this canister per accepted deposit: rate-limit per user in production.\n  public shared ({ caller }) func notifySolDeposit() : async { #Ok : Nat64; #Err : DepositSolError } {\n    if (caller.isAnonymous()) { Runtime.trap(\"Authentication required\") };\n    await (with cycles = DEPOSIT_SOL_CYCLES) minter.deposit_sol({ owner = ?caller; subaccount = null })\n  };\n};\n```\n\n## Verify It Works\n\n```bash\n# Fees, minimums, required cycles\nicp canister call lh22c-kyaaa-aaaar-qb5nq-cai get_minter_info '()' -n ic --query\n\n# Deposit address for a principal (update call; any caller)\nicp canister call lh22c-kyaaa-aaaar-qb5nq-cai get_deposit_address \\\n  '(record { owner = opt principal \"YOUR-PRINCIPAL\"; subaccount = null })' -n ic\n# Expected: (\"7N9yLidkZCEvb1uWUQqRPD53KDUVXoghTF9gxJFBChDS\") — a base58 Solana address\n\n# After sending SOL: notify through a cycles-holding proxy canister you control\nicp canister call lh22c-kyaaa-aaaar-qb5nq-cai deposit_sol \\\n  '(record { owner = opt principal \"YOUR-PRINCIPAL\"; subaccount = null })' \\\n  -n ic --proxy \u003CPROXY_CANISTER_ID> --cycles 1000000000000\n# Expected: (variant { Ok = 42 : nat64 })\n\nicp canister call lh22c-kyaaa-aaaar-qb5nq-cai deposit_sol_status '(42 : nat64)' -n ic --query\n# Expected eventually: (variant { Minted = record { block_index = …; minted_amount = … } })\n\n# Withdraw 0.01 SOL\nicp canister call ls5lp-lqaaa-aaaar-qb5oa-cai icrc2_approve \\\n  '(record { spender = record { owner = principal \"lh22c-kyaaa-aaaar-qb5nq-cai\"; subaccount = null }; amount = 10_000_000 : nat })' -n ic\nicp canister call lh22c-kyaaa-aaaar-qb5nq-cai withdraw_sol \\\n  '(record { address = \"\u003CSOLANA_ADDRESS>\"; amount = 10_000_000 : nat64; from_subaccount = null })' -n ic\nicp canister call lh22c-kyaaa-aaaar-qb5nq-cai withdraw_sol_status '(record { block_index = \u003CBLOCK_INDEX> : nat64 })' -n ic\n```\n",{"name":5,"license":15,"metadata":45,"description":7,"compatibility":48},{"title":46,"category":47},"ckSOL (chain-key SOL)","DeFi","icp-cli >= 0.2.2, Node.js >= 22 for frontend code","main","0dddc7de5fe91de6c0b5c2d05c88ea9b3e3535eb","skills\u002Fchains\u002Fdfinity-official-cksol",17,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia","https:\u002F\u002Feth2030.com","Hardcore infra. Building @alt-research and applied cryptography.","2026-11-15 02:28:10",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add jiayaoqijia\u002Fcryptoskill --skill cksol",{"tool":64,"command":65},"bunx","bunx skills add jiayaoqijia\u002Fcryptoskill --skill cksol",{"tool":67,"command":68},"pnpm","pnpm dlx skills add jiayaoqijia\u002Fcryptoskill --skill cksol","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fdfinity-official-cksol\u002FSKILL.md",true,[72,76,82],{"path":73,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":16},"LICENSE","许可证",10770,{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"SOURCE.md","REFERENCE","参考文档",323,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fdfinity-official-cksol\u002FSOURCE.md",{"path":83,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":84,"sourceHtmlUrl":85},"TRUST.auto.yaml",2114,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fdfinity-official-cksol\u002FTRUST.auto.yaml",[87,97,105,113,121,129],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":96},"01M7DTKCERMV0RNX3HZJP4CZ26","troves","Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say \"Troves\" explicitly.","MIT","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-troves\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-troves\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":96},"01M7DTK6CJSMGC8KCQHGNYFZBD","trade","Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say \"swap\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-trade\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-trade\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":96},"01M7DTJZ6A0X4PAW3Y8W4J9K64","staking","Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say \"stake\" explicitly.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-staking\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-staking\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":96},"01M7DTJSDZJKCDMW7GHRF4BRH5","send","Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say \"pay 10 STRK to 0x...\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-send\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-send\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":125,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":96},"01M7DTJG1E480D51ZQ7WKDQ26K","portfolio","View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks \"what do I have\", \"show me everything\", \"how much am I worth\", \"my positions\", \"my investments\", \"rebalance my portfolio\", \"I want 50% ETH\", \"optimize my holdings\", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say \"portfolio\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-portfolio\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-portfolio\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":133,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":96},"01M7DTJ7M8TE9R2N36HFBZDGVD","multi-swap","Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions \"two swaps\", \"three swaps\", \"swap X and Y at the same time\", or wants to convert multiple tokens in a single call.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-multi-swap\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-multi-swap\u002FSKILL.md",[],[]]