Skip to content

Node RPC Models

The objects that the methods return, with their fields as they appear in the JSON answer. A field whose value is null is left out. Amounts are integer strings in the smallest unit of their token. Hashes and binary data are hexadecimal strings.

ABIEventResult

An event that a contract declares in its ABI.

FieldTypeDescription
valuenumberThe event kind number.
namestringThe event name.
returnTypestringThe type of the event data, a VM type name such as Number, String, Bytes, or None.
descriptionstringThe description script of the event, in hexadecimal.

ABIMethodResult

A method that a contract declares in its ABI.

FieldTypeDescription
namestringThe method name.
returnTypestringThe return type, a VM type name such as Number, String, Bytes, Bool, Timestamp, Struct, or None.
parametersarray of ABIParameterResultThe parameters, in order.

ABIParameterResult

A parameter of a contract method.

FieldTypeDescription
namestringThe parameter name.
typestringThe parameter type, a VM type name.

AccountInfoResult

The registered name and the SOUL stake of an address. getAccountInfo and getAccountInfos return it.

FieldTypeDescription
addressstringThe address, as given in the request; for a Carbon request, its Phantasma form.
namestringThe registered name, or anonymous.
stakeStakeResultThe SOUL stake. All zero when the address does not stake.

AccountResult

The name, the stake, and the balances of an address. The deprecated getAccount and getAccounts return it.

FieldTypeDescription
addressstringThe address, as given in the request.
namestringThe registered name, or anonymous.
stakesStakeResultThe SOUL stake.
stakestringThe staked SOUL, the same value as stakes.amount.
unclaimedstringThe KCAL earned and not yet claimed, the same value as stakes.unclaimed.
relaystringNot filled by the node.
validatorstringAlways Invalid.
storageStorageResultAlways empty.
balancesarray of BalanceResultEvery token balance of the address, staked SOUL excluded.
txsarray of stringNot filled by the node.

AccountTransactionsResult

The transactions of an address, the result of a getAddressTransactions page.

FieldTypeDescription
addressstringThe address, as given in the request.
txsarray of TransactionResultThe transactions of the page, newest first.

ArchiveResult

The node answers this object with every field empty.

AuctionResult

A market listing that sells one NFT at a fixed price.

FieldTypeDescription
creatorAddressstringThe seller.
chainAddressstringThe main chain address, S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4.
startDatenumberWhen the listing started, in Unix seconds.
endDatenumberWhen the listing ends, in Unix seconds.
baseSymbolstringThe symbol of the NFT token.
quoteSymbolstringThe symbol of the token the price is paid in.
tokenIdstringThe NFT id.
pricestringThe price, in the smallest unit of the quote token.
endPricestringAlways 0.
extensionPeriodstringAlways 0.
typestringAlways Fixed.
romstringThe ROM of the NFT, in hexadecimal.
ramstringThe RAM of the NFT, in hexadecimal.
listingFeestringAlways 0.
currentWinnerstringAlways empty.

BalanceResult

The balance of one token held by an address.

FieldTypeDescription
chainstringThe chain: main from getAccountFungibleTokens, the main chain address S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4 from getTokenBalance, getAccount, and getAccounts.
amountstringThe balance in the smallest unit of the token; for an NFT token, the number of NFTs.
symbolstringThe token symbol.
decimalsnumberThe decimals of the token.
idsarray of stringFor an NFT token, at most 10,000 of the NFT ids the address holds. Not present for a fungible token.

BlockResult

A block and its transactions.

FieldTypeDescription
hashstringThe block hash.
previousHashstringThe hash of the block before.
timestampnumberThe block time, in Unix seconds.
heightnumberThe block height.
chainAddressstringThe main chain address, S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4.
protocolnumberThe protocol version number, 19 on current blocks.
txsarray of TransactionResultThe transactions of the block, in block order.
validatorAddressstringThe validator that produced the block.
producerAddressstringThe payout address of the block producer, written into the block. Present on blocks produced under gas model v2. See Block Producers.
rewardstring0 on current blocks.
eventsarray of EventResultThe block events of a block from before Phantasma Phoenix.
oraclesarray of OracleResultThe oracle reads of a block from before Phantasma Phoenix.

BuildInfoResult

The build of the RPC node software.

FieldTypeDescription
versionstringThe version of the RPC node software.
commitstringThe Git commit of the build.
buildTimeUtcstringThe build time, in UTC.

ChainResult

The node answers this object with every field empty.

ContractResult

A deployed contract.

FieldTypeDescription
namestringThe contract name.
addressstringThe contract address.
scriptstringThe contract bytecode, in hexadecimal. Empty when getContracts is called without extended.
ownerstringNot filled by the node.
methodsarray of ABIMethodResultThe methods of the contract ABI.
eventsarray of ABIEventResultThe events of the contract ABI.

CursorPaginatedResult

One page of a list read by cursor. Pass cursor back with the same filters to read the next page. The last page carries no cursor.

FieldTypeDescription
resultsee the methodThe entries of the page.
cursorstringThe cursor of the next page. Not present on the last page.

EstimateTransactionResult

The outcome of a dry run of a transaction. See Fee Estimation.

FieldTypeDescription
wouldAbortbooleantrue when the transaction would be rejected or would abort.
abortReasonstringThe reason when wouldAbort is true; empty otherwise.
gasBillKcalBasestringThe gas bill in KCAL atoms, after the minimum bill and the maxGas cap.
dataRowsstringThe storage quanta the transaction would add.
dataEscrowAtomsstringThe storage escrow it would pay, in SOUL atoms.
dataRefundAtomsstringThe storage escrow it would get back, in SOUL atoms.
recommendedMaxGasstringThe bill plus 15%, rounded up, and at least the minimum gas offer and the minimum gas bill. 0 when wouldAbort is true.
recommendedMaxDatastringThe net escrow plus 15%, rounded up to a multiple of dataEscrowPerRow. 0 when wouldAbort is true or when the transaction adds no net storage.

EventExResult

An event with its data decoded into a JSON object, for the event kinds that the node decodes.

FieldTypeDescription
addressstringThe address the event refers to.
contractstringThe contract or chain module that emitted the event, such as market or governance.
kindstring, the event kindThe event kind.
dataany JSON valueThe event data as a JSON object; its fields depend on the kind.

EventResult

An event that a transaction emitted.

FieldTypeDescription
addressstringThe address the event refers to, such as the sender of a TokenSend or the recipient of a TokenReceive.
contractstringThe contract or chain module that emitted the event.
kindstringThe event kind, such as TokenSend, TokenReceive, TokenMint, GasEscrow, or GasPayment.
namestringThe name of a custom event; the kind for the other events.
datastringThe event data, serialized, in hexadecimal; its layout depends on the kind.

ExecutionState

The outcome of a transaction.

ValueMeaning
HaltThe transaction completed.
BreakThe transaction aborted. It changed nothing, and the fee payer paid the gas bill.
FaultThe chain rejected the transaction.
RunningThe transaction is not final yet.

GasConfigDataResult

The gas configuration fields. Fees And Gas explains each one.

FieldTypeDescription
versionnumber1 or higher under gas model v2.
maxNameLengthnumberThe longest account name.
maxTokenSymbolLengthnumberThe longest token symbol.
feeShiftnumberThe right shift after the fee multiplier.
maxStructureSizenumberThe largest structure the chain accepts, in bytes.
feeMultiplierstringThe KCAL atoms per gas unit, before feeShift.
gasTokenIdstringThe Carbon token id of the gas token, 1 (KCAL).
dataTokenIdstringThe Carbon token id of the storage escrow token, 2 (SOUL).
minimumGasOfferstringThe smallest maxGas a transaction may state, in KCAL atoms.
dataEscrowPerRowstringThe SOUL atoms escrowed per 1024-byte storage quantum.
gasFeeTransferstringThe gas units of a transfer and of most native writes.
gasFeeQuerystringThe gas units of a native read.
gasFeeCreateTokenBasestringA price of gas model v1. Not used under gas model v2.
gasFeeCreateTokenSymbolstringA price of gas model v1. Not used under gas model v2.
gasFeeCreateTokenSeriesstringA price of gas model v1. Not used under gas model v2.
gasFeePerBytestringA price of gas model v1. Not used under gas model v2.
gasFeeRegisterNamestringA price of gas model v1. Not used under gas model v2.
gasBurnRatioMulstringThe multiplier of the burned share of each bill.
gasBurnRatioShiftnumberThe right shift of the burned share of each bill.
minimumGasBillstringThe smallest settled bill, in KCAL atoms.
gasProducerRatioMulstringThe multiplier of the block producer share of each bill.
gasProducerRatioShiftnumberThe right shift of the block producer share of each bill.
gasDappRatioMulstringThe multiplier of the dApp share of each bill.
gasDappRatioShiftnumberThe right shift of the dApp share of each bill.
policyFeeCreateTokenBasestringThe token creation fee, in KCAL atoms.
policyFeeCreateTokenSymbolstringThe symbol fee of a token creation, in KCAL atoms, halved for every character after the first.
policyFeeCreateTokenSeriesstringThe series creation fee, in KCAL atoms.
policyFeeRegisterNamestringThe name registration fee, in KCAL atoms, halved for every character after the first.
legacyDataEscrowPerRowstringThe refund per quantum of the storage that existed before gas model v2, in SOUL atoms.

GasConfigResult

The gas configuration of the latest block and the chain parameters that fee calculation needs.

FieldTypeDescription
gasModelVersionnumber2 when gasConfig.version is 1 or higher, otherwise 1.
gasConfigGasConfigDataResultThe gas configuration.
blockRateTargetnumberThe target time between blocks, in milliseconds.
expiryWindownumberHow far in the future a transaction’s expiry may lie, in milliseconds.
unitsPerBlockDataBytenumberThe gas units per byte of block data, 25. Present under gas model v2.

GovernanceResult

The node answers this object with every field empty.

LeaderboardResult

The node answers this object with every field empty.

LeaderboardRowResult

The node answers this object with every field empty.

NexusResult

The node answers this object with every field empty.

OracleResult

An oracle read of a block from before Phantasma Phoenix.

FieldTypeDescription
urlstringThe URL the oracle read.
contentstringThe content it read, in hexadecimal.

OrganizationMemberResult

The membership of one address in an organization.

FieldTypeDescription
addressstringThe address, in Phantasma form.
carbonAddressstringThe 32-byte account key, in hexadecimal.
isMemberbooleanWhether the address is a member.
memberTimenumberWhen the address joined, in Unix milliseconds. Present for a member when the request asks for it.

OrganizationResult

An organization, such as masters.

FieldTypeDescription
namestringThe organization name.
ownerstringThe owner, in Phantasma form.
carbonOwnerstringThe owner’s 32-byte account key, in hexadecimal.
metadataarray of TokenPropertyResultThe organization metadata.
memberCountstringThe number of members. Present when the request asks for it.

PaginatedResult

One page of a list read by page number.

FieldTypeDescription
pagenumberThe page number.
pageSizenumberThe page size.
totalnumberThe number of entries in all pages.
totalPagesnumberThe number of pages.
resultsee the methodThe entries of the page.

PhantasmaVmConfigResult

The configuration of the Phantasma VM.

FieldTypeDescription
isStoredbooleantrue when the configuration is stored on the chain; false when the validators use the built-in defaults.
featureLevelnumberThe feature level of the Phantasma VM.
gasConstructorstringThe gas units of ABI(), Address(), Hash(), and Timestamp().
gasNexusstringThe gas units of Nexus.CreateToken, Nexus.CreateTokenSeries, Nexus.AttachTokenContract, and Nexus.SetPlatformTokenHash.
gasOrganizationstringThe gas units of Organization.Kill.
gasAccountstringThe gas units of Account.Name and Account.Transactions.
gasLeaderboardstringStored in the configuration; no interop charges it.
gasStandardstringThe gas units of every other interop.
gasOraclestringThe gas units of Oracle.Quote.
fuelPerContractDeploystringStored in the configuration; the chain does not charge it.

ScriptResult

The outcome of a script run by invokeRawScript.

FieldTypeDescription
eventsarray of EventResultThe events the script emitted.
resultstringThe last value the script left on the stack, serialized, in hexadecimal. Empty when the script failed.
errorstringEmpty when the script completed; otherwise the failure reason.
resultsarray of stringEvery value the script left on the stack, serialized, in hexadecimal, the last one at the end.
oraclesarray of OracleResultAlways empty.
statestringNot filled by the node.
gasstringNot filled by the node.

StakeResult

The SOUL stake of an address.

FieldTypeDescription
amountstringThe staked SOUL, in SOUL atoms.
timenumberThe staking timestamp, in Unix seconds. Stake, unstake, and claim each set it.
unclaimedstringThe KCAL earned and not yet claimed, in KCAL atoms, boosters included.

StorageResult

The node answers this object with every field empty.

TokenDataResult

An NFT.

FieldTypeDescription
idstringThe Phantasma NFT id, in decimal.
seriesstringThe Phantasma series id, in decimal; 0 when the series has none.
carbonTokenIdstringThe Carbon token id.
carbonSeriesIdstringThe Carbon series id.
carbonNftAddressstringThe 32-byte address of the NFT, in hexadecimal. Assets sent to it are infused into the NFT.
mintstringThe mint number within the series.
chainNamestringAlways main.
ownerAddressstringThe current owner. When the NFT is infused into another NFT, the address of that NFT.
creatorAddressstringThe address the NFT was minted to.
ramstringThe RAM of the NFT, in hexadecimal.
romstringThe ROM data, in hexadecimal: the rom field of the ROM when the ROM has one, otherwise the whole ROM. An NFT of a series that shares one ROM shows the series ROM.
statusstring, see TokenStatusInfused when the NFT is infused into another NFT, otherwise Active.
infusionarray of TokenPropertyResultThe assets infused into the NFT: the token symbol as key, and the amount of a fungible token or the id of an NFT as value.
propertiesarray of TokenPropertyResultWith extended set to true: the ROM fields, the series metadata fields, and, when the series has a contract, the values of its property methods, by name.

TokenExternalResult

The node does not fill this object.

TokenPriceResult

The node does not fill this object.

TokenPropertyResult

A named value: a metadata field, an NFT property, or an infusion.

FieldTypeDescription
keystringThe name.
valueproperty valueThe value.

TokenResult

A token.

FieldTypeDescription
symbolstringThe token symbol.
namestringThe token name, from its metadata.
decimalsnumberThe decimals of the token.
currentSupplystringThe supply, in the smallest unit; for an NFT token, the number of NFTs.
maxSupplystringThe maximum supply; 0 means no maximum.
burnedSupplystringThe burned amount. For KCAL it includes the 9,242,814,271,535,702 atoms burned before Phantasma Phoenix.
addressstringThe token address, derived from the symbol.
ownerstringThe token owner. A token without an owner shows the main chain address S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4.
flagsstringThe token properties as text, separated by commas: always Transferable, Burnable, then Fungible for a fungible token, Divisible when it has decimals, Stakable for SOUL, and Finite when it has a maximum supply.
scriptstringNot filled by the node.
seriesarray of TokenSeriesResultAlways empty; read the series with getTokenSeries.
carbonIdstringThe Carbon token id.
metadataarray of TokenPropertyResultWith extended set to true: the token metadata fields.
tokenSchemasTokenSchemasResultWith extended set to true, for an NFT token: its schemas.
externalarray of TokenExternalResultNot filled by the node.
pricearray of TokenPriceResultNot filled by the node.

TokenSchemasResult

The three schemas of an NFT token: series metadata, ROM, and RAM.

FieldTypeDescription
seriesMetadataVmStructSchemaResultThe schema of the series metadata.
romVmStructSchemaResultThe schema of the ROM of each NFT.
ramVmStructSchemaResultThe schema of the RAM of each NFT.

TokenSeriesResult

A series of an NFT token.

FieldTypeDescription
seriesIdstringThe Phantasma series id, in decimal; 0 when the series has none.
carbonTokenIdstringThe Carbon token id.
carbonSeriesIdstringThe Carbon series id.
ownerAddressstringThe series owner, who can mint into it.
maxMintstringThe most NFTs the series may mint; 0 means no limit.
mintCountstringThe NFTs minted so far.
currentSupplystringThe NFTs of the series that exist now.
maxSupplystringThe most NFTs of the series that may exist at once; 0 means no limit.
burnedSupplystringNot filled by the node.
modestringNot filled by the node.
scriptstringNot filled by the node.
methodsarray of ABIMethodResultNot filled by the node.
metadataarray of TokenPropertyResultThe series metadata fields, by name.

TokenStatus

The status of an NFT.

ValueMeaning
ActiveThe NFT is held by an account.
InfusedThe NFT is infused into another NFT.

TransactionResult

A transaction. Transactions of blocks from before Phantasma Phoenix carry their original fields and leave out the fields that only structured transactions have.

FieldTypeDescription
hashstringThe transaction hash.
chainAddressstringThe main chain address, S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4.
timestampnumberThe block time, in Unix seconds.
blockHeightnumberThe height of the block that holds the transaction.
blockHashstringThe hash of that block.
scriptstringThe script, in hexadecimal, of a script transaction that completed; empty otherwise.
carbonTxTypenumberThe transaction type number: 0 to 14 for the structured types, 15 and 16 for script transactions.
carbonTxDatahex stringThe body of the transaction, serialized, in hexadecimal.
payloadstringThe payload, in hexadecimal.
debugCommentstringEmpty when the transaction completed. Otherwise why it aborted or was rejected; a rejection starts with its type, such as GasFees: below minimum gas bill.
eventsarray of EventResultThe events the transaction emitted.
extendedEventsarray of EventExResultEvents with decoded data, for the kinds that the node decodes.
resultstringThe result, in hexadecimal.
feestringThe gas bill paid, in KCAL atoms.
statestring, see ExecutionStateThe outcome of the transaction.
signaturesarray of TransactionSignatureResultThe signatures.
senderstringThe fee payer.
gasPayerstringThe fee payer.
gasTargetstringThe main chain address, S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4.
gasPricestringAlways 1.
gasLimitstringThe maxGas of the transaction, in KCAL atoms.
expirationnumberThe expiry of the transaction, in Unix seconds.

TransactionSignatureResult

A signature of a transaction.

FieldTypeDescription
kindstringThe signature kind, Ed25519.
datastringThe signature, in hexadecimal.

VmNamedVariableSchemaResult

A named field of a schema.

FieldTypeDescription
namestringThe field name.
schemaVmVariableSchemaResultThe field type.

VmStructSchemaResult

A schema: its fields and its flags.

FieldTypeDescription
fieldsarray of VmNamedVariableSchemaResultThe fields, in order.
flagsnumberBit flags: 1 means the struct may carry fields that the schema does not name; 2 means the fields are stored sorted by name.

VmType

A field type of a schema.

ValueMeaning
DynamicAny type.
ArrayAn array of any type.
BytesA byte array.
StructA struct with its own schema.
Int8An 8-bit integer.
Int16A 16-bit integer.
Int32A 32-bit integer.
Int64A 64-bit integer.
Int256A 256-bit integer.
Bytes1616 bytes.
Bytes3232 bytes.
Bytes6464 bytes.
StringA string.
Array_DynamicAn array of values of any type.
Array_BytesAn array of byte arrays.
Array_StructAn array of structs.
Array_Int8An array of 8-bit integers.
Array_Int16An array of 16-bit integers.
Array_Int32An array of 32-bit integers.
Array_Int64An array of 64-bit integers.
Array_Int256An array of 256-bit integers.
Array_Bytes16An array of 16-byte values.
Array_Bytes32An array of 32-byte values.
Array_Bytes64An array of 64-byte values.
Array_StringAn array of strings.

VmVariableSchemaResult

The type of a schema field.

FieldTypeDescription
typestring, see VmTypeThe type.
schemaVmStructSchemaResultFor a Struct or a struct array, the schema of the struct.