@vegaprotocol/vega-grpc
v0.44.0
Published
A gRPC client for Vega Protocol
Downloads
55
Readme
Vega API Javascript SDK
Version: 0.44.0
This is the Vega API client, which can be used to produce transactions for the Vega gRPC API.
Usage
For examples, see the sample API scripts repository, or check out the tests folder for basic usage.
Browser usage
These transactions can be sent over REST or GraphQL from a browser context. To sign these transactions with your keys, you will first need to sign the transaction with your Vega key, for which you will need go-wallet.
As browsers don't support gRPC natively, to send transactions over gRPC you would need grpc-web
or another solution.
Tests
To run the full end-to end test, you will need to run an instance of go-wallet, and provide an address in an environment variable.
WALLETSERVER=http://localhost:1789 npm run test
In case you don't have access to one, for the sake of convenience, the following command will run the subset of tests that don't require a server:
npm run test:local
For pull requests, the full end-to-end test suite will run.
Disclaimer
This is a community effort. It is not supported by Vega, nor is it guaranteed to be up to date or compatible with new Vega releases.