CKB Pulse
Lições

O 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.

Básico

5 lições encontradas. Todas as lições

Occupied capacity minimum for every outputBásicoDe uma correção

Every output must hold at least its occupied capacity: (8 for the capacity field + 33 + lock args length, plus 33 + type args length if a type script is present, plus data length) × 10^8 shannons. That is 61 CKB for a plain secp256k1 lock with 20 byte args and 63 CKB for a JoyID lock. A fixed payout or fee output set below the recipient lock's minimum is rejected, so choose a constant at or above the largest minimum among the locks you accept.

#Capacity and cell size #Transaction building and fees · Fontes (2) · 2026-11-15

Keep at least 61 CKB in the change cell when sending from a secp256k1 walletBásicoDe uma correção

A plain secp256k1_blake160 cell occupies 61 CKB, so when a wallet sends X it must keep at least 61 CKB (the occupied capacity of its own lock) in the change cell, plus the fee, and refuse the send otherwise. The recipient output must also be at least the occupied capacity of the recipient's lock, never less than 61 CKB for a plain address. Enforce the change floor in the transaction builder, and use extra headroom (this runner uses threshold >= amount + 100) for automatic sweeps so fee and change always fit.

#Capacity and cell size #Transaction building and fees · Fontes (1) · 2026-10-21

Plain CKB transfer with a CCC signerBásicoDe uma correção

With CCC, a simple CKB transfer is built as ccc.Transaction.from({ outputs: [{ lock, capacity }] }), then transaction.completeInputsByCapacity(signer) and transaction.completeFeeBy(signer) are called before signer.sendTransaction(transaction). The recipient lock comes from ccc.Address.fromString(address, signer.client), and its .script is used as the output lock.

#Transaction building and fees #Witnesses and signatures · Fontes (1) · 2026-10-12

CKB blake160 is the first 20 bytes of the 32 byte ckbhashBásicoDe uma correção

CKB blake160, used for lock args and pubkey hashes, is the first 20 bytes of the 32 byte blake2b digest personalized with "ckb-default-hash". A blake2b hasher configured with a 20 byte output length gives a different value, because the digest length is part of blake2b's parameter block. Always hash to 32 bytes and then truncate.

#Data encoding (molecule, hex, bigints) #Witnesses and signatures · Fontes (1) · 2026-10-09

Output type scripts need cell deps too, including the native DAO typeBásicoDe uma correção

CKB runs the type script of every output (not only input locks and input types), so a transaction that creates a native DAO deposit must include the DAO type's code cell (genesis tx0 index 2) as a cell dep, or the node rejects it with ScriptNotFound on Outputs[i].Type. Pre-send checks that only verify deps for input locks will miss this; check every input lock, input type and output type, deduplicated by code_hash and hash_type.

#Cell deps and script lookup #Transaction building and fees · Fontes (1) · 2026-10-05

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.