Contract Kit Overview

The Contract Kit is an SDK focused on managing and interacting with existing Antelope-based smart contracts.

It’s primary responsibilities are:

  • To facilitate the creation of actions to interact with smart contracts.
  • To provide an interface for retrieving data from smart contract tables.

This section of the documentation offers a technical overview of all of the components surfaced by the Contract Kit. For step-by-step guides and tutorials, please visit the Contract Kit Guides.

Classes

The Contract Kit exports many classes for use in various types of applications. This page provides a brief overview of the major components, each of which link to their own individual documentation.

ContractKit

The core component of Wharf’s Contract Kit is named after the SDK itself and offers itself as a customizable factory class. The ContractKit gives developers methods to dynamically create Contract instances based on existing smart contracts within a client application.

Contract

Developers working with the Contract Kit will primarily be working with Contract instances, whether created by the ContractKit factory load method or included through generated code from the command line interface. A Contract instance is a wrapper for a specific smart contract on an Antelope-based blockchain. Each Contract instance offers a table method that allows Table to be created and an action method that allows Action instances to be created.

Table

The Table class is a wrapper for Antelope smart contract tables. It offers several helper methods such as get and query to help retrieve table rows without needing to manually define every query for an API. Each response from a table method will either return a typed object that mirrors the structure defined in the ABI or a TableCursor that allows iteration through many rows.