Skip to content

Node RPC Methods

Every node serves these methods. Call a method with JSON-RPC at /rpc or as REST at /api/v1/<Method>; the routes /rpc/v2 and /api/v2 serve the same methods with structured property values. Node RPC describes the routes, the request format, the limits, and the errors. Method names are case-insensitive in JSON-RPC; a REST path takes the parameters as query parameters under the names in the tables.

AreaMethods
NodegetVersion
ChaingetChain, getChains, getGasConfig
BlocksgetBlockByHash, getBlockByHeight, getBlockHeight, getBlockTransactionCountByHash, getLatestBlock
TransactionsestimateTransaction, getAddressTransactionCount, getAddressTransactions, getTransaction, getTransactionByBlockHashAndIndex, invokeRawScript, sendCarbonTransaction, sendRawTransaction
AccountsgetAccount, getAccountFungibleTokens, getAccountInfo, getAccountInfos, getAccountNFTs, getAccountOwnedTokens, getAccountOwnedTokenSeries, getAccounts, lookUpName
Tokens And NFTsgetNFT, getNFTs, getToken, getTokenBalance, getTokenData, getTokenNFTs, getTokens, getTokenSeries, getTokenSeriesById
ContractsgetContract, getContractByAddress, getContracts, getPhantasmaVmConfig
OrganizationsgetOrganization, getOrganizationMember, getOrganizationMembers, getOrganizations
AuctionsgetAuction, getAuctions, getAuctionsCount
NexusgetNexus
LeaderboardsgetLeaderboard
ArchivesgetArchive, readArchive, writeArchive

Node

getVersion

Returns the version, the Git commit, and the build time of the RPC node software.

JSON-RPCREST
getVersionGET /api/v1/GetVersion

No parameters.

Returns BuildInfoResult.

{"jsonrpc": "2.0", "method": "getVersion", "params": [], "id": 1}

Chain

The node serves one chain, main. Every chain argument accepts only main.

getChain

Not implemented.

Answers an empty chain object.

JSON-RPCREST
getChainGET /api/v1/GetChain
ParameterTypeDefaultDescription
namestringmainThe chain name. Only main is accepted.
extendedbooleantrueHas no effect.

Returns ChainResult.

getChains

Not implemented.

Answers an empty array.

JSON-RPCREST
getChainsGET /api/v1/GetChains
ParameterTypeDefaultDescription
extendedbooleantrueDeprecated. Has no effect.

Returns an array of ChainResult.

getGasConfig

Returns the gas configuration of the latest block, the gas model version, and the chain parameters that fee calculation needs. Fees And Gas explains every field.

JSON-RPCREST
getGasConfigGET /api/v1/GetGasConfig

No parameters.

Returns GasConfigResult.

{"jsonrpc": "2.0", "method": "getGasConfig", "params": [], "id": 1}

Blocks

getBlockByHash

Returns a block and its transactions by block hash.

JSON-RPCREST
getBlockByHashGET /api/v1/GetBlockByHash
ParameterTypeDefaultDescription
blockHashstringrequiredThe block hash, 64 hexadecimal characters.

Returns BlockResult.

{"jsonrpc": "2.0", "method": "getBlockByHash", "params": ["129B054E2B2CB51686060A2C8A543F120D5E08FEE02D0B4178B50F607FBA80A6"], "id": 1}

getBlockByHeight

Returns a block and its transactions by height. Height 0 is refused.

JSON-RPCREST
getBlockByHeightGET /api/v1/GetBlockByHeight
ParameterTypeDefaultDescription
chainInputstringrequiredThe chain name. Only main is accepted.
heightstringrequiredThe block height, as a decimal string.

Returns BlockResult.

{"jsonrpc": "2.0", "method": "getBlockByHeight", "params": ["main", "1"], "id": 1}

getBlockHeight

Returns the height of the latest block, as a decimal string.

JSON-RPCREST
getBlockHeightGET /api/v1/GetBlockHeight
ParameterTypeDefaultDescription
chainInputstringrequiredThe chain name. Only main is accepted.

Returns string.

{"jsonrpc": "2.0", "method": "getBlockHeight", "params": ["main"], "id": 1}

getBlockTransactionCountByHash

Returns the number of transactions in a block. An unknown hash answers the error block not found.

JSON-RPCREST
getBlockTransactionCountByHashGET /api/v1/GetBlockTransactionCountByHash
ParameterTypeDefaultDescription
chainAddressOrNamestringrequiredThe chain name. Only main is accepted.
blockHashstringrequiredThe block hash, 64 hexadecimal characters.

Returns number.

{"jsonrpc": "2.0", "method": "getBlockTransactionCountByHash", "params": ["main", "129B054E2B2CB51686060A2C8A543F120D5E08FEE02D0B4178B50F607FBA80A6"], "id": 1}

getLatestBlock

Returns the latest block and its transactions.

JSON-RPCREST
getLatestBlockGET /api/v1/GetLatestBlock
ParameterTypeDefaultDescription
chainInputstringrequiredThe chain name. Only main is accepted.

Returns BlockResult.

{"jsonrpc": "2.0", "method": "getLatestBlock", "params": ["main"], "id": 1}

Transactions

estimateTransaction

Runs a serialized transaction against the current chain state without recording it, and returns its gas bill, its storage escrow, and recommended maxGas and maxData. The signatures may be zero-filled bytes of the correct length. See Fee Estimation.

JSON-RPCREST
estimateTransactionGET /api/v1/EstimateTransaction
ParameterTypeDefaultDescription
txDatastringrequiredThe serialized transaction, in hexadecimal.

Returns EstimateTransactionResult.

getAddressTransactionCount

Returns the number of transactions recorded for an address.

JSON-RPCREST
getAddressTransactionCountGET /api/v1/GetAddressTransactionCount
ParameterTypeDefaultDescription
accountstringrequiredThe address.
chainInputstringmainThe chain name. Only main is accepted.
checkAddressResevedBytebooleantrueWhether to refuse an address that fails the reserved-byte check. Keep it true. The parameter name is spelled this way.

Returns number.

{"jsonrpc": "2.0", "method": "getAddressTransactionCount", "params": ["P2KJC8TB6XyY9sr1s4GprPD2XjnnUggRq86pwsFZjUEqCXt"], "id": 1}

getAddressTransactions

Returns the transactions of an address, newest first, one page at a time.

JSON-RPCREST
getAddressTransactionsGET /api/v1/GetAddressTransactions
ParameterTypeDefaultDescription
accountstringrequiredThe address.
pageinteger1The page number, starting at 1.
pageSizeinteger10Entries per page, from 1 to 100.
checkAddressResevedBytebooleantrueWhether to refuse an address that fails the reserved-byte check. Keep it true. The parameter name is spelled this way.

Returns a page, PaginatedResult, whose result is AccountTransactionsResult.

{"jsonrpc": "2.0", "method": "getAddressTransactions", "params": ["P2KJC8TB6XyY9sr1s4GprPD2XjnnUggRq86pwsFZjUEqCXt"], "id": 1}

getTransaction

Returns a transaction by hash. A transaction that is still in the queue or not yet final answers the error pending; an unknown hash answers Transaction not found. A rejected transaction returns its hash, its state Fault, and the reason in debugComment.

JSON-RPCREST
getTransactionGET /api/v1/GetTransaction
ParameterTypeDefaultDescription
hashTextstringrequiredThe transaction hash.

Returns TransactionResult.

{"jsonrpc": "2.0", "method": "getTransaction", "params": ["07D5F8CEDB96C11CFE2923F5D370CB4E9C98BB65B8C0ACD9F56E358077D73A0D"], "id": 1}

getTransactionByBlockHashAndIndex

Returns the transaction at a position in a block. Positions start at 0.

JSON-RPCREST
getTransactionByBlockHashAndIndexGET /api/v1/GetTransactionByBlockHashAndIndex
ParameterTypeDefaultDescription
chainAddressOrNamestringrequiredThe chain name. Only main is accepted.
blockHashstringrequiredThe block hash, 64 hexadecimal characters.
indexintegerrequiredThe position of the transaction in the block, starting at 0.

Returns TransactionResult.

{"jsonrpc": "2.0", "method": "getTransactionByBlockHashAndIndex", "params": ["main", "129B054E2B2CB51686060A2C8A543F120D5E08FEE02D0B4178B50F607FBA80A6", 0], "id": 1}

invokeRawScript

Runs a VM script against the current chain state without recording anything, and returns its results and events. Use it to call read methods of contracts. A script that fails answers the error Execution failed: <type>: <reason>.

JSON-RPCREST
invokeRawScriptGET /api/v1/InvokeRawScript
ParameterTypeDefaultDescription
chainInputstringrequiredThe chain name. Only main is accepted.
scriptDatastringrequiredThe script, in hexadecimal.

Returns ScriptResult.

sendCarbonTransaction

Sends a signed structured transaction and returns its hash. The node refuses an expired transaction before sending it; the chain’s own refusals come back as Transaction was rejected: Rejection type: <type>, error: <reason>. A returned hash means the transaction was queued, not that it succeeded: read its result with getTransaction.

JSON-RPCREST
sendCarbonTransactionGET /api/v1/SendCarbonTransaction
ParameterTypeDefaultDescription
txDatastringrequiredThe signed transaction, in hexadecimal.

Returns string.

sendRawTransaction

Sends a signed script transaction in the script transaction format and returns its hash. The node refuses an expired transaction and a transaction for another nexus before sending it; the chain’s own refusals come back as Transaction was rejected: Rejection type: <type>, error: <reason>. A returned hash means the transaction was queued, not that it succeeded.

JSON-RPCREST
sendRawTransactionGET /api/v1/SendRawTransaction
ParameterTypeDefaultDescription
txDatastringrequiredThe signed transaction, in hexadecimal.

Returns string.

Accounts

getAccount

Deprecated. Use getAccountInfo for the name and the stake, and getAccountFungibleTokens and getAccountNFTs for the balances.

Returns the name, the stake, and every balance of an address. Each NFT balance lists at most 10,000 NFT ids; amount carries the true count.

JSON-RPCREST
getAccountGET /api/v1/GetAccount
ParameterTypeDefaultDescription
accountstringrequiredThe address.
extendedbooleantrueDeprecated. Has no effect.
checkAddressReservedBytebooleantrueWhether to refuse an address that fails the reserved-byte check. Keep it true.
addressTypePhantasma or CarbonPhantasmaHow account is written: Phantasma for a Phantasma address, Carbon for a 32-byte account key in 64 hexadecimal characters.

Returns AccountResult.

{"jsonrpc": "2.0", "method": "getAccount", "params": ["P2KJC8TB6XyY9sr1s4GprPD2XjnnUggRq86pwsFZjUEqCXt"], "id": 1}

getAccountFungibleTokens

Returns the fungible token balances of an address, one page at a time.

JSON-RPCREST
getAccountFungibleTokensGET /api/v1/GetAccountFungibleTokens
ParameterTypeDefaultDescription
accountstringrequiredThe address.
tokenSymbolstring""Only this token, by symbol. Do not combine with carbonTokenId.
carbonTokenIdinteger0Only this token, by its Carbon token id. 0 means no filter. Do not combine with tokenSymbol.
pageSizeinteger10Entries per page, from 1 to 100.
cursorstring""The cursor of the previous page; empty for the first page.
checkAddressReservedBytebooleantrueWhether to refuse an address that fails the reserved-byte check. Keep it true.
addressTypePhantasma or CarbonPhantasmaHow account is written: Phantasma for a Phantasma address, Carbon for a 32-byte account key in 64 hexadecimal characters.

Returns a page, CursorPaginatedResult, whose result is an array of BalanceResult.

{"jsonrpc": "2.0", "method": "getAccountFungibleTokens", "params": ["P2KJC8TB6XyY9sr1s4GprPD2XjnnUggRq86pwsFZjUEqCXt"], "id": 1}

getAccountInfo

Returns the registered name and the SOUL stake of an address: the staked amount, the staking timestamp, and the KCAL earned and not yet claimed. It carries no balances; read them with getAccountFungibleTokens, getAccountNFTs, or getTokenBalance.

JSON-RPCREST
getAccountInfoGET /api/v1/GetAccountInfo
ParameterTypeDefaultDescription
accountstringrequiredThe address.
checkAddressReservedBytebooleantrueWhether to refuse an address that fails the reserved-byte check. Keep it true.
addressTypePhantasma or CarbonPhantasmaHow account is written: Phantasma for a Phantasma address, Carbon for a 32-byte account key in 64 hexadecimal characters.

Returns AccountInfoResult.

{"jsonrpc": "2.0", "method": "getAccountInfo", "params": ["P2KJC8TB6XyY9sr1s4GprPD2XjnnUggRq86pwsFZjUEqCXt"], "id": 1}

getAccountInfos

Returns getAccountInfo results for up to 100 addresses, in request order, read from one state snapshot. One malformed address fails the whole request.

JSON-RPCREST
getAccountInfosGET /api/v1/GetAccountInfos
ParameterTypeDefaultDescription
accountsarray of stringsrequiredFrom 1 to 100 addresses: a JSON array in JSON-RPC, a repeated accounts query parameter in REST.
checkAddressReservedBytebooleantrueWhether to refuse an address that fails the reserved-byte check. Keep it true.
addressTypePhantasma or CarbonPhantasmaHow every address is written: Phantasma for a Phantasma address, Carbon for a 32-byte account key in 64 hexadecimal characters.

Returns an array of AccountInfoResult.

{"jsonrpc": "2.0", "method": "getAccountInfos", "params": [["P2KJC8TB6XyY9sr1s4GprPD2XjnnUggRq86pwsFZjUEqCXt"]], "id": 1}

getAccountNFTs

Returns the NFTs that an address holds, one page at a time.

JSON-RPCREST
getAccountNFTsGET /api/v1/GetAccountNFTs
ParameterTypeDefaultDescription
accountstringrequiredThe address.
tokenSymbolstring""Only this token, by symbol. Do not combine with carbonTokenId.
carbonTokenIdinteger0Only this token, by its Carbon token id. 0 means no filter. Do not combine with tokenSymbol.
carbonSeriesIdinteger0Only this series, by its Carbon series id; needs tokenSymbol or carbonTokenId. 0 means no filter.
pageSizeinteger10Entries per page, from 1 to 100, or from 1 to 50 when extended is true.
cursorstring""The cursor of the previous page; empty for the first page.
extendedbooleanfalseWhether to include the NFT properties and infusions.
checkAddressReservedBytebooleantrueWhether to refuse an address that fails the reserved-byte check. Keep it true.
addressTypePhantasma or CarbonPhantasmaHow account is written: Phantasma for a Phantasma address, Carbon for a 32-byte account key in 64 hexadecimal characters.

Returns a page, CursorPaginatedResult, whose result is an array of TokenDataResult.

{"jsonrpc": "2.0", "method": "getAccountNFTs", "params": ["P2KJC8TB6XyY9sr1s4GprPD2XjnnUggRq86pwsFZjUEqCXt"], "id": 1}

getAccountOwnedTokens

Returns the NFT tokens of which an address holds at least one NFT, one page at a time.

JSON-RPCREST
getAccountOwnedTokensGET /api/v1/GetAccountOwnedTokens
ParameterTypeDefaultDescription
accountstringrequiredThe address.
tokenSymbolstring""Only this token, by symbol. Do not combine with carbonTokenId.
carbonTokenIdinteger0Only this token, by its Carbon token id. 0 means no filter. Do not combine with tokenSymbol.
pageSizeinteger10Entries per page, from 1 to 100.
cursorstring""The cursor of the previous page; empty for the first page.
checkAddressReservedBytebooleantrueWhether to refuse an address that fails the reserved-byte check. Keep it true.
addressTypePhantasma or CarbonPhantasmaHow account is written: Phantasma for a Phantasma address, Carbon for a 32-byte account key in 64 hexadecimal characters.

Returns a page, CursorPaginatedResult, whose result is an array of TokenResult.

{"jsonrpc": "2.0", "method": "getAccountOwnedTokens", "params": ["P2KJC8TB6XyY9sr1s4GprPD2XjnnUggRq86pwsFZjUEqCXt"], "id": 1}

getAccountOwnedTokenSeries

Returns the NFT series of which an address holds at least one NFT, one page at a time.

JSON-RPCREST
getAccountOwnedTokenSeriesGET /api/v1/GetAccountOwnedTokenSeries
ParameterTypeDefaultDescription
accountstringrequiredThe address.
tokenSymbolstring""Only this token, by symbol. Do not combine with carbonTokenId.
carbonTokenIdinteger0Only this token, by its Carbon token id. 0 means no filter. Do not combine with tokenSymbol.
pageSizeinteger10Entries per page, from 1 to 100.
cursorstring""The cursor of the previous page; empty for the first page.
checkAddressReservedBytebooleantrueWhether to refuse an address that fails the reserved-byte check. Keep it true.
addressTypePhantasma or CarbonPhantasmaHow account is written: Phantasma for a Phantasma address, Carbon for a 32-byte account key in 64 hexadecimal characters.

Returns a page, CursorPaginatedResult, whose result is an array of TokenSeriesResult.

{"jsonrpc": "2.0", "method": "getAccountOwnedTokenSeries", "params": ["P2KJC8TB6XyY9sr1s4GprPD2XjnnUggRq86pwsFZjUEqCXt"], "id": 1}

getAccounts

Deprecated. Use getAccountInfos, and getAccountFungibleTokens and getAccountNFTs per address.

Returns getAccount results for several addresses.

JSON-RPCREST
getAccountsGET /api/v1/GetAccounts
ParameterTypeDefaultDescription
accountTextstringrequiredAddresses, separated by commas.
extendedbooleanfalseDeprecated. Has no effect.
checkAddressReservedBytebooleantrueWhether to refuse an address that fails the reserved-byte check. Keep it true.
addressTypePhantasma or CarbonPhantasmaHow each address is written: Phantasma for a Phantasma address, Carbon for a 32-byte account key in 64 hexadecimal characters.

Returns an array of AccountResult.

{"jsonrpc": "2.0", "method": "getAccounts", "params": ["P2KJC8TB6XyY9sr1s4GprPD2XjnnUggRq86pwsFZjUEqCXt, P2KBh1rkUZXNj7i1SfegUEg26YfrcYDRBt69fj6izVAPbtc"], "id": 1}

lookUpName

Returns the address that registered an account name.

JSON-RPCREST
lookUpNameGET /api/v1/LookUpName
ParameterTypeDefaultDescription
namestringrequiredThe registered account name.

Returns string.

{"jsonrpc": "2.0", "method": "lookUpName", "params": ["beyondtheneon"], "id": 1}

Tokens And NFTs

getNFT

Returns one NFT by token symbol and NFT id.

JSON-RPCREST
getNFTGET /api/v1/GetNFT
ParameterTypeDefaultDescription
symbolstringrequiredThe token symbol.
IDtextstringrequiredThe NFT id, in decimal.
extendedbooleanfalseWhether to include the NFT properties and infusions.

Returns TokenDataResult.

{"jsonrpc": "2.0", "method": "getNFT", "params": ["CROWN", "102027540816489236327796452815702733520646114324490783683230488899035835189818"], "id": 1}

getNFTs

Returns several NFTs of one token by NFT id.

JSON-RPCREST
getNFTsGET /api/v1/GetNFTs
ParameterTypeDefaultDescription
symbolstringrequiredThe token symbol.
IDTextstringrequiredNFT ids in decimal, separated by commas.
extendedbooleanfalseWhether to include the NFT properties and infusions.

Returns an array of TokenDataResult.

{"jsonrpc": "2.0", "method": "getNFTs", "params": ["CROWN", "102027540816489236327796452815702733520646114324490783683230488899035835189818"], "id": 1}

getToken

Returns a token by symbol or by Carbon token id. The token metadata and, for an NFT token, its schemas come only with extended set to true.

JSON-RPCREST
getTokenGET /api/v1/GetToken
ParameterTypeDefaultDescription
symbolstring""The token symbol. Leave it empty when carbonTokenId is set.
extendedbooleanfalseWhether to include the token metadata and, for an NFT token, its schemas.
carbonTokenIdinteger0The Carbon token id. 0 means the token is named by symbol.

Returns TokenResult.

{"jsonrpc": "2.0", "method": "getToken", "params": ["SOUL"], "id": 1}

getTokenBalance

Returns the balance of one token held by an address. For an NFT token, amount is the number of NFTs and ids lists at most 10,000 of them; page through the NFTs with getAccountNFTs.

JSON-RPCREST
getTokenBalanceGET /api/v1/GetTokenBalance
ParameterTypeDefaultDescription
accountstringrequiredThe address.
tokenSymbolstringrequiredThe token symbol.
chainInputstringrequiredThe chain name. Only main is accepted.
checkAddressResevedBytebooleantrueWhether to refuse an address that fails the reserved-byte check. Keep it true. The parameter name is spelled this way.
addressTypePhantasma or CarbonPhantasmaHow account is written: Phantasma for a Phantasma address, Carbon for a 32-byte account key in 64 hexadecimal characters.

Returns BalanceResult.

{"jsonrpc": "2.0", "method": "getTokenBalance", "params": ["P2KJC8TB6XyY9sr1s4GprPD2XjnnUggRq86pwsFZjUEqCXt", "SOUL", "main"], "id": 1}

getTokenData

Deprecated. Use getNFT.

Returns one NFT by token symbol and NFT id, without properties.

JSON-RPCREST
getTokenDataGET /api/v1/GetTokenData
ParameterTypeDefaultDescription
symbolstringrequiredThe token symbol.
IDtextstringrequiredThe NFT id, in decimal.

Returns TokenDataResult.

{"jsonrpc": "2.0", "method": "getTokenData", "params": ["CROWN", "102027540816489236327796452815702733520646114324490783683230488899035835189818"], "id": 1}

getTokenNFTs

Returns the NFTs of a token, or of one of its series, one page at a time.

JSON-RPCREST
getTokenNFTsGET /api/v1/GetTokenNFTs
ParameterTypeDefaultDescription
carbonTokenIdintegerrequiredThe Carbon token id.
carbonSeriesIdinteger0Only this series, by its Carbon series id. 0 means the whole token. Do not combine with seriesId.
pageSizeinteger10Entries per page, from 1 to 100, or from 1 to 50 when extended is true.
cursorstring""The cursor of the previous page; empty for the first page.
extendedbooleanfalseWhether to include the NFT properties and infusions.
seriesIdstring""Only this series, by its Phantasma series id in decimal. Do not combine with carbonSeriesId.

Returns a page, CursorPaginatedResult, whose result is an array of TokenDataResult.

{"jsonrpc": "2.0", "method": "getTokenNFTs", "params": [4, 1], "id": 1}

getTokens

Returns every token, or the tokens of one owner.

JSON-RPCREST
getTokensGET /api/v1/GetTokens
ParameterTypeDefaultDescription
extendedbooleanfalseDeprecated. Whether to include the metadata of each token and the schemas of each NFT token.
ownerAddressstringnoneOnly the tokens of this owner.
addressTypePhantasma or CarbonPhantasmaHow ownerAddress is written: Phantasma for a Phantasma address, Carbon for a 32-byte account key in 64 hexadecimal characters.

Returns an array of TokenResult.

{"jsonrpc": "2.0", "method": "getTokens", "params": [], "id": 1}

getTokenSeries

Returns the series of an NFT token, one page at a time.

JSON-RPCREST
getTokenSeriesGET /api/v1/GetTokenSeries
ParameterTypeDefaultDescription
symbolstring""The token symbol. Leave it empty when carbonTokenId is set.
carbonTokenIdinteger0The Carbon token id. 0 means the token is named by symbol.
pageSizeinteger10Entries per page, from 1 to 100.
cursorstring""The cursor of the previous page; empty for the first page.

Returns a page, CursorPaginatedResult, whose result is an array of TokenSeriesResult.

{"jsonrpc": "2.0", "method": "getTokenSeries", "params": ["CROWN"], "id": 1}

getTokenSeriesById

Returns one series. Name the token by symbol or carbonTokenId, and the series by seriesId or carbonSeriesId.

JSON-RPCREST
getTokenSeriesByIdGET /api/v1/GetTokenSeriesById
ParameterTypeDefaultDescription
symbolstring""The token symbol. Do not combine with carbonTokenId.
carbonTokenIdinteger0The Carbon token id. Do not combine with symbol.
seriesIdstring""The Phantasma series id, in decimal. Do not combine with carbonSeriesId.
carbonSeriesIdinteger0The Carbon series id. Do not combine with seriesId.

Returns TokenSeriesResult.

{"jsonrpc": "2.0", "method": "getTokenSeriesById", "params": ["", 4, "", 1], "id": 1}

Contracts

getContract

Returns a deployed contract by name. An unknown name answers the error Contract not found.

JSON-RPCREST
getContractGET /api/v1/GetContract
ParameterTypeDefaultDescription
chainAddressOrNamestringrequiredThe chain name. Only main is accepted.
contractNamestringrequiredThe contract name.

Returns ContractResult.

{"jsonrpc": "2.0", "method": "getContract", "params": ["main", "account"], "id": 1}

getContractByAddress

Returns a deployed contract by address. An unknown address answers the error Contract not found.

JSON-RPCREST
getContractByAddressGET /api/v1/GetContractByAddress
ParameterTypeDefaultDescription
chainAddressOrNamestringrequiredThe chain name. Only main is accepted.
contractAddressstringrequiredThe contract address.

Returns ContractResult.

{"jsonrpc": "2.0", "method": "getContractByAddress", "params": ["main", "S3dGz1deZweAiMVPHL328X3pVNpANQVjgX4MoRGpbNNAfrB"], "id": 1}

getContracts

Returns every deployed contract.

JSON-RPCREST
getContractsGET /api/v1/GetContracts
ParameterTypeDefaultDescription
chainAddressOrNamestringrequiredThe chain name. Only main is accepted.
extendedbooleantrueDeprecated. Whether to include the scripts, methods, and events of the contracts.

Returns an array of ContractResult.

{"jsonrpc": "2.0", "method": "getContracts", "params": ["main"], "id": 1}

getPhantasmaVmConfig

Returns the configuration of the Phantasma VM: its feature level and the gas cost of each interop group. See The Gas Bill.

JSON-RPCREST
getPhantasmaVmConfigGET /api/v1/GetPhantasmaVmConfig
ParameterTypeDefaultDescription
chainAddressOrNamestringrequiredThe chain name. Only main is accepted.

Returns PhantasmaVmConfigResult.

{"jsonrpc": "2.0", "method": "getPhantasmaVmConfig", "params": ["main"], "id": 1}

Organizations

getOrganization

Returns an organization by name, such as masters. An unknown name answers the error invalid organization.

JSON-RPCREST
getOrganizationGET /api/v1/GetOrganization
ParameterTypeDefaultDescription
namestringrequiredThe organization name.
includeMemberCountbooleanfalseWhether to count the members. Counting reads every member row.

Returns OrganizationResult.

{"jsonrpc": "2.0", "method": "getOrganization", "params": ["masters"], "id": 1}

getOrganizationMember

Returns whether an address is a member of an organization, and since when.

JSON-RPCREST
getOrganizationMemberGET /api/v1/GetOrganizationMember
ParameterTypeDefaultDescription
namestringrequiredThe organization name.
addressstringrequiredThe address to look up.
checkAddressReservedBytebooleantrueWhether to refuse an address that fails the reserved-byte check. Keep it true.
addressTypePhantasma or CarbonPhantasmaHow address is written: Phantasma for a Phantasma address, Carbon for a 32-byte account key in 64 hexadecimal characters.

Returns OrganizationMemberResult.

{"jsonrpc": "2.0", "method": "getOrganizationMember", "params": ["masters", "P2KJC8TB6XyY9sr1s4GprPD2XjnnUggRq86pwsFZjUEqCXt"], "id": 1}

getOrganizationMembers

Returns the members of an organization, one page at a time.

JSON-RPCREST
getOrganizationMembersGET /api/v1/GetOrganizationMembers
ParameterTypeDefaultDescription
namestringrequiredThe organization name.
pageSizeinteger10Entries per page, from 1 to 100.
cursorstring""The cursor of the previous page; empty for the first page.
includeMemberTimebooleantrueWhether to include the time each member joined.

Returns a page, CursorPaginatedResult, whose result is an array of OrganizationMemberResult.

{"jsonrpc": "2.0", "method": "getOrganizationMembers", "params": ["masters"], "id": 1}

getOrganizations

Returns the organizations of the chain, one page at a time.

JSON-RPCREST
getOrganizationsGET /api/v1/GetOrganizations
ParameterTypeDefaultDescription
pageSizeinteger10Entries per page, from 1 to 100.
cursorstring""The cursor of the previous page; empty for the first page.
includeMemberCountbooleanfalseWhether to count the members of each organization. Counting reads every member row.

Returns a page, CursorPaginatedResult, whose result is an array of OrganizationResult.

{"jsonrpc": "2.0", "method": "getOrganizations", "params": [], "id": 1}

Auctions

Auctions are the fixed-price NFT listings of the chain market. Each listing sells one NFT for a fungible token.

getAuction

Returns the market listing of one NFT, by token symbol and NFT id.

JSON-RPCREST
getAuctionGET /api/v1/GetAuction
ParameterTypeDefaultDescription
chainAddressOrNamestringrequiredThe chain name. Only main is accepted.
symbolstringrequiredThe symbol of the NFT token.
IDtextstringrequiredThe NFT id, in decimal.

Returns AuctionResult.

getAuctions

Returns the market listings, one page at a time.

JSON-RPCREST
getAuctionsGET /api/v1/GetAuctions
ParameterTypeDefaultDescription
chainAddressOrNamestringrequiredThe chain name. Only main is accepted.
symbolstringnoneOnly listings of this NFT token, by symbol.
pageinteger1The page number, starting at 1.
pageSizeinteger10Entries per page, from 1 to 100.

Returns a page, PaginatedResult, whose result is an array of AuctionResult.

{"jsonrpc": "2.0", "method": "getAuctions", "params": ["main"], "id": 1}

getAuctionsCount

Returns the number of market listings.

JSON-RPCREST
getAuctionsCountGET /api/v1/GetAuctionsCount
ParameterTypeDefaultDescription
chainAddressOrNamestringmainThe chain name. Only main is accepted.
symbolstringnoneOnly listings of this NFT token, by symbol.

Returns number.

{"jsonrpc": "2.0", "method": "getAuctionsCount", "params": [], "id": 1}

Nexus

This method reads nothing and answers a default object.

getNexus

Not implemented.

Answers an empty nexus object.

JSON-RPCREST
getNexusGET /api/v1/GetNexus
ParameterTypeDefaultDescription
extendedbooleanfalseHas no effect.

Returns NexusResult.

Leaderboards

This method reads nothing and answers a default object.

getLeaderboard

Not implemented.

Answers an empty leaderboard object.

JSON-RPCREST
getLeaderboardGET /api/v1/GetLeaderboard
ParameterTypeDefaultDescription
namestringrequiredThe leaderboard name.

Returns LeaderboardResult.

Archives

The chain keeps no archives. These methods read and store nothing.

getArchive

Not implemented.

Answers an empty archive object.

JSON-RPCREST
getArchiveGET /api/v1/GetArchive
ParameterTypeDefaultDescription
hashTextstringrequiredThe archive hash, in hexadecimal.

Returns ArchiveResult.

readArchive

Not implemented.

Answers an empty string.

JSON-RPCREST
readArchiveGET /api/v1/ReadArchive
ParameterTypeDefaultDescription
hashTextstringrequiredThe archive hash, in hexadecimal.
blockIndexintegerrequiredThe archive block, starting at 0.

Returns string.

writeArchive

Not implemented.

Answers false and stores nothing.

JSON-RPCREST
writeArchiveGET /api/v1/WriteArchive
ParameterTypeDefaultDescription
hashTextstringrequiredThe archive hash, in hexadecimal.
blockIndexintegerrequiredThe archive block, starting at 0.
blockContentstringrequiredThe block content, in base64.

Returns boolean.