v1
latestOpenAPI 3.0.32026-07-173311.5 KBSubmit JSON-RPC request to wallet API
This endpoint is the main entry point to submit JSON-RPC requests. The body of the HTTP request should be formatted as a JSON-RPC v2 request. The HTTP response is formatted as the JSON-RPC v2 response.
The ID should be specified. See the JSON-RPC notification documentation for more details.
Content type
This endpoint returns a response with a specific Content-Type header: application/json-rpc.
This content type is used to help third-party applications differentiate the different JSON formats returned by the service.
Note that application/json-rpc is not a standard HTTP content type.
Authentication
Workflow
When connecting to a wallet, a connection token will be received back through the Authorisation header.
When accessing protected JSON-RPC methods, the connection token must be set to the Authorisation header. If the connection token is not valid, the server returns a response with the HTTP code 401, and the WWW-Authenticate header set to VWT as required by the HTTP standards.
Community implementation of the wallet service
People might be willing to implement their own wallet service with their own authentication system. It's recommended that any community implementations follow the same workflow.
This will save third-party applications from having to explicitly support different authentication schemes, and make the community implementations fully interoperable with all third-party applications, out of the box.
Token format
The token will be formatted as follows: VWT \<YOUR_TOKEN\>
VWT scheme stands for "Vega Wallet Token" and is not a standard authorisation scheme.
YOUR_TOKEN is a randomly generated string of 64 characters with numbers and letters. Each session generates a unique one.
Headers
The origin of the request. If this header is missing, the request will be rejected as an unauthorized request (401 Unauthorized).
The token used to access the protected methods. The format is VWT YOUR_TOKEN. VWT is a non-standard scheme that stands for Vega Wallet Token. If this header is missing when accessing protected methods, the request will be rejected as an unauthorized request (401 Unauthorized).
Response
The request is successful. On this endpoint, only this type of response format should be expected.