Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

IoTeX Documentation home pagelight logodark logo
  • iotex.io
  • iotex.io
Home
IoTeX L1 Blockchain
ioID On-chain Identities
Realms
DePIN Infra Modules
  • IoTeX L1 Blockchain

Quick Start

  • Quick Start
  • Deploy a simple contract
  • Build a client for your contract

Build

    • Reference Docs
      • Native IoTeX Development
      • IoTeX gRPC API
      • Account Cryptography
      • Address Conversion
      • Create Accounts
      • Estimate Gas Price
      • Make IOTX Transfers
      • Manage ERC20 Tokens
      • Smart Contract Interactions
      • ioPay Desktop
      • DID JWT Tokens
      • Calling any RPC method

Learn Iotex

  • Exchange Integration

Ecosystem

  • iotube Bridge
  • iotexscan Explorer

Participate

  • Join the Community
  • Get in Touch
Native IoTeX Development

Create Accounts

  • Javscript
  • Go Lang
  • Swift
  • Java
import Antenna from "iotex-antenna";

(async () => {
  const antenna = new Antenna("https://api.testnet.iotex.one");

  // create a new wallet which contains a public key, a private key, and an address.
  const wallet = antenna.iotx.accounts.create();

  // recover the whole wallet from a single private key
  const unlockedWallet = antenna.iotx.accounts.privateKeyToAccount(
    "69805ee813eadffa8fae53d0e6063e5fbf6a6e0fb9e90f6eaad7bc67f3d6c4bd"
  );

  // get the balance, nonce, number of actions, pendingNonce of the account
  const accountDetails = await antenna.iotx.getAccount({
    address: wallet.address
  });
})();package main
package main

import (
	"fmt"
	"log"

	"github.com/iotexproject/iotex-antenna-go/v2/account"

)

func main() {

	// create a new wallet which contains a public key, a private key, and an address.
	wallet, err := account.NewAccount();
	if err != nil {
		log.Fatal(err)
	}

	// recover the whole wallet from a single private key
	acc, err := account.HexStringToAccount("69805ee813eadffa8fae53d0e6063e5fbf6a6e0fb9e90f6eaad7bc67f3d6c4bd")
	if err != nil {
		log.Fatalf("create account error: %v", err)
	}
	fmt.Println(acc.Address)
}
// create account from private key
let account = try Account(privateKey: "0806c458b262edd333a191e92f561aff338211ee3e18ab315a074a2d82aa343f")
let iotx = try IOTX(provider: "api.testnet.iotex.one:443", secure: true)

// query account meta
let response = try iotx.currentProvider().getAccount(Iotexapi_GetAccountRequest.with {
    $0.address = account.address
})
print(response)
// create account from private key
Account account = IotexAccount.create(IotexAccountTest.TEST_PRIVATE);
IOTX iotx = new IOTX("api.testnet.iotex.one:80");

Address Conversion
Estimate Gas Price
xgithub