# Start

# Description

  • IPC:Supported by all RPC API

    1. *nix(Linux Darwin): ~/.gvite/testdata/gvite.ipc

    2. Windows: \\.\pipe\gvite.ipc

  • Http:Supported by public API. Default port is 48132. Note: API in wallet module is excluded

  • WebSocket:Supported by public API. Default port is 31420. Note: API in wallet module is excluded

Note

  • To avoid unexpected behaviors, using standard JSON RPC 2.0 library is highly recommended
  • A transaction or tx is equivalent to an account block
  • Byte array should be converted to base64 encoding before passing in
  • uint64, float and big.int are passed in string

# Common RPC Errors

Description Code Message Example
Failed to parse JSON string -32700 JSON parse failure
Invalid JSON request -32600 Invalid request
Method not found. Please check if corresponding module has been configured in PublicModules -32601 Method not found
Parameter type error -32602 Invalid parameter
Service stopped -32000 Server shut down
Service temporarily unavailable. Please try again later -32001 Server panic
Callback error -32002 Callback error

# Common Business Errors

Description Code Message Example
Wrong password -34001 Key decryption error
Insufficient balance -35001 Insufficient balance for transfer
Insufficient quota -35002 Out of quota
Invalid parameter -35004 Invalid method param
Too many PoW requests -35005 PoW called twice in one snapshot block
ABI Method not found -35006 ABI method not found
Invalid response latency upon contract creation -35007 Invalid confirm time
Contract not found -35008 Contract not exist
Invalid quota multiplier upon contract creation -35010 Invalid quota ratio
PoW not available due to network jam -35011 PoW service not supported
Maximum quota for single transaction reached -35012 quota limit for block reached
Invalid block producing address -36001 Block producing address not valid
Hash verification failure -36002 Hash verification failed
Signature verification failure -36003 Signature verification failed
Invalid PoW nonce -36004 PoW nonce check failed
Hash verification failure for previous block -36005 PreHash verification failed
Waiting for block -36006 Pending for block referred to

# JSON-RPC Support

JSON-RPC 2.0 HTTP IPC Publish–Subscribe WebSocket