Taquito TypeScript SDK for Tezos

repository·main·Indexed 43 days ago

https://github.com/ecadlabs/taquito

A TypeScript library for interacting with the Tezos blockchain. Version 25.0.0 includes packages for Beacon Wallet integration (@taquito/beacon-wallet), Ledger Nano signing (@taquito/ledger-signer), contract data caching (@taquito/contracts-library), and HTTP utilities (@taquito/http-utils).

Tokens
375.9K
Snippets
1K
Records
1.4K
Agent score
52%

What's inside Taquito

  1. What is Taquito?

    main

    Taquito is a JavaScript/TypeScript library designed for interacting with the Tezos blockchain, primarily used in dApps, wallets, and other tools. It abstracts the complexity of blockchain operations, including:

    1. Estimating operation costs
    2. Encoding operations
    3. Signing operations
    4. Injecting operations
    5. Retrieving operation receipts
    6. Monitoring the chain for inclusion
  2. Overview of the Michelson Encoder

    main

    The Michelson-Encoder package provides an abstraction over the Michelson language. It allows developers to convert Michelson data into JavaScript-friendly objects, making it easier to manage storage when deploying contracts and parameters when calling contract entry-points.

    Integration with the main Taquito package simplifies the process of writing structured data for Tezos smart contracts.

  3. Overview of the Michelson Encoder package

    main

    The Michelson-Encoder package provides an abstraction over the Michelson Language. It enables the conversion of Michelson data into JavaScript-friendly objects, making it easier to reason about and manipulate.

    In the context of the main Taquito package, this abstraction simplifies writing storage data when deploying contracts and defining parameters when calling contract entry-points.

  4. Compatible Tezos wallets for dApps

    main

    To ensure compatibility with Tezos dApps using Taquito, use wallets that support the TZIP-10 Wallet Interaction standard. Wallets supporting TZIP-10 allow for seamless interaction between the dApp and the user's wallet.

    NameTypeTZIP-10Product Website
    TempleBrowser ExtensionYeshttps://templewallet.com
    KukaiWebYeshttps://wallet.kukai.app
    UmamiDesktopYeshttps://umamiwallet.com
    Ledger NanoSHardware WalletN/Ahttps://www.ledger.com
    Ledger NanoXHardware WalletN/Ahttps://www.ledger.com
    ExodusDesktop and MobileNohttps://www.exodus.com/tezos-wallet-xtz
    Trust WalletMobileNohttps://trustwallet.com
  5. Understand Taquito's testing strategies

    main

    Taquito employs a multi-layered testing strategy to ensure library reliability and prevent regressions. The strategy includes:

    • Unit Tests: Atomic tests for individual components, often using mocks for external dependencies.
    • Integration Tests: Verifies that multiple components work together, typically by sending instructions to a live Tezos testnet node.
    • End-to-End (E2E) Tests: Exercises the full stack from the blockchain node to user interfaces (e.g., using the Taquito Test Dapp).
    • Mutation Testing: Uses tools like Stryker to verify unit test effectiveness by ensuring tests fail when code is intentionally mutated.
    • Security Tests: Integrated into the test suite to check for regressions against known Tezos attack techniques.
    • Manual & Exploratory Testing: Used for complex scenarios like Ledger device interactions or verifying user-reported issues.
  6. Compatible Tezos wallets for Taquito

    main

    When building Tezos dApps with Taquito, you can use various wallet types. For seamless interaction, it is recommended to use wallets that support the TZIP-10 Wallet Interaction standard. TZIP-10 compliant wallets allow for standardized communication between the dApp and the wallet provider.

    TZIP-10 Compliant Wallets

    • Temple (Browser Extension)
    • Kukai (Web)
    • Umami (Desktop)

    Other Supported Wallets

    • Ledger NanoS / NanoX (Hardware Wallets)
    • Exodus (Desktop and Mobile)
    • Trust Wallet (Mobile)
  7. Compatible Tezos wallets for dApp development

    main

    When building Tezos dApps with Taquito, you should target wallets that support the TZIP-10 Wallet Interaction standard to ensure seamless user interaction.

    Supported wallets include:

    • Temple (Browser Extension, TZIP-10 compatible)
    • Kukai (Web, TZIP-10 compatible)
    • Umami (Desktop, TZIP-10 compatible)

    Other common wallets that may require different integration patterns include:

    • Ledger NanoS/NanoX (Hardware Wallets)
    • Exodus (Desktop/Mobile, does not support TZIP-10)
    • Trust Wallet (Mobile, does not support TZIP-10)
  8. Understand Taquito testing strategies

    main

    Taquito employs a multi-layered testing strategy to ensure library reliability and prevent regressions. The strategy includes:

    • Unit Tests: Atomic tests of individual components, often using Mocks to simulate external dependencies.
    • Integration Tests: Verifying that multiple components work together, typically by sending instructions to a live Tezos test node and verifying blockchain state changes.
    • End-to-End (E2E) Tests: Exercising the full stack from the blockchain node to the user interface using the Taquito Test dApp and Live Code examples.
    • Mutation Testing: Using tools like Stryker to verify unit test effectiveness by ensuring tests fail when code is intentionally mutated.
    • Security Tests: Integration tests specifically designed to check for regressions in Tezos code that could enable known attack techniques.
    • Manual & Exploratory Testing: Used for issue verification and hardware-specific testing (e.g., Ledger devices) that requires physical interaction.
  9. What is the Keygen API?

    main

    The Keygen API is a testing utility designed to generate and manage ephemeral Tezos key pairs (public and private keys). It allows developers to simulate transactions and smart contract interactions without using real funds or permanent accounts.

    In the integration test workflow, the user requests an ephemeral key, receives a Lease ID, and uses that ID to create a remote signer. The Keygen API manages the lifecycle of these keys in Redis, ensuring they are returned to the pool after use.

  10. What is the multisig contract?

    main

    The multisig contract (provided by tezos-client) allows a group of users to control specific actions through consensus. It supports three main actions:

    1. Receiving Tez: Anyone can send tez to the contract via the default entrypoint.
    2. Transferring Tez: Transferring stored tez to a specific address (requires participant agreement).
    3. Updating Participants: Changing the threshold and the list of authorized keys (requires participant agreement).

    Security Mechanism: To execute a transfer or change_keys action, a transaction must be sent containing a payload and a list of signatures. The number of signatures must meet or exceed the current threshold stored in the contract. The contract also maintains a counter that increments with every successful transaction to prevent replay attacks.

  11. What is Taquito and its purpose

    main

    Taquito provides a high-level JavaScript (implemented in TypeScript) interface to the Tezos blockchain. It is designed for developing token-based applications (Decentralized Applications or dApps) that leverage the conditional exchange of native tokens for goods and services.

    Beyond client-side dApps, Taquito's scope includes the development of backend systems, such as Oracles, which are critical components of token-based ecosystems.