Kadena Documentation

website·Indexed 33 days ago

https://kda-chain.org/docs

Documentation for the Kadena decentralized programmable proof-of-work blockchain. Includes comprehensive guides on the Pact smart contract language, Pact 5 REPL functions, Chainweb CLI usage, and the kadena wallet command for managing onchain accounts.

Tokens
214K
Snippets
1.1K
Records
1.7K
Agent score
63%

What's inside Kadena

  1. Overview of the Kadena RWA token standard

    The Kadena RWA token standard provides a set of open-source smart contracts written in Pact for issuing, managing, and transferring permissioned tokens on the Kadena blockchain. It is designed to be similar to the Ethereum ERC-3643 standard, enabling the tokenization of physical assets (e.g., real estate, art, commodities) and financial instruments (e.g., stocks, bonds) while ensuring regulatory compliance and permissioned tracking for institutional investors.
  2. Overview of the Marmalade Token Standard

    Marmalade is Kadena's token standard for minting and securing digital items. Unlike standard NFT frameworks, it is a poly-fungible standard, meaning it supports tokens that are fully fungible (interchangeable coins), partially fungible (limited editions), or completely non-fungible (unique items). It utilizes smart contracts for minting and token policies to govern ownership, transfers, and royalties.
  3. Overview of Kadena Chainweb EVM Cross-Chain Architecture

    Kadena Chainweb EVM allows the Ethereum Virtual Machine to run in parallel with Pact while maintaining Chainweb's Proof-of-Work consensus. It enables cross-chain transactions without relayers, oracles, or third-party coordinators by utilizing a shared view of state across chains.

    Cross-chain activity follows a three-step process:

    1. Event Initiation: A smart contract on a source chain emits a well-defined cross-chain event (e.g., a token transfer).
    2. Proof Generation: An off-chain endpoint generates a Simple Payment Verification (SPV) proof (or similar) that uniquely identifies the event on the source chain and the target contract.
    3. Event Observation: The user relays the proof to the target chain, which verifies it against the shared history and completes the transaction (e.g., minting tokens).
  4. Overview of Pact database operations

    Pact smart contracts use a key-row data access model similar to primary keys in relational databases. While it supports relational techniques (e.g., looking up a record in one table before writing to another), it does not support traditional SQL-style table joining.

    Key operational constraints include:

    • No NULL values: To ensure transaction totality and safety, NULLs are not allowed. Functions like with-read will return an error if a column value is not found.
    • No Delete function: Pact does not provide a native delete operation. To remove data, developers typically implement an active column to mark rows as active or inactive.
    • Versioned History: Every change to a column value is versioned by a transaction identifier, allowing for historical data retrieval of specific changes per transaction.
  5. Overview of the Marmalade Royalty Policy

    The royalty policy extends the base kip.token-policy-v2 interface to implement specific rules for token actions and royalty payouts during the sale of non-fungible tokens (NFTs).
  6. Overview of Pact-5 Guard functions

    Guard functions in Pact-5 are used to create and manage account principals and enforce guard predicate functions. These functions allow developers to define conditions that must be true to grant specific capabilities or validate the identity of a principal within a transaction.
  7. Overview of Pact capabilities

    Pact capabilities are an access control model for smart contracts used to authorize specific actions for specific users. They provide a transparent way to protect privileged operations and enforce rules before transactions execute. There are three primary use cases for capabilities:

    1. Basic Capabilities: Manage permissions by enforcing conditions (e.g., checking account balances or guards) to authorize privileged operations.
    2. Managed Capabilities: Manage values for protected resources, allowing users or contracts to set/update specific parameters (e.g., transaction limits).
    3. Event Capabilities: Emit events in transaction results.
  8. Overview of PACT-5 time manipulation functions

    PACT-5 provides a set of functions to manage and manipulate time-based information. These include utilities for constructing time objects, calculating differences, and adjusting time by specific intervals.
    FunctionDescription
    add‑timeAdd a specified number of seconds to a time.
    daysSpecify a number of days to add or subtract days from a given time.
    diff‑timeCompute the difference in seconds between two specified times.
    format‑timeFormat a time value using a specified format.
    hoursAdd a specific number of hours to a given time.
    minutesAdd a specific number of minutes to a given time.
    parse‑timeConstruct time from a UTC value using a specified format.
    timeConstruct a time object from a UTC value using the %Y-%m-%dT%H:%M:%SZ format.
  9. Overview of Chainweb Layer-1 Network

    Chainweb is a sharded Layer-1 Proof-of-Work (PoW) network that scales by braiding together multiple Bitcoin-like chains to achieve high throughput while maintaining security.
  10. Overview of Pact REST API endpoints

    The Pact REST API allows developers to execute contract functions, test transactions locally, submit transactions to the blockchain, and retrieve results. These endpoints are available via Chainweb service APIs on nodes or locally through the Pact built-in HTTP server.

    Key endpoint functionalities include:

    • Send: Submit transactions to the blockchain for execution.
    • Local: Execute read-only queries or simulate transactions without affecting blockchain state.
    • Listen: Set up listeners for blockchain events or transaction results.
    • Poll: Check the status of previously submitted transactions.
    • SPV: Verify transaction inclusion for cross-chain transactions using simple payment verification proofs.
  11. Overview of Kadena Smart Contract Development Documentation

    The Kadena developer documentation is structured into three main areas to support the development of smart contracts using the Pact programming language:

    1. Smart Contracts: Focuses on learning the Pact language, understanding blockchain-specific concepts, and implementing common programming patterns for secure applications.
    2. Reference: Provides technical specifications for Pact syntax, keywords, built-in functions, and the command-line interfaces (CLI) used to interact with the Kadena blockchain across development, test, and production environments.
    3. Coding Projects: Offers hands-on coding challenges and sample projects located in the pact-coding-projects repository to apply theoretical knowledge to real-world use cases.
  12. Overview of Chainweaver for Pact Development

    Chainweaver is an integrated development environment (IDE) for the Pact programming language on the Kadena blockchain. It manages wallets, accounts, and keys while providing tools for writing, testing, and deploying smart contracts. Key capabilities include:

    • A built-in Read-Eval-Print-Loop (REPL) for interactive code execution.
    • Smart contract module and function exploration.
    • Management of authorization rules via keysets.
    • Deployment and updating of contracts on local development, test, and main networks.