# Data models

## Data Models (RPC DTOs) — All Models, Enriched

Parsed strictly from `PhantasmaAPI.h` (namespace `phantasma::rpc`). Comments shown only if meaningful. Where the context is clear, added short descriptions; otherwise left blank (no placeholders).

## ABIEvent

_Type:_ `struct`

### Fields

* **value** — Numeric as string\
  &#xNAN;_&#x74;ype:_ `Int32`
* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **returnType**\
  &#xNAN;_&#x74;ype:_ `String`
* **description**\
  &#xNAN;_&#x74;ype:_ `String`

***

## ABIMethod

_Type:_ `struct`

### Fields

* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **returnType**\
  &#xNAN;_&#x74;ype:_ `String`
* **parameters**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<ABIParameter>`

***

## ABIParameter

_Type:_ `struct`

### Fields

* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **type**\
  &#xNAN;_&#x74;ype:_ `String`

***

## Account

_Type:_ `struct`

### Fields

* **address** — Account address (P2K...)\
  &#xNAN;_&#x74;ype:_ `String`
* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **stakes** — Stake info\
  &#xNAN;_&#x74;ype:_ `Stake`
* **stake**\
  &#xNAN;_&#x74;ype:_ `String`
* **unclaimed** — Unclaimed rewards/fees\
  &#xNAN;_&#x74;ype:_ `String`
* **relay**\
  &#xNAN;_&#x74;ype:_ `String`
* **validator**\
  &#xNAN;_&#x74;ype:_ `String`
* **storage**\
  &#xNAN;_&#x74;ype:_ `Storage`
* **balances** — Per-token balances\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Balance>`
* **txs**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<String>`

***

## AccountTransactions

_Type:_ `struct`

### Fields

* **address** — Account address (P2K...)\
  &#xNAN;_&#x74;ype:_ `String`
* **txs**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Transaction>`

***

## Archive

_Type:_ `struct`

### Fields

* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **hash** — Hex-encoded hash\
  &#xNAN;_&#x74;ype:_ `String`
* **time** — Unix timestamp (seconds)\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **size**\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **encryption**\
  &#xNAN;_&#x74;ype:_ `String`
* **blockCount**\
  &#xNAN;_&#x74;ype:_ `Int32`
* **missingBlocks**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Int32>`
* **owners**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<String>`

***

## Auction

_Type:_ `struct`

### Fields

* **creatorAddress**\
  &#xNAN;_&#x74;ype:_ `String`
* **chainAddress**\
  &#xNAN;_&#x74;ype:_ `String`
* **startDate** — Auction start/end timestamp\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **endDate** — Auction start/end timestamp\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **baseSymbol**\
  &#xNAN;_&#x74;ype:_ `String`
* **quoteSymbol**\
  &#xNAN;_&#x74;ype:_ `String`
* **tokenId** — Identifier\
  &#xNAN;_&#x74;ype:_ `String`
* **price** — Numeric as string\
  &#xNAN;_&#x74;ype:_ `String`
* **rom**\
  &#xNAN;_&#x74;ype:_ `String`
* **ram**\
  &#xNAN;_&#x74;ype:_ `String`

***

## Balance

_Type:_ `struct`

### Fields

* **chain** — Chain name\
  &#xNAN;_&#x74;ype:_ `String`
* **amount** — Numeric as string\
  &#xNAN;_&#x74;ype:_ `String`
* **symbol** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **decimals** — Token decimals\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **ids** — NFT IDs owned for this symbol on the chain\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<String>`

***

## Block

_Type:_ `struct`

### Fields

* **hash** — Hex-encoded hash\
  &#xNAN;_&#x74;ype:_ `String`
* **previousHash**\
  &#xNAN;_&#x74;ype:_ `String`
* **timestamp** — Unix timestamp (seconds)\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **height** — Block or chain height\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **chainAddress**\
  &#xNAN;_&#x74;ype:_ `String`
* **protocol**\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **txs**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Transaction>`
* **validatorAddress**\
  &#xNAN;_&#x74;ype:_ `String`
* **reward**\
  &#xNAN;_&#x74;ype:_ `String`
* **events**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Event>`
* **oracles**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Oracle>`

***

## Chain

_Type:_ `struct`

### Fields

* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **address** — Account address (P2K...)\
  &#xNAN;_&#x74;ype:_ `String`
* **parent**\
  &#xNAN;_&#x74;ype:_ `String`
* **height** — Block or chain height\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **organization**\
  &#xNAN;_&#x74;ype:_ `String`
* **contracts**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<String>`
* **dapps**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<String>`

***

## Channel

_Type:_ `struct`

### Fields

* **creatorAddress**\
  &#xNAN;_&#x74;ype:_ `String`
* **targetAddress**\
  &#xNAN;_&#x74;ype:_ `String`
* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **chain**\
  &#xNAN;_&#x74;ype:_ `String`
* **creationTime**\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **symbol** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **fee**\
  &#xNAN;_&#x74;ype:_ `String`
* **balance** — Numeric as string\
  &#xNAN;_&#x74;ype:_ `String`
* **active**\
  &#xNAN;_&#x74;ype:_ `bool`
* **index**\
  &#xNAN;_&#x74;ype:_ `Int32`

***

## Contract

_Type:_ `struct`

### Fields

* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **address** — Account address (P2K...)\
  &#xNAN;_&#x74;ype:_ `String`
* **script**\
  &#xNAN;_&#x74;ype:_ `String`
* **methods**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<ABIMethod>`
* **events**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<ABIEvent>`

***

## Dapp

_Type:_ `struct`

### Fields

* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **address** — Account address (P2K...)\
  &#xNAN;_&#x74;ype:_ `String`
* **chain**\
  &#xNAN;_&#x74;ype:_ `String`

***

## Event

_Type:_ `struct`

### Fields

* **address** — Account address (P2K...)\
  &#xNAN;_&#x74;ype:_ `String`
* **contract** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **kind**\
  &#xNAN;_&#x74;ype:_ `String`
* **data** — Event payload (hex)\
  &#xNAN;_&#x74;ype:_ `String`

***

## Governance

_Type:_ `struct`

### Fields

* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **value** — Numeric as string\
  &#xNAN;_&#x74;ype:_ `String`

***

## Interop

_Type:_ `struct`

### Fields

* **local**\
  &#xNAN;_&#x74;ype:_ `String`
* **external**\
  &#xNAN;_&#x74;ype:_ `String`

***

## Leaderboard

_Type:_ `struct`

### Fields

* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **rows**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<LeaderboardRow>`

***

## LeaderboardRow

_Type:_ `struct`

### Fields

* **address** — Account address (P2K...)\
  &#xNAN;_&#x74;ype:_ `String`
* **value** — Numeric as string\
  &#xNAN;_&#x74;ype:_ `String`

***

## Nexus

_Type:_ `struct`

### Fields

* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **platforms** — Interop platforms registered in the nexus\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Platform>`
* **tokens** — Deployed tokens\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Token>`
* **chains** — Chains in the nexus\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Chain>`
* **governance**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Governance>`
* **organizations**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<String>`

***

## Oracle

_Type:_ `struct`

### Fields

* **url**\
  &#xNAN;_&#x74;ype:_ `String`
* **content**\
  &#xNAN;_&#x74;ype:_ `String`

***

## Organization

_Type:_ `struct`

### Fields

* **id** — Identifier\
  &#xNAN;_&#x74;ype:_ `String`
* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **members**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<String>`

***

## Paginated

_Type:_ `struct`

### Fields

* **page**\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **pageSize**\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **total**\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **totalPages**\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **result**\
  &#xNAN;_&#x74;ype:_ `JSONValue`

***

## Peer

_Type:_ `struct`

### Fields

* **url**\
  &#xNAN;_&#x74;ype:_ `String`
* **version**\
  &#xNAN;_&#x74;ype:_ `String`
* **flags**\
  &#xNAN;_&#x74;ype:_ `String`
* **fee**\
  &#xNAN;_&#x74;ype:_ `String`
* **pow**\
  &#xNAN;_&#x74;ype:_ `UInt32`

***

## PhantasmaError

_Type:_ `struct`

### Fields

* **message**\
  &#xNAN;_&#x74;ype:_ `String`

***

## Platform

_Type:_ `struct`

### Fields

* **platform**\
  &#xNAN;_&#x74;ype:_ `String`
* **chain**\
  &#xNAN;_&#x74;ype:_ `String`
* **fuel**\
  &#xNAN;_&#x74;ype:_ `String`
* **tokens**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<String>`
* **interop**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Interop>`

***

## Receipt

_Type:_ `struct`

### Fields

* **nexus**\
  &#xNAN;_&#x74;ype:_ `String`
* **channel**\
  &#xNAN;_&#x74;ype:_ `String`
* **index**\
  &#xNAN;_&#x74;ype:_ `String`
* **timestamp** — Unix timestamp (seconds)\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **sender**\
  &#xNAN;_&#x74;ype:_ `String`
* **receiver**\
  &#xNAN;_&#x74;ype:_ `String`
* **script**\
  &#xNAN;_&#x74;ype:_ `String`

***

## Script

_Type:_ `struct`

### Fields

* **events**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Event>`
* **result**\
  &#xNAN;_&#x74;ype:_ `String`
* **results**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<String>`
* **oracles**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Oracle>`

***

## SendRawTx

_Type:_ `struct`

### Fields

* **hash** — Hex-encoded hash\
  &#xNAN;_&#x74;ype:_ `String`
* **error**\
  &#xNAN;_&#x74;ype:_ `String`

***

## Signature

_Type:_ `struct`

### Fields

* **Kind**\
  &#xNAN;_&#x74;ype:_ `String`
* **Data**\
  &#xNAN;_&#x74;ype:_ `String`

***

## Stake

_Type:_ `struct`

### Fields

* **amount** — Numeric as string\
  &#xNAN;_&#x74;ype:_ `String`
* **time** — Unix timestamp (seconds)\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **unclaimed**\
  &#xNAN;_&#x74;ype:_ `String`

***

## Storage

_Type:_ `struct`

### Fields

* **available**\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **used**\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **avatar**\
  &#xNAN;_&#x74;ype:_ `String`
* **archives**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Archive>`

***

## Swap

_Type:_ `struct`

### Fields

* **sourcePlatform** — Cross-chain platform names\
  &#xNAN;_&#x74;ype:_ `String`
* **sourceChain**\
  &#xNAN;_&#x74;ype:_ `String`
* **sourceHash**\
  &#xNAN;_&#x74;ype:_ `String`
* **sourceAddress**\
  &#xNAN;_&#x74;ype:_ `String`
* **destinationPlatform**\
  &#xNAN;_&#x74;ype:_ `String`
* **destinationChain**\
  &#xNAN;_&#x74;ype:_ `String`
* **destinationHash**\
  &#xNAN;_&#x74;ype:_ `String`
* **destinationAddress**\
  &#xNAN;_&#x74;ype:_ `String`
* **symbol** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **value** — Numeric as string\
  &#xNAN;_&#x74;ype:_ `String`

***

## Token

_Type:_ `struct`

### Fields

* **symbol** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **name** — String\
  &#xNAN;_&#x74;ype:_ `String`
* **decimals** — Token decimals\
  &#xNAN;_&#x74;ype:_ `Int32`
* **currentSupply** — Numeric as string\
  &#xNAN;_&#x74;ype:_ `String`
* **maxSupply** — Numeric as string\
  &#xNAN;_&#x74;ype:_ `String`
* **address** — Account address (P2K...)\
  &#xNAN;_&#x74;ype:_ `String`
* **owner** — Account address (P2K...)\
  &#xNAN;_&#x74;ype:_ `String`
* **flags** — Token flags (fungible, transferable, etc.)\
  &#xNAN;_&#x74;ype:_ `String`
* **script**\
  &#xNAN;_&#x74;ype:_ `String`
* **series**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<TokenSeries>`

***

## TokenData

_Type:_ `struct`

### Fields

* **ID** — Identifier\
  &#xNAN;_&#x74;ype:_ `String`
* **series**\
  &#xNAN;_&#x74;ype:_ `String`
* **mint**\
  &#xNAN;_&#x74;ype:_ `String`
* **chainName**\
  &#xNAN;_&#x74;ype:_ `String`
* **ownerAddress**\
  &#xNAN;_&#x74;ype:_ `String`
* **creatorAddress**\
  &#xNAN;_&#x74;ype:_ `String`
* **ram**\
  &#xNAN;_&#x74;ype:_ `String`
* **rom**\
  &#xNAN;_&#x74;ype:_ `String`
* **status**\
  &#xNAN;_&#x74;ype:_ `String`
* **infusion**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<TokenProperty>`
* **properties**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<TokenProperty>`

***

## TokenProperty

_Type:_ `struct`

### Fields

* **Key**\
  &#xNAN;_&#x74;ype:_ `String`
* **Value** — Numeric as string\
  &#xNAN;_&#x74;ype:_ `String`

***

## TokenSeries

_Type:_ `struct`

### Fields

* **seriesID** — Identifier\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **currentSupply** — Numeric as string\
  &#xNAN;_&#x74;ype:_ `String`
* **maxSupply** — Numeric as string\
  &#xNAN;_&#x74;ype:_ `String`
* **mode**\
  &#xNAN;_&#x74;ype:_ `TokenSeriesMode`
* **script**\
  &#xNAN;_&#x74;ype:_ `String`
* **methods**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<ABIMethod>`

***

## Transaction

_Type:_ `struct`

### Fields

* **hash** — Hex-encoded hash\
  &#xNAN;_&#x74;ype:_ `String`
* **chainAddress**\
  &#xNAN;_&#x74;ype:_ `String`
* **timestamp** — Unix timestamp (seconds)\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **blockHeight**\
  &#xNAN;_&#x74;ype:_ `Int32`
* **blockHash**\
  &#xNAN;_&#x74;ype:_ `String`
* **script** — Raw script (hex)\
  &#xNAN;_&#x74;ype:_ `String`
* **payload** — Opaque payload (hex)\
  &#xNAN;_&#x74;ype:_ `String`
* **events**\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Event>`
* **result**\
  &#xNAN;_&#x74;ype:_ `String`
* **fee**\
  &#xNAN;_&#x74;ype:_ `String`
* **signatures** — Attached signatures\
  &#xNAN;_&#x74;ype:_ `PHANTASMA_VECTOR<Signature>`
* **expiration**\
  &#xNAN;_&#x74;ype:_ `UInt32`
* **state**\
  &#xNAN;_&#x74;ype:_ `String`
* **sender**\
  &#xNAN;_&#x74;ype:_ `String`
* **gasPayer**\
  &#xNAN;_&#x74;ype:_ `String`
* **gasTarget**\
  &#xNAN;_&#x74;ype:_ `String`
* **gasPrice**\
  &#xNAN;_&#x74;ype:_ `String`
* **gasLimit**\
  &#xNAN;_&#x74;ype:_ `String`

***

## Validator

_Type:_ `struct`

### Fields

* **address** — Account address (P2K...)\
  &#xNAN;_&#x74;ype:_ `String`
* **type**\
  &#xNAN;_&#x74;ype:_ `String`

***
