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.
JSON RPC API
-
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.
-
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,public.rpc.quantumcoinapi.com" --rpccorsdomain "https://public.rpc.quantumcoinapi.com,http://127.0.0.1,http://localhost" -
Example for creating a wallet: Creating a wallet
-
Example for signing a transaction and sending it via RPC node: Signing and Sending a transaction
-
Here are some examples using cURL and RPC node. You may
eth_blockNumbereth_callcurl https://public.rpc.quantumcoinapi.com/ \ -X POST \ -H "Content-Type: application/json" \ --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}'eth_chainIdcurl https://public.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_getBalancecurl https://public.rpc.quantumcoinapi.com/ \ -X POST \ -H "Content-Type: application/json" \ --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'eth_getTransactionCount (nonce)curl https://public.rpc.quantumcoinapi.com/ \ -X POST \ -H "Content-Type: application/json" \ --data '{"method":"eth_getBalance","params":["0x0000000000000000000000000000000000000000000000000000000000001000", "latest"],"id":1,"jsonrpc":"2.0"}'eth_sendRawTransactioncurl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0x0000000000000000000000000000000000000000000000000000000000001000", "latest"],"id":1}' https://public.rpc.quantumcoinapi.com/curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["YOUR_SIGNED_HEX_TRANSACTION"],"id":1}' https://public.rpc.quantumcoinapi.com/
Vision
The Vision of Quantum Coin.
Quantum Resistance
Quantum Resistance in the Quantum Coin blockchain.
Smart Contracts
Smart Contract support in the Quantum Coin blockchain.
Consensus
Proof of Stake consensus.
Data Availability
Data Availability, long term and short term.
Blockchain Allocation
Bitcoin + Ethereum + Dogecoin + DogeP multi-fork.
Dynamic TPS
Dynamic Transactions Per Second model.
Github
Source code, documentation are maintained in Github.
QCIPs
Quantum Coin Improvement Proposals