0.26.0 • Published 8 months ago

@vegaprotocol/protos v0.26.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@vegaprotocol/protos

Protocol Buffer messages for Vega in Javascript

Example

import * as InputData from '@vegaprotocol/protos/vega/commands/v1/InputData/encode'
import * as Transaction from '@vegaprotocol/protos/vega/commands/v1/Transaction/encode'
import * as AccountType from '@vegaprotocol/protos/vega/AccountType'

const inputData = InputData.encode({
  nonce: 10,
  command: {
    transfer: {
      fromAccountType: AccountType.ACCOUNT_TYPE_GENERAL,
      to: 'abcdefg',
      toAccountType: AccountType.ACCOUNT_TYPE_GENERAL,
      asset: 'BTC',
      amount: '1'
    }
  }
})

const tx = Transaction.encode({
  inputData: inputData,
  version: 3,
  from: {
    pubKey: 'foo'// new Uint8Array(86)
  },
  signature: {
    version: 2,
    algo: 'vega/ed25519',
    value: 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
  },
  proofOfWork: {
    hashFunction: 'sha3_24_rounds',
    tid: 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
  }
})

Install

npm install @vegaprotocol/protos

Contributing

Building the Javascript bindings requires protoc and make to be installed on the system. After cloning run npm install and then make dist to generate the bindings.

vega is added as a git submodule. The goal is to release a new version to npm, tracking the vega versions. To update the tracked tag, cd vega and checkout the desired commitish, and commit this version in the this repository.

License

MIT

0.26.0

8 months ago

0.24.0

10 months ago

0.23.0

11 months ago

0.22.0

11 months ago

0.21.0

11 months ago

0.20.0

12 months ago

0.19.0

1 year ago

0.17.0

1 year ago

0.16.0

1 year ago

0.15.0

1 year ago

0.14.0

1 year ago

0.13.0

1 year ago

0.12.0

1 year ago

0.11.0

1 year ago

0.10.0

2 years ago

0.9.0

2 years ago

0.7.2

2 years ago

0.8.0

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago