{% hint style="warning" %} This documentation is provided for backward compatibility support. IoTeX is fully Ethereum-compatible; therefore, developers are encouraged to utilize Ethereum tools to build dApps on IoTeX. {% endhint %}
Antenna is the IoTeX native SDK, enabling direct interaction with a local or remote IoTeX node using a gRPC connection. It is available for the most popular programming languages. The key difference between developing with Antenna versus the Web3 SDK is that Antenna wraps the full gRPC Native API of the IoTeX protocol and uses the native representation of IoTeX addresses.
While IoTeX fully supports the Ethereum API, allowing the use of Web3 tools for dApp development, IoTeX's architecture is more complex than Ethereum's. This makes Antenna the necessary choice when leveraging IoTeX's unique features. For example, concepts such as "Delegates," "Block Producers," "Staking Transactions," "Buckets," and "Voting" have no equivalents in Ethereum. Therefore, to utilize these features in your dApp, you need to use Antenna instead of tools like Web3.js.
The Example Code section includes samples for each supported language.
In your JS project root, use npm install
or yarn add
.
npm install iotex-antenna
or add the following line to your html.
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/iotex-antenna.browser.min.js"></script>
A few useful links:
- Reference Code: the docs section with reference implementation for most common blockchain requirements.
- Integrate IoPay Wallet: the docs section explaining how to integrate your web client with IoPay Wallet
- Antenna-JS Reference: the API reference documentation for Antenna-JS
<dependency>
<groupId>com.github.iotexproject</groupId>
<artifactId>iotex-antenna-java</artifactId>
<version>0.5.8</version>
</dependency>
implementation 'com.github.iotexproject:iotex-antenna-java:0.5.8'
In your Golang project root, use go dep
or go mod
.
go get -u github.com/iotexproject/iotex-antenna-go
A few useful links:
- Reference Code: the docs section with reference implementation for most common blockchain requirements.
- Code Examples section for most common SDK use case in Go.
In your JS project root, use npm install
or yarn add
.
pod 'iotex-antenna-swift', '~> 0.1'
A few useful links:
- Reference Code: the docs section with reference implementation for most common blockchain requirements.
Download the latest release of Antenna Embedded, then in your C file include the following:
#include "u128.h"
#include "iotex_emb.h"
int main(int argc, char **argv) {
int ret;
iotex_st_config config = {0};
config.ver = 1;
config.cert_file = "cacert.pem";
/* Initialize Antenna-c lib */
if ((ret = iotex_emb_init(&config)) != 0) {
fprintf(stderr, "Initialize iotex emb failed, error code: %d\n", ret);
return -1;
}
// Interact with the blockchain
// ...
- Crypto: Provides cryptographic functions to generate public/private keys, sign transactions and data, and other utility functions.
- RPC-Methods: Allows calling any RPC method provided by an IoTeX Blockchain Gateway.
- Account: Functions to create and manage blockchain accounts.
- Action: Enables creation and management of blockchain actions.
- Contract: Facilitates interaction with contracts deployed on the IoTeX Blockchain, given the contract address and ABI.
- XRC20: Supports sending, receiving, and querying wallets for XRC20 tokens deployed on the IoTeX Blockchain.