Quantum Coin logo

Quantum Coin logo

Quantum Coin logo

  • Home
  • quantumcoin.org
  • Block Explorer
  • Community
    • Telegram
      Telegram

      @QuantumCoin

    • Discord
      Discord

      discord.gg/bbbMPyzJTM

    • Twitter
      Twitter (X)

      @TheQuantumCoin

    • Reddit
      Reddit

      /r/TheQuantumCoin

Quantum Coin Docs

  • Quantum Coin homeHome
  • Quantum Coin Vision PaperVision
  • Quantum Coin WhitepapersWhitepapers
    • Quantum Resistance
    • Consensus (PoS)
    • Data Availability
    • Allocation
    • Heisen GameChain
  • Quantum Coin DetailsDetails
    • Smart Contracts
    • Dynamic TPS
    • Block Explorer
    • Desktop Wallet
    • Android Wallet
    • Connecting To Mainnet
    • Validator Staking
    • SDK
    • FAQ
  • Quantum Coin LinksLinks
  • Quantum Coin Github source code, documentationGithub
  • Quantum Coin homeHome
  • Quantum Coin Vision PaperVision
  • Quantum Coin WhitepapersWhitepapers
    • Quantum Resistance
    • Consensus (PoS)
    • Data Availability
    • Allocation
    • Heisen GameChain
  • Quantum Coin DetailsDetails
    • Smart Contracts
    • Dynamic TPS
    • Block Explorer
    • Desktop Wallet
    • Android Wallet
    • Connecting To Mainnet
    • Validator Staking
    • SDK
    • FAQ
  • Quantum Coin LinksLinks
  • Quantum Coin Github source code, documentationGithub

Integrating with the Quantum Coin blockchain

The steps in this documentation is for use-cases like Exchanges, Block Explorers. For example, Exchanges that want to integrate with the Quantum Coin blockchain would need to post transactions, find account balance, scan for new transactions etc. You can integrate in multiple ways with the QuantumCoin blockchain.

You might also want to read about: Solidity Documentation

Important points to remember:

  • QuantumCoin addresses are 32 bytes long (66 characters in hex including 0x).
  • The wallet account keys are quantum resistant. These keys and the signed transactions are larger because of this reason.
  • Gas fee is fixed at 1000 coins for 21000 units of gas, which the amount of gas it takes for sending coins to another account.

Method 1

  1. It is recommended that you run a Full Node, following the steps listed in the below document, to ensure subsequent steps using the Relay proceed smoothly.

    Connecting
    Follow steps in: Connecting to mainnet
  2. The relay is a REST API service layer that runs in front of the blockchain node and exposes a limited set of important APIs that clients can then call. The first step is to read the documentation of the relay.

  3. In the folder where the node is located, as shown in the first step, there will be two relay config files, one for Windows and one for Linux. Edit the appropriate file to your requirements, according to the documentation shared in the previous step. You may also opt to run with the default configuration, which is useful if you are running both the Node and the relay in the same machine.

    Windows
    relay-config-windows.json
    Mac
    relay-config-linux.json
  4. Start the relay by running the following command while you are in the same directory as the blockchain node. Please wait for the relay to process all blocks till the latest block.

    Windows
    relay.exe relay-config-windows.json
    Linux
    Replace $HOME/dp with the directory where the relay is located.
    ./relay relay-config-linux.json
  5. Review the SDK documentation and the SDK examples. You can configure the SDK to connect to the relay started in the previous step using the following code; if you edited the default config to change ports, please change the ports accordingly. The SDK client can also call into the relay over the network to a different server or machine, in which case you would need to provide the appropriate DNS or IP addresses and open appropriate firewall ports.

    Initialization Code
    The first and second parameters to the qcsdk.Config should map to the ports used in the relay config in the step for starting the relay.
    var clientConfigVal = new qcsdk.Config("http://127.0.0.1:9090", "http://127.0.0.1:9091", 123123, "", "");

Method 2

  1. You can use familiar JSON RPC APIs similar to Ethereum: JSON RPC API Documentation. Note that like mentioned earlier, the wallet account keys use post quantum cryptography, hence the signatures are larger and key types are different compared to Ethereum. You might want to use the SDK to create and manage wallets (ignore the relay specific SDK functionality which are specific to method 1 above). Review the SDK documentation and the SDK examples.

  2. You can run your own RPC node following instructions at: How to run a node? (connecting to mainnet). Please reach out in the project's Telegram/Discord if you would like to get an RPC node for your integration.
    Note: The RPC node used in below examples does not actually exist. It is only for documentation purposes.

    To enable RPC node APIs in the node, add the following parameters to the connect command. You should update the parameter values according to your requirements. Do not leave this port open on the internet or on a untrusted network for security reasons.

                                                            
                                                                --http --http.addr "0.0.0.0" --http.port 8545 --rpcvhosts "localhost,127.0.0.1,dummy.rpc.quantumcoinapi.com" --rpccorsdomain "https://dummy.rpc.quantumcoinapi.com,http://127.0.0.1,http://localhost"
                                                            
                                                        

  3. Example for creating a wallet: Creating a wallet

  4. Example for signing a transaction and sending it via RPC node: Sending a transaction

  5. Here are some examples using cURL and RPC node. You may

    eth_blockNumber
                                                                
                                                                    curl https://dummy.rpc.quantumcoinapi.com/ \
                                                                      -X POST \
                                                                      -H "Content-Type: application/json" \
                                                                      --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}'
                                                                
                                                            
    eth_call
                                                                
                                                                    curl https://dummy.rpc.quantumcoinapi.com/ \
                                                                      -X POST \
                                                                      -H "Content-Type: application/json" \
                                                                      --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to": "0xa8036870874fbed790ed4d3bbd41b2f390b9858ff021f2993e90c6d1cbb167c7", "data":"0x06fdde03"}, "latest"],"id":1}'
                                                                
                                                            
    eth_chainId
                                                                
                                                                    curl https://dummy.rpc.quantumcoinapi.com/ \
                                                                      -X POST \
                                                                      -H "Content-Type: application/json" \
                                                                      --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
                                                                
                                                            
    eth_getBalance
                                                                
                                                                    curl https://dummy.rpc.quantumcoinapi.com/ \
                                                                      -X POST \
                                                                      -H "Content-Type: application/json" \
                                                                      --data '{"method":"eth_getBalance","params":["0x0000000000000000000000000000000000000000000000000000000000001000", "latest"],"id":1,"jsonrpc":"2.0"}'
                                                                
                                                            
    eth_getTransactionCount (nonce)
                                                                
                                                                    curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0x0000000000000000000000000000000000000000000000000000000000001000", "latest"],"id":1}' https://dummy.rpc.quantumcoinapi.com/
                                                                
                                                            
    eth_sendRawTransaction
                                                                
                                                                    curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["YOUR_SIGNED_HEX_TRANSACTION"],"id":1}' https://dummy.rpc.quantumcoinapi.com/
                                                                
                                                            
Quantum Coin Vision
Vision

The Vision of Quantum Coin.

Quantum Coin Quantum Resistance
Quantum Resistance

Quantum Resistance in the Quantum Coin blockchain.

Quantum Coin Blockchain Smart Contracts
Smart Contracts

Smart Contract support in the Quantum Coin blockchain.

Quantum Coin Proof-of-Stake consensus
Consensus

Proof of Stake consensus.

Data Availability in Quantum Coin Blockchain
Data Availability

Data Availability, long term and short term.

Quantum Coin Blockchain Allocation
Blockchain Allocation

Bitcoin + Ethereum + Dogecoin + DogeP multi-fork.

Dynamic Transactions Per Second model, Quantum Coin Blockchain
Dynamic TPS

Dynamic Transactions Per Second model.

Quantum Coin Block Explorer
Block Explorer

QuantumScan.com

Quantum Coin Github source code, documentation
Github

Source code, documentation are maintained in Github.

Quantum Coin Improvement Proposals
QCIPs

Quantum Coin Improvement Proposals

Help

Quantum Coin is developed and maintained by an open community. Hop on to the community discord server for help with development.

On this page:
Documentation Introduction Help!

quantumcoin.org