@vegaprotocol/vega-grpc
TypeScript icon, indicating that this package has built-in type declarations

0.44.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i @vegaprotocol/vega-grpc

Weekly Downloads

46

Version

0.44.0

License

MIT

Unpacked Size

4.16 MB

Total Files

111

Last publish

Collaborators

  • dexturr
  • emilbayes
  • curly42
  • eddhannay
  • vega-bot