VSC Mainnet API

in #vsc4 days ago


With the recent launch of VSC mainnet earlier this month, I'm announcing my new public VSC API endpoints for general use along with other related developments.

GraphQL Endpoint

This is the standard API endpoint that is part of go-vsc-node. There is an Apollo sandbox (pictured above) that anyone may experiment with, however take note that around half of the query methods are still WIP.

This endpoint was formerly known as vsc-graphql.techcoderx.com during the previous testnet.


Endpoint: https://vsc.techcoderx.com/api/v1/graphql Sandbox UI: https://vsc.techcoderx.com/sandbox

VSC Blocks Backend

A new backend specific to VSC Blocks has been developed which provides the following services:

Contract Verifier

This verifies VSC contracts by compiling the uploaded contract source code and comparing the resulting output bytecode against the deployed contract bytecode. It supports AssemblyScript contracts at this moment with more languages to come.

Indexer and REST API

The backend also indexes additional information on top of the VSC node database mostly for analytical purposes. This currently provides election/block participation rates, witness/bridge stats and sequential block numbers.

here.The API lives in https://vsc.techcoderx.com/be-api/v1 namespace, documentation to be made available

Contributions

Below are my contributions to go-vsc-node made in the last few weeks:

Enchancements

  • Hive API node config using HIVE_API environment variable (#15)
  • Added CORS to GraphQL endpoint and listen to 0.0.0.0 to allow port forwarding in docker (#17)
  • Indexed transaction ID of election results and node announcements (#19)
  • withdraw_id renamed to action_id in ledger_actions collection to record transaction ID of action fulfilment (#21)

Bug fixes

  • Fixed wrong asset in ledger oplogs for consensus_stake and consensus_unstake transactions (#16)
  • Fixed incorrect retrieval of account RC usage by adding the missing sorting option (#21)

New GraphQL query methods

  • Witness schedule (#17)
  • DAG by CID from data layer (#18)
  • Account balance, elections, updated witness nodes schema (#19)
  • Transactions, ledgers and account nonce (#20)
  • Ledger actions and account RCs (#21)