Skip to content

C++ SDK API Overview

The header groups of the C++ SDK and their main types. The reference pages list every method, result field, wire structure and helper.

RPC

APIPurpose
rpc::PhantasmaAPI (PhantasmaAPI.h)Typed RPC calls through an adapter’s HttpClient, which takes the node’s base URL. Each method fills an optional PhantasmaError.
rpc::PhantasmaJsonAPIMake...Request and Parse...Response pairs for an application that owns its transport.
Adapters/*RapidJSON and libcurl, or CppRestSDK, for JSON and HTTP; OpenSSL for the cryptography.

Details: RPC Client, RPC Result Models.

Keys, Addresses And Hashes

APIPurpose
PhantasmaKeysEd25519 key pair: generation, WIF, address, signing.
AddressText and byte forms, kinds, system addresses from names.
Ed25519Signature, Hash, PrivateKeySignatures, hashes, the guarded private key.

Details: Keys And Addresses.

VM And Script Transactions

APIPurpose
ScriptBuilder (VM/ScriptBuilder.h)VM bytecode: contract and interop calls, gas, transfers, staking, low-level emitters.
Transaction (Blockchain/Transaction.h)The script transaction: signing, serialization, proof of work.
VMObject (VM/VMObject.h)VM values, such as the results of a read-only script.
Utils/RpcUtils.hSignAndSendTransaction, DefaultScriptExpiration, the confirmation helpers.

Details: VM And Transactions, VM and Transaction APIs.

Carbon

APIPurpose
NativeTxHelperTransfers, mints and burns without a script.
CreateTokenTxHelper, CreateTokenSeriesTxHelper, MintPhantasmaNonFungibleTxHelperToken, series and NFT mint messages, and the parsers of their results.
TokenInfoBuilder, TokenMetadataBuilder, TokenSchemasBuilder, SeriesInfoBuilder, TokenSeriesMetadataBuilder, PhantasmaNftRomBuilderToken, schema, series and ROM data.
PlanFees, ChainFeePlanner, SummarizeFeePlan, TxLimits, ExpiryWithinFee planning and lifetimes.
TxMsgSigner, SignAndSerialize, ParseTx, ParseSignedTxSigning and reading messages.
PreflightTransaction, SendTransactionThe symbol check, and build, plan, check, sign and send in one call.

Details: Carbon, Carbon Operations, Carbon API and Wire Format.

Fees

Under gas model v2 the chain bills every byte a transaction puts in the block and escrows SOUL for new storage. Builders carry no prices, so a message is planned before it is signed.