Skip to content

Go SDK RPC Result Models

RPC wrappers decode node responses into structs under pkg/rpc/response. Large chain amounts are exposed as strings when the node result uses string values.

Common Field Rules

Field patternMeaning
Amount, CurrentSupply, MaxSupply, Fee, PriceBase-unit numeric strings unless a helper formats decimals.
DecimalsNumber of decimal places used for display formatting.
Hash, BlockHash, Script, Payload, Result, Rom, RamHex or encoded strings returned by the node.
CarbonID, CarbonTokenID, CarbonSeriesID, CarbonNFTAddressCarbon identifiers used to reconcile RPC reads with Carbon transaction results.
StateExecution state. Use StateIsSuccess() and StateIsFault() instead of comparing one spelling.

Helpers

HelperPurpose
BalanceResult.Clone()Returns a deep copy of a balance row.
BalanceResult.ConvertDecimals()Formats Amount with the row’s Decimals.
BalanceResult.ConvertDecimalsToFloat()Returns the formatted amount as *big.Float.
StakeResult.ConvertDecimals()Formats stake amount with 8 decimals.
AccountResult.Clone()Deep-copy account balances.
AccountResult.GetTokenBalance(token)Finds a token balance or appends a zero row using token decimals.
TransactionResult.StateIsSuccess()Returns true for success states.
TransactionResult.StateIsFault()Returns true for fault/break states.
TokenResult.IsBurnable() and related helpersChecks comma-separated token flags.
ScriptResult.DecodeResultWithError()Decodes the single VM result hex string into VMObject.
ScriptResult.DecodeResultsWithError(index)Decodes an indexed VM result.

Pagination

ModelFields
PaginatedResult[T]Page, PageSize, Total, TotalPages, Result
CursorPaginatedResult[T]Result, Cursor

Use cursor pagination for Carbon inventory reads and numeric pagination for older page/page-size endpoints such as auctions and address transaction history.

Account And Balance Models

ModelFields and helpers
BalanceResultChain, Amount, Symbol, Decimals, Ids; helpers: Clone, ConvertDecimals, ConvertDecimalsToFloat
StakeResultAmount, Time, Unclaimed; helpers: decimal formatting
StorageResultAvailable, Used, Avatar, Archives
AccountResultAddress, Name, Stakes, Stake, Unclaimed, optional Relay, Validator, Storage, Balances, optional Txs; helpers: Clone, GetTokenBalance
AddressTransactionsResultAddress, Txs

Chain, Nexus, And Organization Models

ModelFields
InteropResultLocal, External
PlatformResultPlatform, Chain, Fuel, Tokens, Interop
GovernanceResultName, Value
OrganizationResultName, Owner, CarbonOwner, Metadata, MemberCount
OrganizationMemberResultAddress, CarbonAddress, IsMember, MemberTime
CrowdsaleResultHash, Name, Creator, Flags, StartDate, EndDate, SellSymbol, ReceiveSymbol, Price, GlobalSoftCap, GlobalHardCap, UserSoftCap, UserHardCap
ChainResultName, Address, Parent, Height, Organization, Contracts, Dapps
NexusResultName, Protocol, Platforms, Tokens, Chains, Governance, Organizations
LeaderboardResultName, Rows

Block, Transaction, Event, And Script Models

ModelFields and helpers
EventResultAddress, Contract, Kind, Name, Data
OracleResultURL, Content
SignatureResultKind, Data
TransactionResultHash, ChainAddress, Timestamp, BlockHeight, BlockHash, Script, Payload, CarbonTxType, CarbonTxData, optional DebugComment, Events, ExtendedEvents, State, Result, Fee, Signatures, Sender, GasPayer, GasTarget, GasPrice, GasLimit, Expiration; helpers: StateIsSuccess, StateIsFault
BlockResultHash, PreviousHash, Timestamp, Height, ChainAddress, Protocol, Txs, ValidatorAddress, optional ProducerAddress, Reward, optional Events, optional Oracles
ScriptResultEvents, Result, Results, Oracles, optional Error, optional State, optional Gas; helpers: VM result decoding

For a contract event, Kind is Custom_V2 and Name is the event name the contract declared. For every other event, Name repeats Kind.

ProducerAddress is the fee payout address that the block producer stamped inside the hashed block input. It is set on gas model v2 blocks and nil on earlier blocks. It is a different field from ValidatorAddress, which names the consensus-log leader. Do not assume the two are equal.

Token, NFT, Schema, And Price Models

ModelFields and helpers
TokenPropertyResultKey, Value
TokenExternalResultPlatform, Hash
TokenPriceResultTimestamp, Open, High, Low, Close
VMVariableSchemaResultType, Schema
VMNamedVariableSchemaResultName, Schema
VMStructSchemaResultFields, Flags
TokenSchemasResultSeriesMetadata, ROM, RAM
TokenSeriesResultSeriesID, CarbonTokenID, CarbonSeriesID, OwnerAddress, MaxMint, MintCount, CurrentSupply, MaxSupply, BurnedSupply, Mode, Script, Methods, Metadata
TokenResulttoken definition fields, CarbonID, optional metadata, schemas, external mappings, price rows; helpers: IsBurnable, IsDivisible, IsFiat, IsFinite, IsFuel, IsFungible, IsMintable, IsStakable, IsTransferable
TokenDataResultNFT id, series, Carbon identifiers, owner/creator, ROM/RAM, status, infusion, properties

Keep token definition, series metadata, and NFT instance data separate in application storage. They have different identities and update paths.

Contract, Auction, Archive, And Network Models

ModelFields
ABIParameterResult, ABIMethodResult, ABIEventResultContract ABI field, method, and event shapes.
ContractResultName, Address, Script, Owner, Methods, Events
AuctionResultcreator/chain addresses, dates, base/quote symbols, token id, prices, type, ROM/RAM, listing fee, current winner
ArchiveResultoptional Name, optional Hash, Time, Size, optional Encryption, BlockCount, optional MissingBlocks, optional Owners
BuildInfoResultVersion, Commit, BuildTimeUTC
PhantasmaVMConfigResultstored flag, feature level, gas settings, and deploy fuel setting

Auction and archive models are for marketplace/storage endpoints. Network models such as peers, validators, swaps, and receipts are mostly used by explorers and operational tooling.