LiçõesO que a CKB aprendeu
Começa aqui · Glossário · Testa-te · Feed
As lições estão escritas em inglês, por isso pesquise em inglês.
“Login and authorization” ✕
6 lições encontradas. Todas as lições
To support every CCC wallet without the @ckb-ccc/connector UI, call `new ccc.SignersController().refresh(client, callback, {name, icon})`. Keep the callback registered and update the picker, because it fires again as EIP-6963 wallets announce themselves. Treat signers that are `instanceof ccc.SignerDummy` as download links, not connectable wallets.
Medium confidence.
#Witnesses and signatures #Login and authorization · Fontes (1) · 2026-11-12
A CCC signer for MetaMask can control more than one CKB lock (Omnilock addresses and the legacy PW-lock address used by Portal Wallet), and getRecommendedAddressObj returns only one of them. When assets such as Nervos DAO deposits may sit under any of them, call signer.getAddressObjs(), dedupe by script hash and check each, rather than assuming the recommended address holds the funds.
#Indexer queries and cell collection #Login and authorization · Fontes (1) · 2026-11-06
When an off-chain signature proof is verified by running the lock against cell deps read live from the chain, record every out point those deps resolved to, dep group members included. Treat the resulting authorization as valid only while all of those cells are still live. A lock upgrade, a redeployment, or a key rotation or recovery in a lock that keeps its keys in a dep cell spends one of them, and the owner must prove again.
#Cell deps and script lookup #Login and authorization · Fontes (1) · 2026-11-04
CCC's ccc-connector element emits close before it announces a newly chosen wallet, every time. After the wallet connects, the selection scene asks the dialog to close and fires its connected event only from the close callback; the public connection event then waits for one more asynchronous isConnected() call. Treating close as a cancel therefore loses the connection. On close, check whether a wallet was chosen (the example reads el.walletName and el.signerName) and, if so, wait for the connection event for a bounded time before rejecting.
Checked against the CCC source in @ckb-ccc/connector 2.3.2 (9ffef01) and 2.4.0 (e10b99d): scenes/selecting/index.ts (connectSigner) and connector/index.ts (close, handleConnected, updateSigner).
#Login and authorization · Fontes (1) · 2026-10-12
A JoyID passkey from a second device is a sub key, so deriving the JoyID lock from the signer's public key does not find the account. Given the account's address, call JoyID's CoTA aggregator method generate_subkey_unlock_smt with alg_index 1 (the passkey algorithm), pubkey_hash set to the first 20 bytes of ckbHash(pubkey) for the same pubkey bytes JoyID signs with, and lock_script set to the serialized lock; a non-empty result.unlock_entry means the key belongs to that account. The aggregator is trusted and its SMT proof is not checked against the chain, and the positive case was not run against a real sub key here.
#Witnesses and signatures #Login and authorization · Fontes (1) · 2026-10-12
When mapping an Ethereum address to the CKB lock scripts it controls, match Omnilock args 0x12 || addr20 || 0x00 (Ethereum displaying, used by CCC's EVM signer for new addresses) as well as 0x01 || addr20 || 0x00 and PW Lock args = addr20. Otherwise deposits held by CCC created EVM addresses are not recognised. The commit notes this is still pending confirmation in a wallet proof of concept.
#Witnesses and signatures #Login and authorization · Fontes (1) · 2026-10-08
Texto sob CC BY 4.0: dá crédito à LusoCryptoLabs, CKB lessons, com uma ligação para a lição. JSON · Queres que uma lição seja mudada ou retirada? Abre um issue.