Text of pkg.go.dev › code.vegaprotocol.io › vega › core as Styx crawled it on Oct 17, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

core/ directory - code.vegaprotocol.io/vega/core - Go Packages

README ¶ Vega core A decentralised trading platform that allows pseudo-anonymous trading of derivatives on a blockchain. Vega provides the following core features: Join a Vega network as a validator or non-consensus node. Governance - proposing and voting for new markets A matching engine Configure a node (and its APIs ) Manage authentication with a network Run scenario tests Support settlement in cryptocurrency (coming soon) Links For new developers , see Getting Started .

For updates , see the Change log for major updates. For architecture , please read the documentation to learn about the design for the system and its architecture. Please open an issue if anything is missing or unclear in this documentation. Table of Contents (click to expand) Vega Links Installation Configuration Files location Vega node wallets Using Ethereum Clef wallet Automatic approvals Importing and generation account API Provisioning Troubleshooting & debugging Installation To install trading-core and tendermint , see Getting Started .

Configuration Vega is initialised with a set of default configuration with the command vega init . To override any of the defaults, edit your config.toml . Example [Matching] Level = 0 ProRataMode = false LogPriceLevelsDebug = false LogRemovedOrdersDebug = false Vega requires a set of wallets for the internal or external chain it's dealing with. The node wallets can be accessed using the nodewallet subcommand, these node wallets are initialized / accessed using a passphrase that needs to be specified when initializing Vega: vega init --nodewallet-passphrase-file "my-passphrase-file.txt" Files location Environment variables Unix MacOS Windows XDG_DATA_HOME ~/.local/share ~/Library/Application Support %LOCALAPPDATA% XDG_CONFIG_HOME ~/.config ~/Library/Application Support %LOCALAPPDATA% XDG_STATE_HOME ~/.local/state ~/Library/Application Support %LOCALAPPDATA% XDG_CACHE_HOME ~/.cache ~/Library/Caches %LOCALAPPDATA%\cache You can override these environment variables, however, bear in mind it will apply system-wide.

If you don't want to rely on the default XDG paths, you can use the --home flag on the command-line. Vega node wallets A Vega node needs to connect to other blockchain for various operation: validate transaction happened on foreign chains verify presence of assets sign transaction to be verified on foreign blockchain and more... In order to do these different action, the Vega node needs to access these chains using their native wallet.

To do so the vega command line provide a command line tool: vega nodewallet allowing users to import foreign blockchain wallets credentials, so they can be used at runtime. For more details on how to use the Vega node wallets run: vega nodewallet --help Using Ethereum Clef wallet Automatic approvals Given that Clef requires manually approving all RPC API calls, it is mandatory to setup custom rules for automatic approvals.

Vega requires at least ApproveListing and ApproveSignData rules to be automatically approved. Example of simple rule set JavaScript file with approvals required by Vega: function ApproveListing() { return "Approve" } function ApproveSignData() { return "Approve" } Clef also allows more refined rules for signing. For example approves signs from ipc socket: function ApproveSignData(req) { if (req.metadata.scheme == "ipc") { return "Approve" } } Please refer to Clef rules docs for more information.

Importing and generation account As of today, Clef does not allow to generate a new account for other back end storages than a local Key Store. Therefore it is preferable to create a new account on the back end of choice and import it to Vega through node wallet CLI. Example of import: vega nodewallet import --chain=ethereum --eth.clef-address=http://clef-address:port Troubleshooting & debugging The application has structured logging capability, the first port of call for a crash is probably the Vega and Tendermint logs which are available on the console if running locally or by journal plus syslog if running on test networks.

Default location for log files: /var/log/vega.log /var/log/tendermint.log Each internal Go package has a logging level that can be set at runtime by configuration. Setting the logging Level to "Debug" for a package will enable all debugging messages for the package which can be useful when trying to analyse a crash or issue. Debugging the application locally is also possible with Delve . Directories ¶ Path Synopsis activitystreak mocks Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package. admin api mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. rest Package rest contains code for running the REST-to-gRPC gateway. Package rest contains code for running the REST-to-gRPC gateway. assets builtin common erc20 erc20/mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. mocks Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package. banking mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. blockchain abci nullchain nullchain/mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. bridges mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. broker mocks Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package. checkpoint mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. client eth eth/mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. collateral mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. config encoding contracts erc20 erc20_bridge_logic_restricted multisig_control coreapi services datasource common definition errors external/ethcall external/ethcall/common external/ethcall/mocks Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package. external/ethverifier external/ethverifier/mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. external/openoracle external/signedoracle internal/timetrigger internal/vegatime spec spec/adaptors spec/mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. spec/validation delegation mocks Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package. epochtime events evtforward ethereum ethereum/mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. examples nullchain nullchain/config execution amm amm/mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. common common/mocks Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package. common/mocks_amm Package mocks_amm is a generated GoMock package. Package mocks_amm is a generated GoMock package. future liquidation liquidation/mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. spot stoporders faucet client fee mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. genesis governance mocks Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package. idgeneration integration helpers steps steps/helpers steps/market steps/market/defaults steps/referral stubs limits mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. liquidity mocks Package mocks is a generated GoMock package. Package mocks is a generated GoMock package. supplied supplied/mocks Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package. target ta

The rest of this page is on the live site.