Skip to main content
ALL CHAINS

Common Pitfalls

Elastos spans multiple chains with different curves, address formats, and fee models. These are the mistakes developers hit most often — organized by chain so you can jump to what matters.

The P-256 / secp256k1 Confusion

Problem: You generate a key pair using a standard Bitcoin/Ethereum library and try to sign a main chain transaction. The signature is invalid.

Root cause: The ELA main chain uses NIST P-256 (secp256r1). Every standard crypto library in the Bitcoin/Ethereum ecosystem defaults to secp256k1.

Solution: Use the Elastos Wallet JS SDK for main chain operations. For ESC/EID, standard Ethereum libraries work fine.

Wrong approach
// This uses secp256k1 internally
import { Wallet } from "ethers";
const wallet = Wallet.createRandom();
// This wallet CANNOT sign main chain transactions
Correct approach
import { HDKey } from "@elastosfoundation/wallet-js-sdk";
const masterKey = HDKey.fromMasterSeed(seed, HDKey.CURVE_P256);

Using Ethereum Address for Main Chain

Problem: You send ELA to a 0x address on the main chain. The transaction is rejected.

Root cause: Main chain uses Base58Check addresses (starting with E), not hex addresses.

Solution: Always use the correct address format for each chain:

  • Main chain: Base58Check (e.g., E...)
  • ESC/EID: 0x... (hex, EIP-55)