IntroductionLast updated: 2020-10-01

Welcome to the Phantasma documentation!
Here you will be able to find all information that relates to the Phantasma Ecosystem.


What do you want to learn?
  • About the Phantasma economy? Read the economy section.
  • Run your own Phantasma node? Read about Spook.
  • Create your own Phantasma dapp? Read about Phantasma Link.
  • Join our team at Phantasma? Read about Phantom Force.

Oracles

Phantasma has builtin support for oracles. In a blockchain that supports contracts, the contracts have their own defined rules, however they can only work with data that is readily available to them, and usually this means the data stored in the chain, like account balances. An oracle is then a data source that allows contracts to obtain data from real world in a secure way.

There are two types of oracles available in Phantasma:

  • Native feeds - Those are the oracle data sources that come builtin with Phantasma. It includes supports for fetching prices of different assets, and also transaction fees costs for different platforms. The data itself is gathered by block producers.
  • Custom feeds - Those are the oracle data sources that are created for custom data feeds. It allows to connect Phantasma to third-party oracle providers like Chainlink.

Once a contract or transaction does an oracle read request, the data read from an oracle is appended to the current block. This ensures that the chain contents can be reproduced and verified later, using exactly the same data as the first time the block was generated.

For deeper diving, the code implementation of the oracles is available at Github.

NFTs

Phantasma native support for tokens also include proper builtin support for non-fungible tokens (aka NFTs), which can be minted on demand, with a single transaction currently being able to mint up to 100 NFTs, at a almost free cost.

NFTs in Phantasma support the following features:

  • TokenID - A unique 256-bit number used to identify a NFT instance.
  • SeriesID - A number that specifies which series a NFT instance belongs to.
  • MintID - A sequential number that indicates the order in which this instance was minted in it's series.
  • ROM - Each NFT instance contains it's own ROM area, where read-only data can reside. This data is saved during mint, and can't never be modified. The hash of this data is used to generate an unique ID for the NFT, meaning that each NFT instance must have unique ROM data. The ROM can be used to store what makes each instance unique, for example in a game that uses NFTs for characters, the ROM data could contain the character name and stats.
  • RAM - The counterpart to the ROM, the RAM is the data in a NFT that can change over a NFT lifetime.

Both ROM and ROM of a NFT just represent a variable size byte array, it's up for the dapps developers to chose the data structure of this blob. The TOMB compiler abstracts both ROM and RAM into developer friendly custom structs, that make easy to read and write those fields.

A developer wishing can easily query a Phantasma node to obtain information about a specific NFT instance, using the available endpoint GetNFT.

For deeper diving, the code implementation of the tokens is available at Github.

Events

When a Phantasma transaction is executed, whoever executed it will want to know whatever really happened, because while with simple transactions the fact that they were accepted is enough to know the result, with more complex transactions different outcomes can happen.
A transaction or contract can then trigger events, which are readable via the API.

A Phantasma event is composed of:

  • Kind - This is kind of event, which can be one of the builtin events or a custom event
  • Address - The address associated with the event.
  • Data - Binary data that depends on the event kind. Can be numbers, strings, structs or any other type.

For custom events used by contracts, the contract interface will define the actual content of the event, to make it easier for third-parties to read and use it.

Governance

Phantasma's next generation on-chain governance system removes the need for forks and other known drawbacks that legacy blockchains may experience when changes are required. Phantasma's governance system allows the blockchain rules to be parameterized and edited on-chain, once consensus is reached. Consensus is reached by running a poll among either the block producers or the whole community. The consensus poll operates in one of three different modes:

  • Unanimity: every voter must agree on the same result to reach consensus.
  • Majority: the majority of voters must agree on the same result to reach consensus.
  • Popularity: the result with the highest number of votes will reach consensus.

Consensus is always reached unless the top two (or more) options receive an equal number of votes.

Transactions

A transaction in Phantasma represents a unit of interaction with the ecosystem.
Resumed in a simple way, a transaction is a set of actions that change something in Phantasma chains.

Some examples:

  • An user sending assets from one address to another.
  • An user interacting with a dapp.
  • An user buying a NFT from a market.
  • An user transfering an asset from Ethereum into Phantasma via chain swaps.

Each Phantasma transaction will contain inside a small script, that when executed in a virtual machine will tell the nodes what operations the user wanted to do. The user account pays a fee which depends on the transaction complexity, more specifically, the amount and type of operations done within, and results of those operations are then commited, making them permanent.

A developer wishing can easily query a Phantasma node to obtain information about a specific transaction, using the available endpoint GetTransaction.

Transactions are also one of Phantasma objects that can be manipulated in raw format via the GetRawTransaction endpoint in the REST API.
Read more about raw data in the section about serialization.

For deeper diving, the code implementation of a Phantasma transaction is available at Github.

Chains

Phantasma is not a single blockchain, but rather a collection of multiple chains binded together by the Nexus.
However a main chain exists for each Nexus (either the public Nexus or a local development nexus). This chain has the name 'main' and is the result of the creation of a genesis block along with all default economy assets and organizations.

A developer wishing can easily query a Phantasma node to obtain information about a specific Phantasma chain, using the available REST API.

For deeper diving, the code implementation of a Phantasma chain is available at Github.

Address

A address in Phantasma represents a destination for assets.
Each address holds a specific balance of tokens, along with several custom data on dapps and builtin contracts.

Internally an address is a 34 byte array, where the first byte represents address type and the rest of the bytes store a public key.

In order to display it on a human-readable format, those bytes are then encoded using base58 format. The byte representing the address type is manipulated in order to specify the first letter of the human-readable address. This makes it possible to identify the type of address with a quick glance.

Address types:

  • Normal addresses start with 'P' and represent a user account.
    Eg: P2KACviijLauSeNPYDyov9g9Tsqn45eHGw6jCg4D3YzcNsh
  • System addresses start with 'S' and can represent contracts, tokens, chains or organizations.
    Eg: S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4
  • Interop addresses start with 'X' and represent an external address that belongs to other chain (eg: Ethereum or NEO) and are used for chain swaps.
    Eg: X2KK7BD2keGusLwMwuGpd33r1s6Yo3JxYtCbogwDveq2wpZ

The Address is one of the few non-primitive types that have native support in Phantasma Virtual Machine.

For deeper diving, the code implementation of a Phantasma address is available at Github.

Validator

Phantasma has adopted a variant of proof-of-stake PoS that requires users to have a stake in the network to become a validator (block producer). Validators are then rewarded with a share of the transaction fees. The validators also use a rotational scheduling per side-chain to define who the active block producer is. This process occurs in parallel for each side chain, allowing for horizontal scaling to boost the theoretical transactions per second of the chain. Each validator is responsible for accepting transactions from Phantasma users, verifying signatures & transaction contents. Each type of block producer will be rewarded differently for providing their computational resources to the Phantasma network:

  • Active Block Producers - receive 75% of the inflation of the governance token (SOUL), plus a minimum of 25% of the transaction fees for blocks which they validate.
  • Standby Block Producers - receive 25% of the daily inflation of the governance token (SOUL). The Phantasma chain will start with 10 active BPs and 15 standby BPs, and the number of total BPs will increase by 3 every year.

Tokens

Phantasma has native support for tokens, which represent the different kinds of assets that a blockchain can use for interact with the real world.

Tokens can be divided into two categories:

  • Fungible - Usually represent some kind of monetary unit or quantities of something. Each instance of a fungible token is completly indistinguishable from each other.
  • Non-Fungible - A non-fungible represents some kind of unique item, for example a game sword or a web domain. Check the section about NFTs for more details.

For deeper diving, the code implementation of the tokens is available at Github.

Storage

Phantasma decentralized storage was designed to enable the deployment of truly decentralized apps and utilize the full power that blockchain technology has to offer. Phantasma decentralized storage uses a file distribution method that makes it possible for developers to deploy dApps which are fully decentralized and hosted on-chain. Therefore, Phantasma dApps are immutable because users simply source the dApp data files from Phantasma's decentralized file storage, not from a website.

  • Files on Phantasma's decentralized storage solution are encrypted and distributed across all active block producers and only accessible through controlling a specific private key.
  • Every wallet has a specific amount of kilobytes (KB) allocated in proportion to the amount of staked SOUL. Every staked SOUL earns 40 KB of storage, which means that a Soul Master can initially store up to 1.9 GB of data.

Signatures

In blockchain terms, a signature is a piece of pseudo-random data that can be used as mathematical proof (when combined with a public address), in order to verify that another specific piece of data was created by a certain private key that matches the specified public key.

A signature is what allows users to sign their own transactions and then allow nodes to validate their authenticity.

There are many different algorithm to generate signatures. Phantasma currently supports EdDSA as it's prefered signing scheme, due to it's higher performance. It also supports ECDsa signatures for compatibility with older generation blockchains, like Bitcoin, Ethereum and NEO.

For deeper diving, the code implementation of a Phantasma signatures is available at Github.

Cosmic Swaps

Phantasma's cosmic swap framework is an on-chain liquidity solution which allows anyone to connect to this decentralized exchange system and benefit from the same liquidity pool. Cosmic swaps provide token swaps directly in the connected wallets without users having to go to a centralized exchange.

This framework follows a specific structure for specific wallet addresses to hold a balance of two different tokens. The price of each token is determined by their overall ratio in relation to each other at the current point in time. Users can tap into this address and exchange one of their surplus tokens for the token they require. This decreases the balance of the first token and increases the balance of the second. By having a price mechanism determined by the ratio between the balances in a specific cosmic swap address, any potential arbitrage opportunities that may arise from the difference in price for the tokens in this system will disappear over time as the market will constantly readjust to the equilibrium price level of those tokens across every token exchange provider.

Hash

A address in Phantasma represents a destination for assets.
Each address holds a specific balance of tokens, along with several custom data on dapps and builtin contracts.

Internally an address is a 34 byte array, where the first byte represents address type and the rest of the bytes store a public key.

In order to display it on a human-readable format, those bytes are then encoded using base58 format. The byte representing the address type is manipulated in order to specify the first letter of the human-readable address. This makes it possible to identify the type of address with a quick glance.

The Hash is one of the few non-primitive types that have native support in Phantasma Virtual Machine.

For deeper diving, the code implementation of a Phantasma hash is available at Github.

Blocks

A chain in Phantasma represents a typical blockchain composed of blocks, where each blocks connects to the previous block via a hash.
The hash of each block is produced from the actual contents of the block, and this together with the linking of the previous block hash is what gives imutability to a blockchain.
In other words, this system ensures that existing data can not be tampered with, making blockchain a unique kind of structure that offers many benefits compared to traditional databases.

Unlike most blockchains who continually generate blocks each X seconds, even if the block is empty, in Phantasma blocks are only generated if transactions are available. This is possible due to the consensus mechanism employed in Phantasma and it helps reducing the storage costs.
The time required to generate a new block can be as little as a few seconds, depending only on the amount of pending transactions. A Phantasma node can be configured with different periods. When the amount of pending transactions is small, it is more space efficient for a Phantasma node to generate blocks less frequently, but packing each one with more transactions.

A developer wishing can easily query a Phantasma node to obtain information about a specific block, using the available endpoint GetBlockByHash.

Blocks are also one of Phantasma objects that can be manipulated in raw format via the GetRawBlockByHash endpoint in the REST API.
Read more about raw data in the section about serialization.

For deeper diving, the code implementation of a Phantasma block is available at Github.

Organizations

Phantasma has builtin support for decentralized organizations. The organization system is used to power Phantom Force.

An organization behaves similar to an account, and so it is also identified by it's own address. However the main difference is that it can add other accounts as members of it, and then any operation done by the organization requires signatures from the majority of it's members.

An organization can also optionally have a contract attached to it, which allows to customize the behaviour of the organization, which includes for example custom rules for members and how the assets are transfered.

For deeper diving, the code implementation of the organization is available at Github.

Nexus

"A connection or series of connections linking two or more things."

From Oxford Dictionary

In Phantasma, the Nexus is the entity that binds the whole ecosystem together. It links together the Phantasma mainnet and all associated side-chains, tokens, organizations and dapps.

A developer wishing to connect their project with Phantasma can easily query a node to obtain information about the Nexus contents, using the available REST API.

It is also possible (and recommended) for a developer to deploy their own local Nexus, in order to easily develop their connections with dapps, contracts and any other kind of development and testing.

Keys

Phantasma uses asymmetric cryptography, also called public-key cryptography for most of it's internals. In simple words, this means that for each public key there is an associated private key. The private key is used to generate signatures, that can be used to mathematically verify that an piece of data was generated by someone who knows the private key of a specific public address, without revealing the private key.

A private key is also the only thing that an user of Phantasma really needs to store in it's own possession, everything else from public key to address and any asset held by the user are stored either in distributed nodes or derived from the private key using mathematical formulas.
Software used to manage private keys for users is called a wallet.

A Phantasma address is used to encode public keys in a human readable format.

For deeper diving, the code implementation of a Phantasma key pair is available at Github.

Accounts

Each user in Phantasma can own one or more accounts, which can hold different types of assets and are used to interact with dapps.

Each account is identified by it's own address and optionally can also have a name associated with it.
The name is a lower-case string without spaces, which can contain letters, numbers and underscore. The length must be between 3 and 15 characters in total.
The account names are integrated deeply into Phantasma inner core, so any place that requires an address can also accept a name instead, which will be automatically resolved into the equivalent address.

An account can also optionally have a contract attached to it, which allows to customize the behaviour of the account, which includes for example support multi-signature wallets.
Also note that all operations done on accounts are done via the builtin account contract

For deeper diving, the code implementation of the acount native contract is available at Github.

Virtual Machine

The core of Phantasma is built with powerful support for flexibility and customization, and this required the creation of a custom virtual machine to execute both transactions and contracts.

The Phantasma Virtual Machine is on a way comparable to Ethereum Virtual Machine (EVM), in a way that both execute custom code that spends "gas", altough Phantasma implementation is separated and built from zero.

To understand the full scope of the virtual machine requires a bit of development experience and some time studying it.
There is a full section describing the inner works of it.

For deeper diving, the code implementation of the Phantasma Virtual Machine is available at Github.

Chain Swaps

Phantasma's next generation on-chain governance system removes the need for forks and other known drawbacks that legacy blockchains may experience when changes are required. Phantasma's governance system allows the blockchain rules to be parameterized and edited on-chain, once consensus is reached. Consensus is reached by running a poll among either the block producers or the whole community. The consensus poll operates in one of three different modes:

  • Unanimity: every voter must agree on the same result to reach consensus.
  • Majority: the majority of voters must agree on the same result to reach consensus.
  • Popularity: the result with the highest number of votes will reach consensus.

Consensus is always reached unless the top two (or more) options receive an equal number of votes.

Staking

Phatasma staking was designed with ease of use and widespread adoption in mind. Paying all transaction fees in SOUL is not feasible and would be very inefficient. Phantasma designed a dual token system solution whereby users who stake SOUL are eligible to receive rewards in the form of KCAL. KCAL is the network resource token and is used to pay fees on every transaction that happens on-chain.

  • Each staked SOUL will earn the user 0.002 kcal per day.
  • Users who stake more than 50,000 SOUL will earn the title of Soul Master and earn extra rewards from a pool of 125,000 SOUL every month.
  • Soul Masters staking for greater than 90 days will receive a special CROWN NFT every 90 days starting from the time of Phantasma's genesis block. Each CROWN NFT boosts the users KCAL generation rate by 5% up to 100% by having twenty.
  • CROWN NFT contains a portion of the ecosystem's total KCAL fees for the last 90 days as well as 20% of the ecosystem incentive allocation, evenly distributed to all qualifying wallets.

Side Chains

A dApp running on its own side chain removes the risk that one single dApp could shut down the whole network whenever it's spammed. This gives developers the power they need to build revolutionary dApps with the supported languages C#, Java, Solidity and Python (support for additional programming languages will be added later).

  • Phantasma allows infinite side chains to be deployed.
  • Main and side chains can validate 10k transactions per block.
  • The maximum total transactions per second (TPS) is the amount of side chains plus the main chain multiplied by the maximum TPS of each chain.
  • Infinite side chains coupled with the inter-chain technology Phantasma implements in its network allows all chains to be connected.

Smart Contracts

Phantasma has builtin support for smart contracts. Smart contracts are a set of pre-defined operations and rules that once deployed in a blockchain, are imutable.

Smart contracts in Phantasma are defined by a set of components:

  • Name - This is an identifier in same format as account names. Each contract name also has an equivalent system address
  • Script - This a binary data blob of compiled code for the Phantasma Virtual Machine.
  • Interface - This a list of public methods and events supported by the contract.

Deploying a contract is normally done via a transaction altough can be done in other ways, for example a contract can deploy other contract. Deployment requires an extra cost, besides the normal fees.

For deeper diving, the code implementation of the contracts is available at Github.

EcosystemLast updated: 2020-10-01

Block Explorer

The Phantasma mainnet block explorer can be found here.

Fees

All core chain functionality except smart contract and token deployment charges the user a very low fee of around 0.003–0.005 KCAL, and these values can be adjusted through governance proposals. 50% of every transaction fee is burned, 25% is distributed to block producers and the remaining 25% is distributed to the CROWN reward pool unless the dApp being interacted with requires this portion to be sent to the dApp provider

Smart contract and token deployment comes at an increased cost, pegged to a fiat value by Phantasma’s native oracles. A developer who wishes to deploy a smart contract for his dApp pays a fee of $10 in its KCAL equivalent. The full amount of KCAL is immediately burned on contract deployment.

For a project building on top of Phantasma that needs its own token, a fee of $100 in its KCAL equivalent is charged on token creation — also this 100% burned. The same applies to artists and others who wish to deploy their own NFT minting smart contract to be able to mint $ARTISTNAME NFTs instead of the default $GHOST NFTs native to GhostMarket.

dApp providers may charge additional fees for using their products, such as GhostMarket and uMint's KCAL fees for creating NFTs.

For the full details, please refer to this article on the Phantasma Token Economy.

Dual Token System

Single token systems suffer from an unsolvable problem: Using the ecosystem drains your ownership share of the token supply. You decrease your influence on the evolution of the chain or project the more you use it. A dual token system allows us to escape this flawed design by separating the governance and fuel tokens.

Earning fuel tokens through staking the governance token allows anyone to use the ecosystem without suffering decreasing influence — and that is why we all earn KCAL by staking SOUL. It also allows anyone to opt to acquire the fuel token only if they have no desire to influence the future of the ecosystem, but simply want to play that amazing game or send some NFTs to their friends.

SOUL is the governance token of the Phantasma blockchain, and the evolution of Phantasma is driven by the SOUL holders. SOUL holders earn voting rights, storage allocations on Phantasma's decentralized storage solution, KCAL through staking SOUL, allows you to claim your on-chain wallet name and quarterly CROWNs if you stake more than 50,000 SOUL.

KCAL fuels everything in the Phantasma ecosystem, and is needed for every single type of transaction on the blockchain, giving it a wide range of use cases. In short, anything that happens on the Phantasma blockchain consumes KCAL, and everything that happens on the Phantasma blockchain burns KCAL; Transactions, staking, unstaking, claiming KCAL, cross chain swap transactions, cosmic swaps between native Phantasma assets, minting non fungible tokens, deploying smart contracts, deploying new tokens and more.

For the full details, please refer to this article on the Phantasma Token Economy.

dApps

Pavillion - Blockchain Gaming Platform

Intuitive hub bridging the gap between mainstream gaming and blockchain. Pavillion is a one stop shop for hosting and connecting chain enabled games to private wallets via the power of Phantasma. Pavillion makes it easy for users to buy, browse, trade and access on-chain assets for hosted titles. It also features seamless connectivity of blockchain to Steam.

Visit Pavillion

22 Racing Series - RTS-Racing with eSports DNA in its core

Wipeout meets Gran Turismo. The first blockchain enabled AAA game title has launched on Phantasma, bringing an intense mix of high speed, realistic physics and strategy to your gaming rig. Build custom cars from scratch or race prebuilt ones – all in game assets are NFTs on Phantasma Chain, fully tradable.

Visit 22 Racing Series

GhostMarket - Cross Chain NFT marketplace

The only cross-chain Non-Fungible Token (NFT) marketplace in the world! GhostMarket features fully trustless NFT trading facilitated by smart contracts on each integrated blockchain. As a result you can safely discover, buy or sell any NFT without worrying about exposing yourself to risk of lost funds.

Visit GhostMarket

uMint NFT Factory - NFT Self-Minting

From the independent developer group GhostDevs comes the uMint NFT Factory – the ultra simple way for anyone to start creating their very own Phantasma Smart NFTs.

Visit uMint

Blood Rune - Legacy Role Playing NFT Card Game

Blood Rune is a legacy role-playing card game of heroes in search of fame, fortune, love and power in a world trapped in an alternate time stream. Blood Rune utilizes blockchain technology and NFTs powered by Phantasma Chain. ETA for launch: Q3 2021.

Visit Blood Rune

Ghost Festival - Addictive and Competitive Mobile Game

An addictive and competitive casual game featuring NFT powered digital asset ownership, Ghost Festival allows gamers to truly own what they earn, collecting or trading their in-game assets as they please.

Visit Ghost Festival

Crusaders Dynasty - A Medieval Fantasy Battle Royale

An NFT based Medieval/Fantasy Battle Royale game where you spawn in teams of 5, collect gear and fight to the death!

Visit Crusaders Dynasty

Moonjar - Let Phantasma fill your dreams

A simple and fun game, Moonjar allows you to compete against other brewers for the prize pot - the last brewer to contribute tokens before the brewing process finishes wins it all.

Visit Moonjar

Nacho Men 2.0 - Fight your way to the top

Powered by Phantasma you can trade, collect and battle with mexican wrestlers called "Luchadores". Nacho Men 2.0 is in development

Visit Nacho Men

Phantasma dMail - Decentralized Social Networking

Phantasma dMail enables you to securely connect with others without knowing anything more than their public address. Want to reach the owner of that artwork NFT you covet so much? Send them a dMail! Anonymously reaching out to the winner of the last 22 Racing Series World Championship? Phantasma dMail allows you to. Currently in development.

Nodes

Spook implements various Phantasma standard features in a single easy to use tool. These tools can be leveraged from the SDK allowing developers to setup a full Integrated Development Environment(IDE) locally.

For development of Phantasma applications it is recommended you run a Phantasma node locally. It acts as your own personal blockchain network.

To view the code, read the instructions and deploy your own instance of Spook, head over to Github.

Exchanges

Kucoin

SOUL:BTC trading pair on Kucoin

SOUL:ETH trading pair on Kucoin


Uniswap

SOUL:ETH trading pair on Uniswap

KCAL:ETH trading pair on Uniswap

Bridges

In today's blockchain world, interoperability is important. Traditionally, a user was restricted only to the blockchain they were using and could not communicate to the "outside world". With the advent of oracles and smart contracts, you can now move assets back and forth across different blockchains such as Neo and Ethereum. This gives the user options.

With Phantasma, users can do a 1:1 cross-chain and bi-directional swap of fungible tokens across Neo and Ethereum. This is only possible with a bridge. For example, a bridge allows the user to send ether from the ethereum blockchain to the Phantasma blockchain all the while maintaining the same supply and price on both ends. This is achieved by using oracles and smart contracts. When you are using our wallets (Poltergeist or Ecto) and sending an asset such as ether, you are really sending it to a smart contract. Swapping tokens consists of a two-step process that requires your signature. This process is actually happening when you claim. When you sign, you're confirming the destination address matches the source address. Since your private key is linked to these addresses, it works seamlessly.

The use case of oracles are an important aspect of using a bridge. Oracles feed information from the outside world to the blockchain via smart contracts. For example, if you were to use our bridge to swap ether to Phantasma, our oracles use an API such as cryptocompare to feed information to our smart contracts. Once Cosmic Swaps 2.0 is live, this is how the kcal:soul price ratio will be determined when trading. Additionally, Phantasma uses three API's for Ethereum's blockchain to aggregate gas fees and caches it, adding 20 gwei to the transaction to avoid any stuck swaps in the event a user sets too low of a gas fee for themselves.

Block Producers

Phantasma is made up of a decentralized network of nodes - also known as Block Producers. These BP's are responsible for validating transactions on the blockchain. The block producers use a rotational scheduling per side-chain to define who the active block producer is. This process occurs in parallel for each side chain, which will allow for horizontal scaling to boost the theoretical TPS of Phantasma Chain. Each block producer is responsible for accepting transactions from Phantasma users, verifying signatures & transaction contents. Once the transaction is accepted, the block producer adds it to the next block

Inflation is important because it incentivizes the growth of the ecosystem. This will inspire developers to build dApps on Phantasma. It also serves the purpose of helping to fund Phantom Force our decentralized developer team and it also pays our block producers. The yearly inflation is coded to be 3%. On top of receiving fees for verifying transactions, block producers receive 2% of the annual 3%, or 0.75% per quarter.

The amount of BPs is based on the amount of side chains & transactions. There will be 10 active BP + 150% standby BPs.All active BPs will rotate over all chains, which results that all active BPs will continuously produce a block for every chain. Every BP can also verify multiple chains at the same time. At the end of every quarter there will be a voting window for people to vote on BPs to become (or remain) an active BP to make sure that the network remains decentralized

In order to become a block producer, you must:

  • Stake 50,000 soul (also known as a Soul Master)
  • Technical know-how to run and manage a server
  • Be voted by the community
  • Maintain uptime
  • Types of Block Producers

    Active Block Producer

    Active block producers are actively rotating and adding blocks, verifying transactions and earning a percentage of the chain's fees. These BP's are initially hand selected by the team, but will eventually be determined by the community through voting, whose voting power is calculated by taking the amount of soul and finding its square root.

    Active Block Producer receive:

  • 75% of the BPs pool rewards divided proportionally to the voting ratio
  • 25% of Energy transaction fees
  • 50% of Main Chain fees
  • 50% of Ghost Chain fees
  • Standby Block Producer

    Standby block producers are those whose status is online, but is not currently producing blocks or verifying transactions. These BP's still earn a percentage of the chain fees, but they are much smaller. When voted by the community, these BP's then become Active block producers.

    Standby Block Producer receive:

  • 25% of the BPs pool
  • Rewards divided proportionally to the voting ratio
  • Phantom Force

    Phantom Force is Phantasma's decentralized community of developers and core contributors who wish to contribute and build the best user experience & ecosystem on Phantasma Chain and within the Phantasma dApps.

    Funded by 1/3rd of Phantasma's 3% annual inflation, Phantom Force developers can submit dApp concepts and other proposals for peer review and receive sustainable funding to boost their efforts. All developers are free to reach out to current Phantom Force members if they wish to join the community.

    The Phantom Force functions as a DAO.

    PhantasmaSDK

    One of the many challenges that blockchain developers face today is lack of tools, documentation and software development kits. In order for this technology to go mainstream, we need to have the resources to help onboard as many developers as we can. We believe that building a blockchain isn't enough, but we need to make Phantasma the most developer friendly blockchain out there - and that's why we created our Phantasma SDKs!

    Supported Languages

  • C#
  • C++
  • Golang
  • JavaScript
  • Java
  • PHP
  • Python

    To develop dApps on Phantasma, it is recommended to run a Phantasma node locally. Use either the pre-compiled build of Spook which comes bundled in the official SDK release or compile yourself from the source available in the official repository.

    Head over to our PhantasmaSDK GitHub to get started.

  • Inflation

    SOUL sustains the entire ecosystem through a low 3% annual inflation, in addition to the fixed Soul Master SOUL rewards which amounts to 125,000 SOUL monthly. Of the 3%:

    - 1% is allocated to Phantasma’s decentralized developer and core contributor group Phantom Force.

    - 1% is allocated to Phantasma’s consensus nodes, the block producers. 75% of this is allocated to active block producers, while the remaining 25% is shared among standby block producers.

    - The remaining 1% is distributed to block producers until it has been allocated to various future incentives — at the time of writing 0.2% has already been allocated to the CROWN rewards pool, while the remaining 0.8% remain unallocated. A part of this remainder will be allocated towards sustainable liquidity provider incentives.

    - The Soul Master SOUL reward system is a perpetual incentivization of long term loyal token holders.

    While the fixed Soul Master rewards are minted and automatically distributed on a monthly basis, the remaining inflation is split into four automatically distributed quarterly allocations.

    To sum up the inflation numbers, SOUL starts out with approximately 4.5% annual inflation with one relative (3%) and one fixed (125,000 monthly) component. As time moves towards infinity the fixed portion of the inflation will correspond to a smaller percentage, and SOUL’s annual inflation will be moving towards 3%.

    KCAL is generated only through staking SOUL. There is no additional minting or inflationary mechanisms than staking. For each SOUL you stake, you generate 0.002 KCAL every single day.

    All transaction types on Phantasma require a KCAL fee, and 50% of every transaction fee is burned.

    Smart contract and token deployment require a larger amount of KCAL as deployment fee, pegged to a fiat amount. 100% of this fee is immediatley burned on contract deployment.

    In addition, dApp providers are contributing, with GhostMarket burning half their earned KCAL fees, further driving a downwards pressure on the KCAL supply.

    The balance between inflationary (staking) and deflationary (burning) measures guard the KCAL token economy, and the ecosystem blossoms the KCAL supply will eventually reach its equilibrium. After this KCAL may potentially becoming deflationary — after which governance proposals can be submitted to avoid a too strong deflationary component draining the available supply.

    For the full details, please refer to this article on the Phantasma Token Economy.

    Wallets

    Poltergeist is the primary wallet for many SOULdiers as it provides a full Phantasma, Ethereum and NEO wallet from every private key. Phantasma Link integration allows easy use with all Phantasma dApps. Available for both Android and desktop computers. Cross chain swaps - Full wallet functionality - Full NFT capabilities - Mint NFTs through Phantasma Link - Stake and claim your rewards

    Poltergeist can be found here: Wallet downloads

    Many users desire a wallet that is always accessible without launching a second app – like the excellent Ethereum wallet Metamask. So of course Phantasma provides an powerful and user friendly browser extension wallet. Intuitive – capable – connected. Cross chain swaps - Full wallet functionality - Full NFT capabilities - Mint NFTs through Phantasma Link - Stake and claim your rewards

    Ecto can be found here: Wallet downloads

    The Pavillion Steam connected game hub also features a built-in wallet, and allows you to easily create a wallet using your Steam account details or import an existing one.

    The Pavillion game hub can be found here: Pavillion

    New version in development. An extended wallet for the Phantasma blockchain. Features built in NFT sales for games/dApps on Phantasma and an NFT marketplace.

    Phantom wallet is currently being rebuilt as a browser independant version.

    SpookLast updated: 2020-10-01

    Swiss army knife for Phantasma developers.


    Description

    Spook implements various Phantasma standard features in a single easy to use tool. These tools can be leveraged from the SDK allowing developers to setup a full Integrated Development Environment(IDE) locally.

    To learn more about Phantasma, please read the White Paper and check the official repository.

    Node

    For development of Phantasma applications it is recommended you run a Phantasma node locally. It acts as your own personal blockchain network. The following instructions explain how to do this on Windows. Other operating systems are also supported and instructions can be found in the following section of this document. You can later move to the official test network where multiple nodes are running, in order to test your dapp under a more realistic enviroment.

    To get started download a pre-compiled build which comes bundled in the official SDK release: https://github.com/phantasma-io/PhantasmaSDK/releases/latest - the files you need reside under Tools\Spook in the .zip file

    Note - you will need .NET runtime 3.1 installed on your desktop https://dotnet.microsoft.com/download

    To bootstrap your own test net just run a single instance of Phantasma node using the following arguments:

    spook-cli -node.wif=L2LGgkZAdupN2ee8Rs6hpkc65zaGcLbxhbSDGq8oh6umUxxzeW25 -nexus.name=simnet
    #To enable the RPC server add this argument to the line above
    -rpc.enabled=true
    
    

    Otherwise you can compile the latest yourself from the source available in this repository.

    To compile and publish the source code for you will need the following:

    Pull or download the following GitHub Repositories

    Ensure both of these sit in the same root directory on your PC and are in folders that match the above. For example:

    • C:\PATH\Phantasma\PhantasmaChain
    • C:\PATH\Phantasma\PhantasmaSpook

    Build and publish the code

    • Open Visual Studio
    • Open the PhantasmaSpook\Spook.sln solution
    • Build the solution
    • Publish the Spook.CLI Project

    The files needed to run a node will now be in PhantasmaSpook\Phantasma.CLI\Publish

    As per above you can run it with the following command:

    dotnet Spook.dll -node.wif=L2LGgkZAdupN2ee8Rs6hpkc65zaGcLbxhbSDGq8oh6umUxxzeW25 -nexus.name=simnet
    #To enable the RPC server add this argument to the line above
    -rpc.enabled=true
    
    

    Configuration and startup

    There are two different possibilities to configure Spook:

    Every config paramater is usable in the configuration file and as a cli argument.

    • Config file config.json.
    • CLI arguments -> overwrite config file values.

    Spook can be run in three different modes:

    • no interface (default)
    • shell ("shell.enabled": true)
    • tui ("gui.enabled": true)

    Note, you cannot have shell and tui enabled at the same time.

    This is what the default configuration looks like:

    {
        "ApplicationConfiguration": {
            "Node": {
                "web.logs": false,
                "block.time": 2,
                "minimum.fee": 100000,
                "minimum.pow": 0,
                "api.proxy.url": "",
                "nexus.name": "simnet",
                "node.mode": "validator",
                "node.wif": "L2LGgkZAdupN2ee8Rs6hpkc65zaGcLbxhbSDGq8oh6umUxxzeW25",
                "api.log": false,
                "node.port": 7777,
                "profiler.path": "",
                "has.sync": true,
                "has.mempool": true,
                "mempool.log": false,
                "has.events": false,
                "has.relay": false,
                "has.archive": false,
                "has.rpc": true,
                "has.rest": true,
                "rpc.port": 7081,
                "rest.port": 7078,
                "nexus.bootstrap": true,
                "genesis.timestamp": 0,
                "api.cache": true,
                "readonly": false,
                "sender.host": "",
                "sender.threads": 8,
                "sender.address.count": 100,
                "storage.path": "",
                "verify.storage.path": "",
                "db.storage.path": "",
                "oracle.path": "",
                "storage.backend": "db",
                "convert.storage": false,
                "random.swap.data": false
            },
    
            "Oracle": {
                "neoscan.api": "mankinighost.phantasma.io:4000",
                "neo.rpc.nodes": ["http://mankinighost.phantasma.io:30333"],
                "crypto.compare.key": "4e6ffe0dedfd49d2e182b706b72e736fa027844181d179dc5310f115deeb29be",
                "swaps.enabled": true,
                "phantasma.interop.height": "0",
                "neo.interop.height": "4261049",
                "eth.interop.height": "0",
                "neo.wif": ""
            },
    
            "Plugins": {
                "plugin.refresh.interval": 1,
                "tps.plugin": true,
                "ram.plugin": true,
                "mempool.plugin": true
            },
    
            "Simulator": {
                "simulator.enabled": true,
                "simulator.dapps": [""],
                "simulator.generate.blocks": false
            },
    
            "App": {
                "gui.enabled": false,
                "shell.enabled": false,
                "node.start": true,
                "app.name": "SPK",
                "config": "",
                "prompt": "[{0}] spook> ",
                "history": ".history",
                "log.file": "spook.log"
            },
    
            "RPC": {
                "rpc.address": "localhost",
                "rpc.port": 7654
            }
        }
    }
    
    

    APIsLast updated: 2020-10-01

    Phantasma SDK for Unity

    Download the SDK here.
    This SDK is devided in 4 Major Scripts


    PhantasmaLinkClient

    Small description of the script

    Public methods
    public decimal GetBalance(string symbol);
    public void Login(Action<bool> callback);
    public void SendTransaction(string chain, byte[] script, byte[] payload, Action<Hash, string> callback);
    
    

    PhantasmaAPI.Unity

    Small description of the script

    Public methods

    Inside the PhantasmaAPI

    public IEnumerator GetAccount(string addressText, Action<Account> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetContract(string contractName, Action<Contract> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator LookUpName(string name, Action<string> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetBlockHeight(string chainInput, Action<int> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetBlockTransactionCountByHash(string blockHash, Action<int> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetBlockByHash(string blockHash, Action<Block> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetRawBlockByHash(string blockHash, Action<string> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetBlockByHeight(string chainInput, uint height, Action<Block> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetRawBlockByHeight(string chainInput, uint height, Action<string> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetTransactionByBlockHashAndIndex(string blockHash, int index, Action<Transaction> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetAddressTransactions(string addressText, uint page, uint pageSize, Action<AccountTransactions, int, int> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetAddressTransactionCount(string addressText, string chainInput, Action<int> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null); 
    public IEnumerator SendRawTransaction(string txData, Action<string> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator InvokeRawScript(string chainInput, string scriptData, Action<Script> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null); 
    public IEnumerator GetTransaction(string hashText, Action<Transaction> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator CancelTransaction(string hashText, Action<string> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetChains(Action<Chain[]> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetTokens(Action<Token[]> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetToken(string symbol, Action<Token> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetTokenData(string symbol, string IDtext, Action<TokenData> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetTokenTransfers(string tokenSymbol, uint page, uint pageSize, Action<Transaction[], int, int> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null); 
    public IEnumerator GetTokenTransferCount(string tokenSymbol, Action<int> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetTokenBalance(string addressText, string tokenSymbol, string chainInput, Action<Balance> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetAuctionsCount(string chainAddressOrName, string symbol, Action<int> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null); 
    public IEnumerator GetAuctions(string chainAddressOrName, string symbol, uint page, uint pageSize, Action<Auction[], int, int> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetAuction(string chainAddressOrName, string symbol, string IDtext, Action<Auction> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetArchive(string hashText, Action<Archive> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator WriteArchive(string hashText, int blockIndex, string blockContent, Action<Boolean> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null); 
    public IEnumerator GetABI(string chainAddressOrName, string contractName, Action<ABIContract> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetPeers(Action<Peer[]> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator RelaySend(string receiptHex, Action<Boolean> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator RelayReceive(string accountInput, Action<Receipt[]> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);  
    public IEnumerator GetEvents(string accountInput, Action<Event[]> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator SettleSwap(string sourcePlatform, string destPlatform, string hashText, Action<string> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetSwapsForAddress(string accountInput, Action<Swap[]> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetPlatforms(Action<Platform[]> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator GetValidators(Action<Validator[]> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator SignAndSendTransaction(PhantasmaKeys keys, string nexus, byte[] script, string chain, Action<string> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator SignAndSendTransactionWithPayload(PhantasmaKeys keys, string nexus, byte[] script, string chain, string payload, Action<string> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null);
    public IEnumerator SignAndSendTransactionWithPayload(IKeyPair keys, string nexus, byte[] script, string chain, byte[] payload, Action<string> callback, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback = null, Func customSignFunction = null);
    public static bool IsValidPrivateKey(string address)
    public static bool IsValidAddress(string address);
    
    

    WebClient

    Small description of the script

    Public methods
    public static IEnumerator RPCRequest(string url, string method, int timeout, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback,Action<DataNode> callback, params object[] parameters);
    public static IEnumerator RPCRequestEx(string url, string method, int timeout, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback,Action<DataNode> callback, DataNode parametersNode);
    public static IEnumerator RESTRequest(string url, int timeout, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback, Action<DataNode> callback);
    public static IEnumerator RESTRequest(string url, string serializedJson, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback, Action<DataNode> callback);
    public static IEnumerator Ping(string url, Action<EPHANTASMA_SDK_ERROR_TYPE, string> errorHandlingCallback, Action<TimeSpan> callback);
    
    

    Log

    Small description of the script

    Public methods
    public static void SwitchUtcTimestamp(bool utcTimestamp);
    public static void DisableMultilinePadding(bool disableMultilinePadding);
    public static void WriteWarning(string message, Level level = Level.Logic);
    public static void WriteError(string message, Level level = Level.Logic);
    public static void Write(string message, Level level = Level.Logic, UnityDebugLogMode unityDebugLogMode = UnityDebugLogMode.Normal);
    public static void WriteJson(DataNode node, string message = "", Level level = Level.Logic, UnityDebugLogMode unityDebugLogMode = UnityDebugLogMode.Normal);
    public static void WriteXML(DataNode node, string message = "", Level level = Level.Logic, UnityDebugLogMode unityDebugLogMode = UnityDebugLogMode.Normal);
    
    

    JSON-RPC methods

    JSON RPC API Reference


    getAccount

    Returns the account name and balance of given address.

    Parameters
    1. string Address of account.
    params: {
        "account":"P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34"
    }
    
    
    Returns

    Account - A Account object, or error if address is invalid.

    • address: string - Given address.
    • name: string - Name of given address.
    • stakes: Array - Array of stake objects.
    • stakes - amount: string - Amount of tokens staked.
    • stakes - time: timestamp - Time.
    • stakes - unclaimed: string - Amount of unclaimed tokens.
    • storage: Array - Array of storage objects.
    • storage - available: number - Number if decimals.
    • storage - used: number - Storage used.
    • storage - avatar: blob - Blob of the image.
    • balances: Array - Array of balance objects.
    • balance - chain: string - Name of the chain.
    • balance - symbol: string - Token symbol.
    • balance - amount: string - Amount of tokens.
    • balance - decimals: number - Number if decimals.
    • txs: Array - Array of strings.

    Error return.

    • jsonrpc: string -String with the jsonrpc version.
    • error: Object - Error object.
    • error - code: number - Name of the chain.
    • error - message: string - Error message.
    • id: number - ID of will return 0.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getAccount","params":{"account":"P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34"},"id":1}'
    
    // Result
    {
       "jsonrpc": "2.0",
       "result": {
          "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
          "name": "genesis",
          "stakes": {
             "amount": "5000000000000",
             "time": 1615546566,
             "unclaimed": "3000000000000"
          },
          "stake": "5000000000000",
          "unclaimed": "3000000000000",
          "relay": "0",
          "validator": "Primary",
          "storage": {
             "available": 2048000000,
             "used": 0,
             "avatar": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAJFBMVEWcnJz////39/etra3e3t6lpaW1tbXn5+fW1tbv7+/Ozs69vb2ss4cPAAAAk0lEQVQoz2OgJWA2QOWnKAqVIfM5BIGgAUlgIUhAAsFnEwSDBLgAC0SgAC7ABBEQhQsYQgSEMQRwa2GHGopu7QaEQxpBfBF0pzsg+3WioKAkkn9ZHcFaAuACRhBDleEaFCECQjBNQYJQoAoVcIQJiCA5Cx4iCIcjHB+IEBCFBigcSMHMRDV1IkJAEiygiBAQYmAAABD5F4JgcTScAAAAAElFTkSuQmCC"
          },
          "balances": [
             {
                   "chain": "main",
                   "amount": "94899900000000",
                   "symbol": "SOUL",
                   "decimals": 8
             },
             {
                   "chain": "main",
                   "amount": "9887099232828419",
                   "symbol": "KCAL",
                   "decimals": 10
             },
             {
                   "chain": "main",
                   "amount": "99000",
                   "symbol": "MKNI",
                   "decimals": 0
             }
          ],
          "txs": [
             "07A33AFF587DFF86DE2829D0FD2A8AA52FDF75A8580EF031A666537B60CE35ED",
             "F8AC51DAFB2DA550516071F7A4AD2A9C116B87F3045E90A67CEAE268CBED9DA4",
             "7DCD1157752296B514F925339AEA11CCD5F9D31ED259167BB8E8561A7ED8944B",
             "3EA00C4699D3E18623A30A058B6373944540447BF87138FD47C729A0DCC7C57C",
             "9F7559B2F0F66266F73E5D25BA2CDA46C90FADA70D850CC3995869A1AED3454D",
             "04FF98C43E08019DDC4F1D2B152A452A3193E4EE32BA5B3ED183CA729672EF58",
             "971424470FE7E0F9445A15D1378F8B0F114D9DC2C95491FEC42AF1D2655A0C4E",
             "4CD1CBA53C0D62CF2DB13DB5F798E6BA17012B96E7FDF6D29E8E5E3D9768615B",
             "01DEA7A6E4A47D0270399A918AF7FC1E13A24DD02A633099FFC19360766E8442",
             "7316981546C0F87A3902447CB423AEAF11E60891B544B69E3E8BB1B2BDCFB1F2",
             "01FC7AA79D5DE7F995A2BC42EF64809EBAA89822C4EEE779ADC2C820BA199384",
             "0491253DF9424AEAF9D228C09D3390E69779D8D78C4C010EF735AF2C659FF113",
             "07C9D24E2386B712A69410467C005408455D7940C6DA4799594C1E828675964D",
             "07091A38DF59772C0533CD5F3AE83A3EE3D8E9074D9E212ADE335DDDEB86D941",
             "F12F08527FFD81213811239BB2F236CD1E8ACDA3D268E951F06AA82950DDB0AE"
          ]
       },
       "id": 1
    }
    
    

    lookUpName

    Returns the address that owns a given name.

    Parameters
    1. string Name of account.
    params: {
       "name":"phantom_force"
    }
    
    
    Returns

    string - A string object, or error if address is invalid.

    • jsonrpc: string - String with the jsonrpc version.
    • result: string - Address of given name.
    • id: number - ID of the user.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"lookUpName","params":{"name":"phantom_force"},"id":1}'
    
    // Result
    {
       "jsonrpc": "2.0",
       "result": "S3dGUjVwYa31AxdthdpsuyBKgX1N65FnoQhUkSgYbUEdRp4",
       "id": 1
    }
    
    

    getBlockHeight

    Returns the height of a chain.

    Parameters
    1. string Address or name of chain.
    params : {
       "chainInput":"main"
    }
    
    
    Returns

    number - A number, or error if chain is invalid.

    • jsonrpc: string - String with the jsonrpc version.
    • result: string - Number of Block height.
    • id: number - ID of the user.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getBlockHeight","params":{"chainAddressOrName":"main","blockHash":"8FBCC7B1869EE44FF37022310A38841523B4AEDE0AB414AADB2A019D27EA17C9"},"id":1}'
    
    // Result
    {
       "jsonrpc": "2.0",
       "result": "77",
       "id": 1
    }
    
    

    getBlockTransactionCountByHash

    Returns the number of transactions of given block hash or error if given hash is invalid or is not found.

    Parameters
    1. string Address or name of chain.
    2. string Hash of block.
    params: {
       "chainAddressOrName":"main",
       "blockHash":"8FBCC7B1869EE44FF37022310A38841523B4AEDE0AB414AADB2A019D27EA17C9"
    }
    
    
    Returns

    number - A number, or error if block hash is invalid.

    • jsonrpc: string - String with the jsonrpc version.
    • result: number - Number of Transactions from a specific hash.
    • id: number - ID of the user.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getBlockTransactionCountByHash","params":{"chainAddressOrName":"main","blockHash":"8FBCC7B1869EE44FF37022310A38841523B4AEDE0AB414AADB2A019D27EA17C9"},"id":1}'
    
    // Result
    {
       "jsonrpc": "2.0",
       "result": 1,
       "id": 1
    }
    
    

    getBlockByHash

    Returns information about a block by hash.

    Parameters
    1. string Hash of block.
    params: {
       "chainAddressOrName":"main",
       "blockHash":"D717455B81E9A0EE90D6D4B7CC7C476AF4D039AFBEE0505DF1EBFC7B1E395E55"
    }
    
    
    Returns

    Block - A Block object, or error if block hash is invalid.

    • hash: string - Hash of the object.
    • previousHash: string - Previous hash of the object.
    • timestamp: timestamp - Time when the hash was produced.
    • height: number - Height of the hash.
    • chainAddress: number - Address of the chain that the address is in.
    • protocol: number - Name of given address.
    • txs: Array - Array of txs objects.
    • txs - hash: string - Hash of the object.
    • txs - chainAddress: string - Address of the chain that the address is in.
    • txs - timestamp: string - Time when the hash was produced.
    • txs - blockHeight: string - Height of the hash block.
    • txs - blockHash: string - Hash of the block
    • txs - script: string - Script encoded.
    • txs - payload: string - Payload encoded.
    • txs - events: Array - Array of events objects.
    • txs - events - address: string - Address of event.
    • txs - events - contract: string - Type of contract.
    • txs - events - kind: string - Type of token.
    • txs - events - data: string - Data of the event.
    • txs - result: string - Result of the transaction.
    • txs - fee: string - Fee of transaction.
    • txs - signatures: string - Array of signatures.
    • txs - signatures - Kind: string - Type of signature.
    • txs - signatures - Data: string - Data of signature.
    • txs - expiration: timestamp - Experiation of the contract.
    • validatorAddress: number - Address that validates the hash.
    • reward: number - Reward of the hash.
    • events: Array - Array of events objects.
    • events - address: string - Address of event.
    • events - contract: string - Type of contract.
    • events - kind: string - Type of token.
    • events - data: string - Data of the event.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getBlockByHash","params":{"blockHash":"D717455B81E9A0EE90D6D4B7CC7C476AF4D039AFBEE0505DF1EBFC7B1E395E55"},"id":1}'
    
    // Result
    {
       "jsonrpc": "2.0",
       "result": {
           "hash": "D717455B81E9A0EE90D6D4B7CC7C476AF4D039AFBEE0505DF1EBFC7B1E395E55",
           "previousHash": "F6520F325E5E0A41B9E675914DCFCBF24F2B06EDFBF623A4E10F4E54EAA921D5",
           "timestamp": 1615560444,
           "height": 29,
           "chainAddress": "S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4",
           "protocol": 5,
           "txs": [
               {
                   "hash": "986A082C008D5215480D038BAC401F3F16E3C54386695A39C82C0FBD1098AFE4",
                   "chainAddress": "S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4",
                   "timestamp": 1615560444,
                   "blockHeight": 29,
                   "blockHash": "D717455B81E9A0EE90D6D4B7CC7C476AF4D039AFBEE0505DF1EBFC7B1E395E55",
                   "script": "0D00030328230003000D000304A086010003000D000223220000000000000000000000000000000000000000000000000000000000000000000003000D000223220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A8403000D000408416C6C6F7747617303000D0004036761732D00012E010D000223220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A8403000D000404706C617903000D000405736C6F74732D00012E010D000223220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A8403000D0004085370656E6447617303000D0004036761732D00012E010B",
                   "payload": "534C4F545376312E30",
                   "events": [
                       {
                           "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                           "contract": "gas",
                           "kind": "TokenStake",
                           "data": "044B43414C0500E9A43500046D61696E"
                       },
                       {
                           "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                           "contract": "gas",
                           "kind": "GasEscrow",
                           "data": "2202000D6E4079E36703EBD37C00722F5891D28B0E2811DC114B129215123ADCCE360504A086010003282300"
                       },
                       {
                           "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                           "contract": "slots",
                           "kind": "TokenStake",
                           "data": "044B43414C0600E40B540200046D61696E"
                       },
                       {
                           "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                           "contract": "gas",
                           "kind": "GasPayment",
                           "data": "2202000D6E4079E36703EBD37C00722F5891D28B0E2811DC114B129215123ADCCE360504A0860100036F0500"
                       },
                       {
                           "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                           "contract": "gas",
                           "kind": "TokenClaim",
                           "data": "044B43414C05A0695A2D00046D61696E"
                       },
                       {
                           "address": "S3d9nBL5LAUFhQ14Wzyb3JJRrXXB6atUuoL1uibkT3bttjw",
                           "contract": "gas",
                           "kind": "TokenBurn",
                           "data": "044B43414C05607C240400046D61696E"
                       },
                       {
                           "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                           "contract": "gas",
                           "kind": "CrownRewards",
                           "data": "044B43414C058001130200046D61696E"
                       },
                       {
                           "address": "S3dBVkyE9kdfbBjh7HMEr1BfPTg53CeSWaj3srYzBTZ4vyK",
                           "contract": "gas",
                           "kind": "TokenClaim",
                           "data": "044B43414C058001130200046D61696E"
                       }
                   ],
                   "result": "0600",
                   "fee": "139100000",
                   "signatures": [
                       {
                           "Kind": "Ed25519",
                           "Data": "4022E040CAB589838E2644EF94265608893615E3135272D7BE0A9CBF931077D738F6301416494C151DD7A119C03FE805C8807F957972B428413A24C41A5E54F702"
                       }
                   ],
                   "expiration": 1615561644
               }
           ],
           "validatorAddress": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
           "reward": "0",
           "events": [
               {
                   "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "contract": "block",
                   "kind": "TokenClaim",
                   "data": "044B43414C058001130200046D61696E"
               }
           ]
       },
       "id": 1
    } 
    
    

    getRawBlockByHash

    Returns a serialized string, containing information about a block by hash.

    Parameters
    1. string Hash of block.
    params: {
       "blockHash" : "D717455B81E9A0EE90D6D4B7CC7C476AF4D039AFBEE0505DF1EBFC7B1E395E55"
    }
    
    
    Returns

    string - A string object, or error if block hash is invalid.

    • jsonrpc: string - String with the jsonrpc version.
    • result: string - Raw block.
    • id: number - ID of the user.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getRawBlockByHash","params":{"blockHash" : "D717455B81E9A0EE90D6D4B7CC7C476AF4D039AFBEE0505DF1EBFC7B1E395E55"},"id":1}'
    
    // Result
    {
       "jsonrpc": "2.0",
       "result": "021D00FC7E4B6020D521A9EA544E0FE1A423F6FBED062B4FF2CBCF4D9175E6B9410A5E5E320F52F62202000D6E4079E36703EBD37C00722F5891D28B0E2811DC114B129215123ADCCE3605050120E4AF9810BD0F2CC8395A698643C5E3163F1F40AC8B030D4815528D002C086A980807220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A840367617310044B43414C0500E9A43500046D61696E0F220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A84036761732C2202000D6E4079E36703EBD37C00722F5891D28B0E2811DC114B129215123ADCCE360504A08601000328230007220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A8405736C6F747311044B43414C0600E40B540200046D61696E10220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A84036761732C2202000D6E4079E36703EBD37C00722F5891D28B0E2811DC114B129215123ADCCE360504A0860100036F050008220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A840367617310044B43414C05A0695A2D00046D61696E062202002FE840E13244A9D748883574C1F1B7B1D7020EB39D0735B8F91EF5CF6F35173E0367617310044B43414C05607C240400046D61696E38220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A840367617310044B43414C058001130200046D61696E08220200496ACA80E4D8F29FB8E8CD816C3AFB48D3F103970B3A2EE1600C08CA67326DEE0367617310044B43414C058001130200046D61696E0200020600000108220100279FB052FA82D619FB33581321E3A5F592507EAC995907B504876ABF6F62421F05626C6F636B10044B43414C058001130200046D61696E220100279FB052FA82D619FB33581321E3A5F592507EAC995907B504876ABF6F62421F0C53504B312E332D62657461310140B40C2F0239689C990B8C7B3B2321E9819B55505D3CD552738CFB82B60576F21C0777FFE0FC6392C7FC9F931E8123D622FFA242043CF0A9B308BF6780203EE90500",
       "id": 1
    }
    
    

    getBlockByHeight

    Returns information about a block by height and chain.

    Parameters
    1. string Address or name of chain.
    2. number Height of block.
    params : {
       "blockHash" : "D717455B81E9A0EE90D6D4B7CC7C476AF4D039AFBEE0505DF1EBFC7B1E395E55",
       "height":29
    }
    
    
    Returns

    Block - A Block object, or error if block hash is invalidor chain is invalid.

    • result: object - Given address.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getBlockByHeight","params":{"blockHash" : "D717455B81E9A0EE90D6D4B7CC7C476AF4D039AFBEE0505DF1EBFC7B1E395E55","height":"29"},"id":1}'
    
    // Result
    
    

    getRawBlockByHeight

    Returns a serialized string, in hex format, containing information about a block by height and chain.

    Parameters
    1. string Address or name of chain.
    2. number Height of block.
    params : {
       "height":"29"
    }
    
    
    Returns

    string - A string object, or error if block hash is invalidor chain is invalid.

    • result: string - hash block.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getRawBlockByHeight","params":{"height":"29"},"id":1}'
    
    // Result
    
    

    getTransactionByBlockHashAndIndex

    Returns the information about a transaction requested by a block hash and transaction index.

    Parameters
    1. string Chain or Address name.
    2. string Hash of block.
    3. number Index of transaction.
    params : {
       "chainAddressOrName" : "main",
       "blockHash":"D717455B81E9A0EE90D6D4B7CC7C476AF4D039AFBEE0505DF1EBFC7B1E395E55",
       "index":"0"
    }
    
    
    Returns

    Transaction - A Transaction object, or error if block hash is invalidor index transaction is invalid.

    • hash: string - Hash of the object.
    • chainAddress: string - Address of the chain that the address is in.
    • timestamp: string - Time when the hash was produced.
    • blockHeight: string - Height of the hash block.
    • blockHash: string - Hash of the block
    • script: string - Script encoded.
    • payload: string - Payload encoded.
    • events: Array - Array of events objects.
    • events - address: string - Address of event.
    • events - contract: string - Type of contract.
    • events - kind: string - Type of token.
    • events - data: string - Data of the event.
    • result: string - Result of the transaction.
    • fee: string - Fee of transaction.
    • signatures: string - Array of signatures.
    • signatures - Kind: string - Type of signature.
    • signatures - Data: string - Data of signature.
    • expiration: timestamp - Experiation of the contract.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getTransactionByBlockHashAndIndex","params":{"chainAddressOrName":"main","blockHash":"D717455B81E9A0EE90D6D4B7CC7C476AF4D039AFBEE0505DF1EBFC7B1E395E55", "index":"0"},"id":1}'
    
    // Result
    {
       "jsonrpc": "2.0",
       "result": {
             "hash": "986A082C008D5215480D038BAC401F3F16E3C54386695A39C82C0FBD1098AFE4",
             "chainAddress": "S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4",
             "timestamp": 1615560444,
             "blockHeight": 29,
             "blockHash": "D717455B81E9A0EE90D6D4B7CC7C476AF4D039AFBEE0505DF1EBFC7B1E395E55",
             "script": "0D00030328230003000D000304A086010003000D000223220000000000000000000000000000000000000000000000000000000000000000000003000D000223220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A8403000D000408416C6C6F7747617303000D0004036761732D00012E010D000223220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A8403000D000404706C617903000D000405736C6F74732D00012E010D000223220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A8403000D0004085370656E6447617303000D0004036761732D00012E010B",
             "payload": "534C4F545376312E30",
             "events": [
                {
                   "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                   "contract": "gas",
                   "kind": "TokenStake",
                   "data": "044B43414C0500E9A43500046D61696E"
                },
                {
                   "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                   "contract": "gas",
                   "kind": "GasEscrow",
                   "data": "2202000D6E4079E36703EBD37C00722F5891D28B0E2811DC114B129215123ADCCE360504A086010003282300"
                },
                {
                   "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                   "contract": "slots",
                   "kind": "TokenStake",
                   "data": "044B43414C0600E40B540200046D61696E"
                },
                {
                   "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                   "contract": "gas",
                   "kind": "GasPayment",
                   "data": "2202000D6E4079E36703EBD37C00722F5891D28B0E2811DC114B129215123ADCCE360504A0860100036F0500"
                },
                {
                   "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                   "contract": "gas",
                   "kind": "TokenClaim",
                   "data": "044B43414C05A0695A2D00046D61696E"
                },
                {
                   "address": "S3d9nBL5LAUFhQ14Wzyb3JJRrXXB6atUuoL1uibkT3bttjw",
                   "contract": "gas",
                   "kind": "TokenBurn",
                   "data": "044B43414C05607C240400046D61696E"
                },
                {
                   "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                   "contract": "gas",
                   "kind": "CrownRewards",
                   "data": "044B43414C058001130200046D61696E"
                },
                {
                   "address": "S3dBVkyE9kdfbBjh7HMEr1BfPTg53CeSWaj3srYzBTZ4vyK",
                   "contract": "gas",
                   "kind": "TokenClaim",
                   "data": "044B43414C058001130200046D61696E"
                }
             ],
             "result": "0600",
             "fee": "139100000",
             "signatures": [
                {
                   "Kind": "Ed25519",
                   "Data": "4022E040CAB589838E2644EF94265608893615E3135272D7BE0A9CBF931077D738F6301416494C151DD7A119C03FE805C8807F957972B428413A24C41A5E54F702"
                }
             ],
             "expiration": 1615561644
       },
       "id": 1
    }
    
    

    getAddressTransactions

    Returns last X transactions of given address.

    Parameters
    1. string Address of account.
    2. number Index of page to return.
    3. number Number of items to return per page.
    params : {
       "account":"P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34", 
       "page":"1", 
       "pageSize":"2"
    }
    
    
    Returns

    AccountTransactions - A AccountTransactions object, or error if address is invalidor page is invalidor pageSize is invalid.

    • page: number - Page requested.
    • pageSize: number - Size of each page.
    • total: number - Total number of records.
    • totalPages: number - Total number of pages.
    • result: string - Name of given address.
    • result - address: string - Given address.
    • result - txs: array - Array of transactions.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getAddressTransactions","params":{"account":"P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34", "page":"1", "pageSize":"2"},"id":1}'
    
    // Result
    {
       "jsonrpc": "2.0",
       "result": {
           "page": 1,
           "pageSize": 2,
           "total": 15,
           "totalPages": 8,
           "result": {
               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
               "txs": [
                   {
                       "hash": "F12F08527FFD81213811239BB2F236CD1E8ACDA3D268E951F06AA82950DDB0AE",
                       "chainAddress": "S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4",
                       "timestamp": 1615832880,
                       "blockHeight": 77,
                       "blockHash": "677B3D695E5CE1902480AECF714354D2AEF2C60E684791E30FF83091ABC19FD8",
                       "script": "0D00030340060003000D000304A086010003000D000223220000000000000000000000000000000000000000000000000000000000000000000003000D000223220100279FB052FA82D619FB33581321E3A5F592507EAC995907B504876ABF6F62421F03000D000408416C6C6F7747617303000D0004036761732D00012E010D00030600E87648170003000D000404534F554C03000D000223220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A8403000D000223220100279FB052FA82D619FB33581321E3A5F592507EAC995907B504876ABF6F62421F03000D00041652756E74696D652E5472616E73666572546F6B656E7307000D000223220100279FB052FA82D619FB33581321E3A5F592507EAC995907B504876ABF6F62421F03000D0004085370656E6447617303000D0004036761732D00012E010B",
                       "payload": "504754322E322E31",
                       "events": [
                           {
                               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                               "contract": "gas",
                               "kind": "TokenStake",
                               "data": "044B43414C050068890900046D61696E"
                           },
                           {
                               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                               "contract": "gas",
                               "kind": "GasEscrow",
                               "data": "2202000D6E4079E36703EBD37C00722F5891D28B0E2811DC114B129215123ADCCE360504A086010003400600"
                           },
                           {
                               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                               "contract": "entry",
                               "kind": "TokenSend",
                               "data": "04534F554C0600E876481700046D61696E"
                           },
                           {
                               "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                               "contract": "entry",
                               "kind": "TokenReceive",
                               "data": "04534F554C0600E876481700046D61696E"
                           },
                           {
                               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                               "contract": "gas",
                               "kind": "GasPayment",
                               "data": "2202000D6E4079E36703EBD37C00722F5891D28B0E2811DC114B129215123ADCCE360504A0860100037D0100"
                           },
                           {
                               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                               "contract": "gas",
                               "kind": "TokenClaim",
                               "data": "044B43414C05E00B440700046D61696E"
                           },
                           {
                               "address": "S3d9nBL5LAUFhQ14Wzyb3JJRrXXB6atUuoL1uibkT3bttjw",
                               "contract": "gas",
                               "kind": "TokenBurn",
                               "data": "044B43414C05C0EA210100046D61696E"
                           },
                           {
                               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                               "contract": "gas",
                               "kind": "CrownRewards",
                               "data": "044B43414C0460F59000046D61696E"
                           },
                           {
                               "address": "S3dBVkyE9kdfbBjh7HMEr1BfPTg53CeSWaj3srYzBTZ4vyK",
                               "contract": "gas",
                               "kind": "TokenClaim",
                               "data": "044B43414C04007C9200046D61696E"
                           }
                       ],
                       "result": "",
                       "fee": "38100000",
                       "signatures": [
                           {
                               "Kind": "Ed25519",
                               "Data": "403C428DB33DB902AEB209B252AC6530A32A310FCC300B5AEE3CB99B6E571158D05927B8AFBF026A98CCBEE259CF4423F039841FE1F6D5EC40145E7CCC0B03BC00"
                           }
                       ],
                       "expiration": 1615834080
                   },
                   {
                       "hash": "07091A38DF59772C0533CD5F3AE83A3EE3D8E9074D9E212ADE335DDDEB86D941",
                       "chainAddress": "S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4",
                       "timestamp": 1615562324,
                       "blockHeight": 32,
                       "blockHash": "1017CBB0CDB1F0EB06EEE312F79E012246F04D91D42D1A59F57DF95205847BDD",
                       "script": "0D0003030F270003000D000304A086010003000D000223220000000000000000000000000000000000000000000000000000000000000000000003000D000223220100279FB052FA82D619FB33581321E3A5F592507EAC995907B504876ABF6F62421F03000D000408416C6C6F7747617303000D0004036761732D00012E010D00027E060D676574536C6F744E756D6265720300000000000A6765744A61636B706F740393000000000B636865636B57696E6E657206F7000000010466726F6D0804706C617900BD020000010466726F6D080A496E697469616C697A65003C04000001056F776E657208096F6E557067726164650095040000010466726F6D080003000D0002FD2505000D02040E52756E74696D652E52616E646F6D070204020D0303020900270203040D0203026400250402030203010D03040E52756E74696D652E52616E646F6D070304030D0403020900270304050D0303020A00250503040204020D04040E52756E74696D652E52616E646F6D070404040D050302090027040506020603020104020205230405060203042306040503050B0B000D0204044B43414C03020D02022202003B478A0A3FC655DF9DF052728812851B6B22DDF49DAA1130FF37EAFED057414F03020D0004094164647265737328290700040203020D01041252756E74696D652E47657442616C616E63650701040103010B0B00040103010D000409416464726573732829070004010D0203020600030202010303030D03040E736C6F744D616368696E6554727903030D030405736C6F747303030D0204074D61702E486173070204020A02B4020D0403020300030402010503050D05040E736C6F744D616368696E6554727903050D050405736C6F747303050D0404074D61702E476574070404040204030203050D0603026400260506070207040203060D0703020A00260607080D0603020A00270806070207050203070D080302640027070809020906020407020508190708090205070206081907080A16090A070A0789020D09022202003B478A0A3FC655DF9DF052728812851B6B22DDF49DAA1130FF37EAFED057414F03090D0004094164647265737328290700040902090806209400040A030A0D0A04044B43414C030A02010A030A02080A030A0D09041652756E74696D652E5472616E73666572546F6B656E73070902010A030A0D0A040E736C6F744D616368696E65547279030A0D09040A4D61702E52656D6F766507090D0906010103090B08B3020002010A030A0D0A040E736C6F744D616368696E65547279030A0D09040A4D61702E52656D6F7665070900000D0206010003020B0B00040103010D0004094164647265737328290700040102010303030D02041152756E74696D652E49735769746E6573730702040209020A030D03040E7769746E657373206661696C65640C03000D0203020600030202010303030D03040E736C6F744D616368696E6554727903030D030405736C6F747303030D0204074D61702E48617307020402150202090269030D03041663616C6C20636865636B57696E6E65722066697273740C03000D03022202003B478A0A3FC655DF9DF052728812851B6B22DDF49DAA1130FF37EAFED057414F03030D000409416464726573732829070004030203020D0403020A000D0503020A002C0504040D05030201002505040402040302030503050D0504044B43414C0305020205030502010503050D04041652756E74696D652E5472616E73666572546F6B656E730704062001000405020504020406030602010603060D06040E736C6F744D616368696E6554727903060D0504074D61702E5365740705030402010703070620F80004060206050B00040203020D000409416464726573732829070004020202030203010D04030622A5B98B830003040D03040F52756E74696D652E5365745365656407030D020408446174612E53657403010D00040561646D696E030007020B000D010408446174612E4765740D020405736C6F74730D000302080003000D00040561646D696E030003020701040303030D00040941646472657373282907000403040103010D0004094164647265737328290700040102030403040D02041152756E74696D652E49735769746E65737307020402090223050D04040E7769746E657373206661696C65640C04000B0B03000D000405736C6F747303000D000223220100279FB052FA82D619FB33581321E3A5F592507EAC995907B504876ABF6F62421F03000D00041752756E74696D652E55706772616465436F6E747261637407000D000223220100279FB052FA82D619FB33581321E3A5F592507EAC995907B504876ABF6F62421F03000D0004085370656E6447617303000D0004036761732D00012E010B",
                       "payload": "A7000000",
                       "events": [
                           {
                               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                               "contract": "gas",
                               "kind": "TokenStake",
                               "data": "044B43414C056043993B00046D61696E"
                           },
                           {
                               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                               "contract": "gas",
                               "kind": "GasEscrow",
                               "data": "2202000D6E4079E36703EBD37C00722F5891D28B0E2811DC114B129215123ADCCE360504A0860100030F2700"
                           },
                           {
                               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                               "contract": "entry",
                               "kind": "TokenBurn",
                               "data": "044B43414C0687C51C34CB00046D61696E"
                           },
                           {
                               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                               "contract": "entry",
                               "kind": "ContractUpgrade",
                               "data": "05736C6F7473"
                           },
                           {
                               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                               "contract": "gas",
                               "kind": "GasPayment",
                               "data": "2202000D6E4079E36703EBD37C00722F5891D28B0E2811DC114B129215123ADCCE360504A0860100034D0200"
                           },
                           {
                               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                               "contract": "gas",
                               "kind": "TokenClaim",
                               "data": "044B43414C054085163800046D61696E"
                           },
                           {
                               "address": "S3d9nBL5LAUFhQ14Wzyb3JJRrXXB6atUuoL1uibkT3bttjw",
                               "contract": "gas",
                               "kind": "TokenBurn",
                               "data": "044B43414C05C09BC00100046D61696E"
                           },
                           {
                               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                               "contract": "gas",
                               "kind": "CrownRewards",
                               "data": "044B43414C04E04DE000046D61696E"
                           },
                           {
                               "address": "S3dBVkyE9kdfbBjh7HMEr1BfPTg53CeSWaj3srYzBTZ4vyK",
                               "contract": "gas",
                               "kind": "TokenClaim",
                               "data": "044B43414C0480D4E100046D61696E"
                           }
                       ],
                       "result": "",
                       "fee": "58900000",
                       "signatures": [
                           {
                               "Kind": "Ed25519",
                               "Data": "4072936F5CDAEFD790A9C32218D5584788447E0705FAC9A8EDD1E51581E2CD1E27C0526E7FBEC64A9608CE78BBCDF65443725AFF3AF8311F2C5F7380210044A40E"
                           }
                       ],
                       "expiration": 1615562624
                   }
               ]
           }
       },
       "id": 1
    }
    
    

    getAddressTransactionCount

    Get number of transactions in a specific address and chain

    Parameters
    1. string Address of account.
    2. string Name or address of chain, optional.
    params:{
       "account":"P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34"
    }
    
    
    Returns

    number - A number, or error if address is invalidor chain is invalid.

    • jsonrpc: string - String with the jsonrpc version.
    • result: number - Number of transactions.
    • id: number - ID of the user.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getAddressTransactionCount","params":{"account":"P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34", "page":"1", "pageSize":"2"},"id":1}'
    
    // Result
    {
       "jsonrpc": "2.0",
       "result": 15,
       "id": 1
    }
    
    

    sendRawTransaction

    Allows to broadcast a signed operation on the network, but it's required to build it manually.

    Parameters
    1. string Serialized transaction bytes, in hexadecimal format.
    params:{
       "txData" : ""
    }
    
    
    Returns

    string - A string object, or error if rejected by mempoolor script is invalidor failed to decoded transaction.

    • address: string - Given address.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"sendRawTransaction","params":{"txData":""},"id":1}'
    
    // Result
    
    

    invokeRawScript

    Allows to invoke script based on network state, without state changes.

    Parameters
    1. string Address or name of chain.
    2. string Serialized script bytes, in hexadecimal format.
    params:{
       "chainInput":"main", 
       "scriptData":""
    }
    
    
    Returns

    Script - A Script object, or error if script is invalidor failed to decoded script.

    • address: string - Given address.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"invokeRawScript","params":{"chainInput":"main", "scriptData":""},"id":1}'
       
    // Result
    
    

    getTransaction

    Returns information about a transaction by hash.

    Parameters
    1. string Hash of transaction.
    params:{
       "hashText":"F12F08527FFD81213811239BB2F236CD1E8ACDA3D268E951F06AA82950DDB0AE"
    }
    
    
    Returns

    Transaction - A Transaction object, or error if hash is invalid.

    • result: object - Transactions object.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getTransaction","params":{"hashText":"F12F08527FFD81213811239BB2F236CD1E8ACDA3D268E951F06AA82950DDB0AE"},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": {
           "hash": "F12F08527FFD81213811239BB2F236CD1E8ACDA3D268E951F06AA82950DDB0AE",
           "chainAddress": "S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4",
           "timestamp": 1615832880,
           "blockHeight": 77,
           "blockHash": "677B3D695E5CE1902480AECF714354D2AEF2C60E684791E30FF83091ABC19FD8",
           "script": "0D00030340060003000D000304A086010003000D000223220000000000000000000000000000000000000000000000000000000000000000000003000D000223220100279FB052FA82D619FB33581321E3A5F592507EAC995907B504876ABF6F62421F03000D000408416C6C6F7747617303000D0004036761732D00012E010D00030600E87648170003000D000404534F554C03000D000223220100F0635964DBF97E043EA0FB5DD67CE69369F5AE19E4B4B67121ABB6C14A558A8403000D000223220100279FB052FA82D619FB33581321E3A5F592507EAC995907B504876ABF6F62421F03000D00041652756E74696D652E5472616E73666572546F6B656E7307000D000223220100279FB052FA82D619FB33581321E3A5F592507EAC995907B504876ABF6F62421F03000D0004085370656E6447617303000D0004036761732D00012E010B",
           "payload": "504754322E322E31",
           "events": [
               {
                   "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "contract": "gas",
                   "kind": "TokenStake",
                   "data": "044B43414C050068890900046D61696E"
               },
               {
                   "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "contract": "gas",
                   "kind": "GasEscrow",
                   "data": "2202000D6E4079E36703EBD37C00722F5891D28B0E2811DC114B129215123ADCCE360504A086010003400600"
               },
               {
                   "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "contract": "entry",
                   "kind": "TokenSend",
                   "data": "04534F554C0600E876481700046D61696E"
               },
               {
                   "address": "P2KKxTbPSBKMRRL9vw6NYXsNCKTX1ZfoE2bvAuq6VwZSYuy",
                   "contract": "entry",
                   "kind": "TokenReceive",
                   "data": "04534F554C0600E876481700046D61696E"
               },
               {
                   "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "contract": "gas",
                   "kind": "GasPayment",
                   "data": "2202000D6E4079E36703EBD37C00722F5891D28B0E2811DC114B129215123ADCCE360504A0860100037D0100"
               },
               {
                   "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "contract": "gas",
                   "kind": "TokenClaim",
                   "data": "044B43414C05E00B440700046D61696E"
               },
               {
                   "address": "S3d9nBL5LAUFhQ14Wzyb3JJRrXXB6atUuoL1uibkT3bttjw",
                   "contract": "gas",
                   "kind": "TokenBurn",
                   "data": "044B43414C05C0EA210100046D61696E"
               },
               {
                   "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "contract": "gas",
                   "kind": "CrownRewards",
                   "data": "044B43414C0460F59000046D61696E"
               },
               {
                   "address": "S3dBVkyE9kdfbBjh7HMEr1BfPTg53CeSWaj3srYzBTZ4vyK",
                   "contract": "gas",
                   "kind": "TokenClaim",
                   "data": "044B43414C04007C9200046D61696E"
               }
           ],
           "result": "",
           "fee": "38100000",
           "signatures": [
               {
                   "Kind": "Ed25519",
                   "Data": "403C428DB33DB902AEB209B252AC6530A32A310FCC300B5AEE3CB99B6E571158D05927B8AFBF026A98CCBEE259CF4423F039841FE1F6D5EC40145E7CCC0B03BC00"
               }
           ],
           "expiration": 1615834080
       },
       "id": 1
    }
    
    

    cancelTransaction

    Removes a pending transaction from the mempool.

    Parameters
    1. string Hash of transaction.
    params:{
       "hashText":"F12F08527FFD81213811239BB2F236CD1E8ACDA3D268E951F06AA82950DDB0AE"
    }
    
    
    Returns

    string - A string object, or error if hash is invalid.

    • result: string - Result.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"cancelTransaction","params":{"hashText":"F12F08527FFD81213811239BB2F236CD1E8ACDA3D268E951F06AA82950DDB0AE"},"id":1}'
      
    // Result
    {
       "jsonrpc": "2.0",
       "error": {
           "code": -32603,
           "message": "already in chain"
       },
       "id": 0
    }
    
    

    getChains

    Returns an array of all chains deployed in Phantasma.

    Parameters

    none

    params: {}
    
    
    Returns

    Chain - A Chain object.

    • name: string - Name of the chain.
    • address: string - Address of the Chain.
    • height: string - Height of the Chain.
    • organization: string - Given Organization.
    • contracts: array - Array of contracts in the Chain.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getChains","params":{},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": [
           {
               "name": "main",
               "address": "S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4",
               "height": 77,
               "organization": "validators",
               "contracts": [
                   "validator",
                   "governance",
                   "consensus",
                   "account",
                   "exchange",
                   "swap",
                   "interop",
                   "stake",
                   "storage",
                   "relay",
                   "ranking",
                   "privacy",
                   "mail",
                   "friends",
                   "market",
                   "sale",
                   "slots"
               ]
           }
       ],
       "id": 1
    }
    
    

    getNexus

    Returns info about the nexus.

    Parameters
    1. boolean Extended search, Optional (default: false)
    params : {}
    
    
    Returns

    Nexus - A Nexus object.

    • name: string - Name of the nexus.
    • platforms: array - Array of platform object on the chain.
    • token: array - Array of token object on the chain.
    • chains: array - Array of chain object.
    • governance: array - Array of governance.
    • organizations: array - Array of organizations.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getNexus","params":{},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": {
           "name": "simnet",
           "platforms": [
               {
                   "platform": "neo",
                   "chain": "S3dEMj6oFEgfcwSpriewXBR5xcnwu4MJa9KmHgyaKqEhoM6",
                   "fuel": "GAS",
                   "tokens": [
                       "SOUL",
                       "NEO",
                       "GAS"
                   ],
                   "interop": [
                       {
                           "local": "X54DbFHTbzhEFHFHmm3fDVjeTpDmXsAeVEz4U4GK6ZQYe6b",
                           "external": "Aai16mqdg9b453ZggXn3SmJH45na3oCEoU"
                       }
                   ]
               },
               {
                   "platform": "ethereum",
                   "chain": "S3dJoptTKf9ASn2tWxHh9fkGH8xjHbhYutNNHkzR1WSmpK6",
                   "fuel": "ETH",
                   "tokens": [
                       "ETH"
                   ],
                   "interop": [
                       {
                           "local": "X7DzbZPdeGpqeRdxHkusj6zUH8nzQjTPsrbRdFWQ5gEsmi7",
                           "external": "0xBF35FB8C5B4171496E052EEBFB5BEA29A932171C"
                       }
                   ]
               }
           ],
           "tokens": [
               {
                   "symbol": "SOUL",
                   "name": "Phantasma Stake",
                   "decimals": 8,
                   "currentSupply": "286362600000000",
                   "maxSupply": "0",
                   "burnedSupply": "0",
                   "address": "S3dJWaLDKYhhTHf28EfsP6ateZ5w5TeZUSV8wM9JNfaD79E",
                   "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "flags": "Transferable, Fungible, Divisible, Stakable, Swappable",
                   "script": "0B"
               },
               {
                   "symbol": "KCAL",
                   "name": "Phantasma Energy",
                   "decimals": 10,
                   "currentSupply": "9988092095432583",
                   "maxSupply": "0",
                   "burnedSupply": "12907904567417",
                   "address": "S3dP6LRC3f3xw4ZZ2HH9BQHzYNHuHS8vetbCQpkMFvRmVEF",
                   "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "flags": "Transferable, Fungible, Divisible, Fuel, Burnable",
                   "script": "0B"
               },
               {
                   "symbol": "USD",
                   "name": "Dollars",
                   "decimals": 8,
                   "currentSupply": "0",
                   "maxSupply": "0",
                   "burnedSupply": "0",
                   "address": "S3dHVD6WN35zQvVLEGrdZuBm3gK1YSJLhQwRNe448v9W5hS",
                   "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "flags": "Transferable, Fungible, Divisible, Fiat",
                   "script": "0B"
               },
               {
                   "symbol": "CROWN",
                   "name": "Phantasma Crown",
                   "decimals": 0,
                   "currentSupply": "0",
                   "maxSupply": "0",
                   "burnedSupply": "0",
                   "address": "S3d79FvexQeerRioAY3pGYpNPFx7oJkMV4KazdTHdGDA5iy",
                   "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "flags": "Transferable, Burnable",
                   "script": "0B"
               },
               {
                   "symbol": "NEO",
                   "name": "NEO",
                   "decimals": 0,
                   "currentSupply": "0",
                   "maxSupply": "100000000",
                   "burnedSupply": "0",
                   "address": "S3d8KEdUw38RGpvidVzWibp52V3MxDKboLk98s9FvWyYkEa",
                   "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "flags": "Transferable, Fungible, Finite, Swappable",
                   "script": "0B"
               },
               {
                   "symbol": "GAS",
                   "name": "GAS",
                   "decimals": 8,
                   "currentSupply": "0",
                   "maxSupply": "10000000000000000",
                   "burnedSupply": "0",
                   "address": "S3d9YMoxd3najgNa4J5H1P7LXz9DA1jMRV7n4PiQtVV2A7b",
                   "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "flags": "Transferable, Fungible, Finite, Divisible, Swappable",
                   "script": "0B"
               },
               {
                   "symbol": "ETH",
                   "name": "Ethereum",
                   "decimals": 18,
                   "currentSupply": "0",
                   "maxSupply": "0",
                   "burnedSupply": "0",
                   "address": "S3dP28ogxjaAbCt1bnujJCGawcsz66fEgkL9mwHvnAJUUrT",
                   "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "flags": "Transferable, Fungible, Divisible, Swappable",
                   "script": "0B"
               },
               {
                   "symbol": "MKNI",
                   "name": "Mankini Token",
                   "decimals": 0,
                   "currentSupply": "100000",
                   "maxSupply": "100000",
                   "burnedSupply": "0",
                   "address": "S3dJhVLEaQ5H1633puCNDXfnUDthbuRaBPtUg6vnjk2aqq6",
                   "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
                   "flags": "Transferable, Fungible, Finite",
                   "script": "000D0402220100279FB052FA82D619FB33581321E3A5F592507EAC995907B504876ABF6F62421F03040D00040941646472657373282907000D00041152756E74696D652E49735769746E6573730700040309036B000D00040F696E76616C6964207769746E6573730C00000B"
               }
           ],
           "chains": [
               {
                   "name": "main",
                   "address": "S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4",
                   "height": 77,
                   "organization": "validators",
                   "contracts": [
                       "validator",
                       "governance",
                       "consensus",
                       "account",
                       "exchange",
                       "swap",
                       "interop",
                       "stake",
                       "storage",
                       "relay",
                       "ranking",
                       "privacy",
                       "mail",
                       "friends",
                       "market",
                       "sale",
                       "slots"
                   ]
               }
           ],
           "governance": [
               {
                   "name": "nexus.protocol.version",
                   "value": "5"
               },
               {
                   "name": "validator.count",
                   "value": "1"
               },
               {
                   "name": "validator.rotation.time",
                   "value": "120"
               },
               {
                   "name": "poll.vote.limit",
                   "value": "50000"
               },
               {
                   "name": "poll.max.entries",
                   "value": "10"
               },
               {
                   "name": "poll.max.length",
                   "value": "7776000"
               },
               {
                   "name": "stake.master.threshold",
                   "value": "5000000000000"
               },
               {
                   "name": "stake.bonus.percent",
                   "value": "5"
               },
               {
                   "name": "stake.bonus.max",
                   "value": "100"
               },
               {
                   "name": "stake.vote.threshold",
                   "value": "100000000000"
               },
               {
                   "name": "swap.fee.maker",
                   "value": "2"
               },
               {
                   "name": "swap.fee.taker",
                   "value": "5"
               },
               {
                   "name": "storage.stake.kb",
                   "value": "40"
               },
               {
                   "name": "storage.contract.kb",
                   "value": "1024"
               },
               {
                   "name": "nexus.contract.cost",
                   "value": "1000000000"
               },
               {
                   "name": "nexus.token.cost",
                   "value": "10000000000"
               }
           ],
           "organizations": [
               "validators",
               "masters",
               "stakers",
               "phantom_force"
           ]
       },
       "id": 1
    }
    
    

    getOrganization

    Returns info about an organization.

    Parameters
    1. string ID of the organization
    params : {
       "ID":"validators"
    }
    
    
    Returns

    Organization - A Organization object.

    • address: string - Given address.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getOrganization","params":{"ID":"validators"},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": {
           "id": "validators",
           "name": "Block Producers",
           "members": [
               "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34"
           ]
       },
       "id": 1
    }
    
    

    getLeaderboard

    Returns content of a Phantasma leaderboard.

    Parameters
    1. string Name of the leaderboard
    params : {
       "name":""
    }
    
    
    Returns

    Leaderboard - A Leaderboard object.

    • address: string - Given address.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getLeaderboard","params":{},"id":1}'
       
    // Result
    
    

    getTokens

    Returns an array of tokens deployed in Phantasma.

    Parameters
    1. boolean Extended search, Optional (default: false)
    params : {}
    
    
    Returns

    Token - A Token object.

    • result: array - Array of token objects.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getTokens","params":{},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": [
           {
               "symbol": "SOUL",
               "name": "Phantasma Stake",
               "decimals": 8,
               "currentSupply": "286362600000000",
               "maxSupply": "0",
               "burnedSupply": "0",
               "address": "S3dJWaLDKYhhTHf28EfsP6ateZ5w5TeZUSV8wM9JNfaD79E",
               "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
               "flags": "Transferable, Fungible, Divisible, Stakable, Swappable",
               "script": "0B"
           },
           {
               "symbol": "KCAL",
               "name": "Phantasma Energy",
               "decimals": 10,
               "currentSupply": "9988092095432583",
               "maxSupply": "0",
               "burnedSupply": "12907904567417",
               "address": "S3dP6LRC3f3xw4ZZ2HH9BQHzYNHuHS8vetbCQpkMFvRmVEF",
               "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
               "flags": "Transferable, Fungible, Divisible, Fuel, Burnable",
               "script": "0B"
           },
           {
               "symbol": "USD",
               "name": "Dollars",
               "decimals": 8,
               "currentSupply": "0",
               "maxSupply": "0",
               "burnedSupply": "0",
               "address": "S3dHVD6WN35zQvVLEGrdZuBm3gK1YSJLhQwRNe448v9W5hS",
               "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
               "flags": "Transferable, Fungible, Divisible, Fiat",
               "script": "0B"
           },
           {
               "symbol": "CROWN",
               "name": "Phantasma Crown",
               "decimals": 0,
               "currentSupply": "0",
               "maxSupply": "0",
               "burnedSupply": "0",
               "address": "S3d79FvexQeerRioAY3pGYpNPFx7oJkMV4KazdTHdGDA5iy",
               "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
               "flags": "Transferable, Burnable",
               "script": "0B"
           },
           {
               "symbol": "NEO",
               "name": "NEO",
               "decimals": 0,
               "currentSupply": "0",
               "maxSupply": "100000000",
               "burnedSupply": "0",
               "address": "S3d8KEdUw38RGpvidVzWibp52V3MxDKboLk98s9FvWyYkEa",
               "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
               "flags": "Transferable, Fungible, Finite, Swappable",
               "script": "0B"
           },
           {
               "symbol": "GAS",
               "name": "GAS",
               "decimals": 8,
               "currentSupply": "0",
               "maxSupply": "10000000000000000",
               "burnedSupply": "0",
               "address": "S3d9YMoxd3najgNa4J5H1P7LXz9DA1jMRV7n4PiQtVV2A7b",
               "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
               "flags": "Transferable, Fungible, Finite, Divisible, Swappable",
               "script": "0B"
           },
           {
               "symbol": "ETH",
               "name": "Ethereum",
               "decimals": 18,
               "currentSupply": "0",
               "maxSupply": "0",
               "burnedSupply": "0",
               "address": "S3dP28ogxjaAbCt1bnujJCGawcsz66fEgkL9mwHvnAJUUrT",
               "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
               "flags": "Transferable, Fungible, Divisible, Swappable",
               "script": "0B"
           },
           {
               "symbol": "MKNI",
               "name": "Mankini Token",
               "decimals": 0,
               "currentSupply": "100000",
               "maxSupply": "100000",
               "burnedSupply": "0",
               "address": "S3dJhVLEaQ5H1633puCNDXfnUDthbuRaBPtUg6vnjk2aqq6",
               "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
               "flags": "Transferable, Fungible, Finite",
               "script": "000D0402220100279FB052FA82D619FB33581321E3A5F592507EAC995907B504876ABF6F62421F03040D00040941646472657373282907000D00041152756E74696D652E49735769746E6573730700040309036B000D00040F696E76616C6964207769746E6573730C00000B"
           }
       ],
       "id": 1
    }
    
    

    getToken

    Returns info about a specific token deployed in Phantasma.

    Parameters
    1. string Token symbol to obtain info.
    2. boolean Extended search, Optional (default: false)
    params : {
       "symbol":"SOUL"
    }
    
    
    Returns

    Token - A Token object.

    • result: object - Token object.
    • result - symbol: string - Symbol name.
    • result - name: string - Full name of the symbol.
    • result - decimals: number - Decimals of the token.
    • result - currentSupply: string - Current supply of the token.
    • result - maxSupply: string - Max supply of the token.
    • result - burnedSupply: string - Burned supply of the token.
    • result - address: string - Addres of the token.
    • result - owner: string - Owner of the token.
    • result - flags: string - Flags of the token.
    • result - script: string - script of the token.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getToken","params":{"symbol":"SOUL"},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": {
           "symbol": "SOUL",
           "name": "Phantasma Stake",
           "decimals": 8,
           "currentSupply": "286362600000000",
           "maxSupply": "0",
           "burnedSupply": "0",
           "address": "S3dJWaLDKYhhTHf28EfsP6ateZ5w5TeZUSV8wM9JNfaD79E",
           "owner": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
           "flags": "Transferable, Fungible, Divisible, Stakable, Swappable",
           "script": "0B"
       },
       "id": 1
    }
    
    

    getTokenData

    Returns data of a non-fungible token, in hexadecimal format.

    Parameters
    1. string Symbol of token.
    2. string ID of token.
    params : {
       "symbol":"SOUL",
       "IDtext":"5" 
    }
    
    
    Returns

    TokenData - A TokenData object.

    • result: string - Given address.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getTokenData","params":{"symbol":"SOUL","IDtext":"5"},"id":1}'
       
    // Result
    
    

    getNFT

    Returns data of a non-fungible token, in hexadecimal format.

    Parameters
    1. string Token symbol.
    2. string ID of token
    3. boolean Extended search, Optional (default: false)
    params : {
       "symbol":"SOUL",
       "IDtext":"5" 
    }
    
    
    Returns

    NFT - A NFT object.

    • result: object - NFT object.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getNFT","params":{"symbol":"SOUL","IDtext":"5"},"id":1}'
       
    // Result
    
    

    getTokenBalance

    Returns the balance for a specific token and chain, given an address.

    Parameters
    1. string Address of account.
    2. string Token symbol.
    3. string Address or name of chain.
    params : {
       "account":"P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
       "tokenSymbol":"SOUL",
       "chainInput":"main"
    }
    
    
    Returns

    Balance - A Balance object, or error if address is invalidor token is invalidor chain is invalid.

    • chain: string - Chain Address.
    • amount: string - Amount of token.
    • symbol: string - Symbol of token.
    • decimals: string - Decimals of token.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getTokenBalance","params":{"account":"P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34","tokenSymbol":"SOUL","chainInput":"main"},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": {
           "chain": "S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4",
           "amount": "94899900000000",
           "symbol": "SOUL",
           "decimals": 8
       },
       "id": 1
    }
    
    

    getAuctionsCount

    Returns the number of active auctions.

    Parameters
    1. string Chain address or name where the market is located.
    2. string Token symbol used as filter.
    params : {
       "chainInput":"S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4",
       "tokenSymbol":"SOUL"
    }
    
    
    Returns

    number - A number.

    • result: string - Number of Auctions.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getAuctionsCount","params":{"chainInput":"S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4","tokenSymbol" : "SOUL"},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": 0,
       "id": 1
    }
    
    

    getAuctions

    Returns the auctions available in the market.

    Parameters
    1. string Chain address or name where the market is located.
    2. string Token symbol used as filter.
    3. number Index of page to return.
    4. number Number of items to return per page.
    params : {
       "chainInput":"S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4",
       "tokenSymbol":"SOUL",
       "page":"1",
       "pageSize":"5"
    }
    
    
    Returns

    Auction - A Auction object.

    • address: string - Given address.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getAuctions","params":{"chainInput":"S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4","tokenSymbol" : "SOUL", "page" : "1", "pageSize" : "5"},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": {
           "page": 1,
           "pageSize": 5,
           "total": 0,
           "totalPages": 0,
           "result": []
       },
       "id": 1
    }  
    
    

    getAuction

    Returns the auction for a specific token.

    Parameters
    1. string Chain address or name where the market is located.
    2. string Token symbol.
    3. string Token ID.
    params : {
       "chainInput":"S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4",
       "tokenSymbol":"SOUL",
       "IDText":"test"
    }
    
    
    Returns

    Auction - A Auction object.

    • address: string - Given address.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getAuction","params":{"chainInput":"S3d7TbZxtNPdXy11hfmBLJLYn67gZTG2ibL7fJBcVdihWU4","tokenSymbol" : "SOUL","IDText":"0"},"id":1}'
       
    // Result
    
    

    getArchive

    Returns info about a specific archive.

    Parameters
    1. string Archive hash.
    params : {
       "hashText" : ""
    }
    
    
    Returns

    Archive - A Archive object.

    • result: string - Archive object.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getArchive","params":{},"id":1}'
       
    // Result
    
    

    writeArchive

    Writes the contents of an incomplete archive.

    Parameters
    1. string Archive hash.
    2. int Block index, starting from 0
    3. string Block content bytes, in Base64
    params : {
    
    }
    
    
    Returns

    Archive - A Archive object.

    • result: string - Given address.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"writeArchive","params":{},"id":1}'
       
    // Result
    
    

    readArchive

    Reads given archive block.

    Parameters
    1. string Archive hash.
    2. int Block index, starting from 0
    params : {
       "hashText":"83E0B0D032022A9D839AA92C94C8F5C6A3E602629CBE0E786D9C65F8E6F0AE5A"
       "blockIndex" : ""
    }
    
    
    Returns

    Archive - A Archive object.

    • result: object - An Archive object.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"readArchive","params":{},"id":1}'
       
    // Result
    
    

    getContract

    Returns the ABI interface of specific contract.

    Parameters
    1. string Chain address or name where the contract is deployed.
    2. string Contract name
    params : {
       "chainAddressOrName":"main",
       "contractName":"account"
    }
    
    
    Returns

    Contract - A Contract object.

    • name: string - Name of the contract.
    • address: string - Address of the contract.
    • script: string - Script.
    • methods: array - Array of methods.
    • methods - name: string - Name of the method.
    • methods - returnType: string - Return type of the method.
    • methods - parameters: string - Parameters of the method.
    • methods - parameters - name: string - Name of the parameter.
    • methods - parameters - type: string - type of the parameter.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getContract","params":{"chainAddressOrName":"main","contractName":"account"},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": {
           "name": "account",
           "address": "S3dGz1deZweAiMVPHL328X3pVNpANQVjgX4MoRGpbNNAfrB",
           "script": "",
           "methods": [
               {
                   "name": "RegisterName",
                   "returnType": "None",
                   "parameters": [
                       {
                           "name": "target",
                           "type": "Object"
                       },
                       {
                           "name": "name",
                           "type": "String"
                       }
                   ]
               },
               {
                   "name": "UnregisterName",
                   "returnType": "None",
                   "parameters": [
                       {
                           "name": "target",
                           "type": "Object"
                       }
                   ]
               },
               {
                   "name": "RegisterScript",
                   "returnType": "None",
                   "parameters": [
                       {
                           "name": "target",
                           "type": "Object"
                       },
                       {
                           "name": "script",
                           "type": "Bytes"
                       },
                       {
                           "name": "abiBytes",
                           "type": "Bytes"
                       }
                   ]
               },
               {
                   "name": "HasScript",
                   "returnType": "Bool",
                   "parameters": [
                       {
                           "name": "address",
                           "type": "Object"
                       }
                   ]
               },
               {
                   "name": "LookUpAddress",
                   "returnType": "String",
                   "parameters": [
                       {
                           "name": "target",
                           "type": "Object"
                       }
                   ]
               },
               {
                   "name": "LookUpScript",
                   "returnType": "Bytes",
                   "parameters": [
                       {
                           "name": "target",
                           "type": "Object"
                       }
                   ]
               },
               {
                   "name": "LookUpABI",
                   "returnType": "Bytes",
                   "parameters": [
                       {
                           "name": "target",
                           "type": "Object"
                       }
                   ]
               },
               {
                   "name": "LookUpName",
                   "returnType": "Object",
                   "parameters": [
                       {
                           "name": "name",
                           "type": "String"
                       }
                   ]
               },
               {
                   "name": "Migrate",
                   "returnType": "None",
                   "parameters": [
                       {
                           "name": "from",
                           "type": "Object"
                       },
                       {
                           "name": "target",
                           "type": "Object"
                       }
                   ]
               }
           ]
       },
       "id": 1
    }
    
    

    getPeers

    Returns list of known peers.

    Parameters
    none
    params : {}
    
    
    Returns

    Peers - A Peer object.

    • url: string - URL of the program.
    • version: string - Version of the program.
    • flags: string - Flags of Peer.
    • fee: string - Fee.
    • pow: string - POW.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getPeers","params":{},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": [
           {
               "url": "tcp:localhost:7777",
               "version": "Spook v1.3-beta1",
               "flags": "Mempool, RPC, REST",
               "fee": "100000",
               "pow": 0
           }
       ],
       "id": 1
    }
    
    

    relaySend

    Writes a message to the relay network.

    Parameters
    1. string Serialized receipt, in hex.
    params : {
       "receiptHex":""
    }
    
    
    Returns

    Relay - A Relay object.

    • resullt: string - Given address.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"relaySend","params":{},"id":1}'
       
    // Result
    
    

    relayReceive

    Receives messages from the relay network.

    Parameters
    1. string Address or account name.
    params:{
       "account" : "genesis"
    }
    
    
    Returns

    Relay - A Relay object.

    • result: string - Given address.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"relayReceive","params":{},"id":1}'
       
    // Result
    
    

    getEvents

    Reads pending messages from the relay network.

    Parameters
    1. string Address or account name.
    params:{
       "account" : "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34"
    }
    
    
    Returns

    Array - Array of events object.

    • result: array - Array of event objects.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getEvents","params":{"account" : "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34"},"id":1}'
       
    // Result
    
    

    getPlatforms

    Returns an array of available interop platforms.

    Parameters
    none
    params:{}
    
    
    Returns

    Platforms - A array of Platforms.

    • result: array - Array of Platforms
    • platform: string - Name of platform.
    • chain: string - Chain address.
    • fuel: string - Type of fuel.
    • tokens: array - Array of tokens that the chain handle.
    • interop: array - Interop.
    • interop - local: string - Local Hash address.
    • interop - external: string - External Hash address.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getPlatforms","params":{},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": [
           {
               "platform": "neo",
               "chain": "S3dEMj6oFEgfcwSpriewXBR5xcnwu4MJa9KmHgyaKqEhoM6",
               "fuel": "GAS",
               "tokens": [
                   "SOUL",
                   "NEO",
                   "GAS"
               ],
               "interop": [
                   {
                       "local": "X54DbFHTbzhEFHFHmm3fDVjeTpDmXsAeVEz4U4GK6ZQYe6b",
                       "external": "Aai16mqdg9b453ZggXn3SmJH45na3oCEoU"
                   }
               ]
           },
           {
               "platform": "ethereum",
               "chain": "S3dJoptTKf9ASn2tWxHh9fkGH8xjHbhYutNNHkzR1WSmpK6",
               "fuel": "ETH",
               "tokens": [
                   "ETH"
               ],
               "interop": [
                   {
                       "local": "X7DzbZPdeGpqeRdxHkusj6zUH8nzQjTPsrbRdFWQ5gEsmi7",
                       "external": "0xBF35FB8C5B4171496E052EEBFB5BEA29A932171C"
                   }
               ]
           }
       ],
       "id": 1
    }
    
    

    getValidators

    Returns an array of available validators.

    Parameters
    none
    params:{}
    
    
    Returns

    Validators - A array of Validator objects.

    • result: array - Array of Validator objects.
    • address: string - Address of the validator.
    • type: string - Type of the validator.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getValidators","params":{},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": [
           {
               "address": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
               "type": "Primary"
           }
       ],
       "id": 1
    }
    
    

    settleSwap

    Tries to settle a pending swap for a specific hash.

    Parameters
    1. string Name of platform where swap transaction was created.
    2. string Name of platform to settle.
    3. string Hash of transaction to settle.
    params : {
       "sourcePlatform" : "", 
       "destPlatform":"", 
       "hashText":""
    }
    
    
    Returns

    Swap - A Swap object.

    • result: object - Swawp object.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"settleSwap","params":{"sourcePlatform" : "", "destPlatform":"", "hashText":""},"id":1}'
       
    // Result
    
    

    getSwapsForAddress

    Returns platform swaps for a specific address.

    Parameters
    1. string Address or account name.
    2. boolean Extended search, Optional (default: false)
    params:{
       "account" : "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34"
    }
    
    
    Returns

    Swap - A Swap object.

    • result: object - Swap object.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getSwapsForAddress","params":{"account":"P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34"},"id":1}'
       
    // Result
    
    

    getLatestSaleHash

    Returns latest sale hash.

    Parameters
    none
    params:{}
    
    
    Returns

    string - A Hash of the sale.

    • result: string - Address of the Hash.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getLatestSaleHash","params":{},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": "E056D02E57C7DBDC88E1C120D4BC827772BA7E56E3FDF496DF7D16938AB0A639",
       "id": 1
    }
    
    

    getSale

    Returns data about a crowdsale.

    Parameters
    1. string Hash of sale.
    params:{
       "hashText" : "E056D02E57C7DBDC88E1C120D4BC827772BA7E56E3FDF496DF7D16938AB0A639"
    }
    
    
    Returns

    Sale - A Sale object.

    • result: object - A Sale object.
    • hash: string - Hash of the sale.
    • name: string - Name of the sale.
    • creator: string - Address of the owner of the sale.
    • flags: string - Flags of the sale.
    • startDate: timestamp - Start date of the sale.
    • endDate: timestamp - End date of the sale.
    • sellSymbol: string - Symbol Selling.
    • receiveSymbol: string - Symbol Receiving.
    • price: number - Price of the sale.
    • globalSoftCap: string - Global soft cap.
    • globalHardCap: string - Global hard cap.
    • userSoftCap: string - User soft cap.
    • userHardCap: string - User hard cap.
    Example
    // Request
    curl -X POST --data '{"jsonrpc":"2.0","method":"getSale","params":{"hashText":"E056D02E57C7DBDC88E1C120D4BC827772BA7E56E3FDF496DF7D16938AB0A639"},"id":1}'
       
    // Result
    {
       "jsonrpc": "2.0",
       "result": {
             "hash": "E056D02E57C7DBDC88E1C120D4BC827772BA7E56E3FDF496DF7D16938AB0A639",
             "name": "Mankini sale",
             "creator": "P2K6Sm1bUYGsFkxuzHPhia1AbANZaHBJV54RgtQi5q8oK34",
             "flags": "None",
             "startDate": 1615564569,
             "endDate": 1615978569,
             "sellSymbol": "MKNI",
             "receiveSymbol": "SOUL",
             "price": 7,
             "globalSoftCap": "0",
             "globalHardCap": "1000",
             "userSoftCap": "1",
             "userHardCap": "100"
       },
       "id": 1
    }
    
    

    SerializationLast updated: 2020-10-01

    LinkLast updated: 2020-10-01

    A secure and easy to use dapp connector protocol for Phantasma.


    Description

    Phantasma Link is a protocol designed to allow dapps to sign transactions and do other on-chain operations on the behalf of users, in a transparent way, without requiring access to the user private key.

    To learn more about Phantasma, please read the White Paper and check the official repository.

    Virtual MachineLast updated: 2020-10-01

    TutorialsLast updated: 2020-10-01

    Staking with Poltergeist

    Please refer to the following guide: Poltergeist - The basics

    Cosmic swaps

    Automatic cosmic swaps between SOUL and KCAL are covered here: Poltergeist - The basics

    Swap between Phantasma and Neo with Poltergeist

    Please refer to the following guide: Poltergeist Phantasma-Neo swaps

    Swap between Phantasma and Ethereum with Poltergeist

    Please refer to the following guide: Poltergeist Phantasma-Ethereum swaps

    Smart contract development

    Spook setup (test enviroment)

    1. Get latest Spook code
    2. Build it using Visual Studio
    3. Copy config_testnet.json to the build folder and rename it config.json
    4. Make sure that "shell.enabled" is set to true in config.json

    Getting test assets (SOUL and KCAL)

    1. Download Poltergeist
    2. Open the Poltergeist wallet, go to settings and change network to "localnet"
    3. Grab the testnet private key (WIF) from the Spook config.json file (“node.wif”, eg: L2LGgkZAdupN2ee8Rs6hpkc65zaGcLbxhbSDGq8oh6umUxxzeW25)
    4. Import a new account in Poltergeist using that WIF. This account will contain SOUL and KCAL.
    5. Create other accounts as you need for testing, and send funds from the first account to the new ones.

    Deploying a smart contract

    1. Download TOMB compiler
    2. Build it using Visual Studio
    3. Create a new file called hello.tomb with the following sample code as the content
      
      contract hello
      {
      	import Token;
      	import Runtime;
      
      	global admin: address;
      
      	constructor(owner:address)
      	{
      		admin := owner;
      	}
      	
      	trigger onUpgrade(from:address) {
      		Runtime.expect(Runtime.isWitness(admin), "witness failed");
      		return;
      	}
      	
      	public callMe(from:address):number
      	{
      		Runtime.expect(Runtime.isWitness(from), "witness failed");
      		local thisAddr:address := $THIS_ADDRESS;
      		Token.transfer(from, thisAddr, "KCAL", Decimal.convert(10, 5));
      	}
      }
      
    4. Compile it using TOMB from the terminal
      TOMB.exe 
      Where path is the file to the .tomb file.
    5. If the compilation was successful you now will also have a .pvm and an .abi file near your .tomb file (and optionally an .asm and and .debug file)
    6. Run Spook (make sure that you enabled the shell)
    7. Use the command:
      wallet open 
      Where WIF is the private key from a wallet that has at least 50000 SOUL staked
    8. Use the command:
      wallet deploy 
      Where path is the full path to hello.pvm (or any other contract you want to deploy)
    9. Later if you need to upgrade a contract, use the command:
      wallet upgrade 
      Where path is the full path to the .pvm contract you want to upgrade.

    Staking with Ecto

    Please refer to the following guide: Ecto - The basics

    Providing Liquidity on Uniswap

    Please refer to the following guide: Providing liquidity on Uniswap

    Swap between Phantasma and Ethereum with Ecto

    Please refer to the following guide: Ecto Phantasma-Ethereum swaps

    Swap between Phantasma and Neo with Ecto

    Please refer to the following guide: Ecto Phantasma-Neo swaps

    Minting NFTs on GhostMarket

    Please refer to the following guide: uMint — Create Your Own NFTs