data_source.proto
path vega/data_source.proto
package vega
Messages
DataSourceDefinition
DataSourceDefinition represents the top level object that deals with data sources. DataSourceDefinition can be external or internal, with whatever number of data sources are defined for each type in the child objects below.
Name | Type | Description |
---|---|---|
internal | DataSourceDefinitionInternal | |
external | DataSourceDefinitionExternal |
DataSourceDefinitionExternal
DataSourceDefinitionExternal is the top level object used for all external data sources. It contains one of any of the defined `SourceType` variants.
Name | Type | Description |
---|---|---|
oracle | DataSourceSpecConfiguration | |
eth_call | EthCallSpec |
DataSourceDefinitionInternal
DataSourceDefinitionInternal is the top level object used for all internal data sources. It contains one of any of the defined `SourceType` variants.
Name | Type | Description |
---|---|---|
time | DataSourceSpecConfigurationTime |
DataSourceSpec
Data source spec describes the data source base that a product or a risk model wants to get from the data source engine. This message contains additional information used by the API.
Name | Type | Description |
---|---|---|
id | string | Hash generated from the DataSpec data. |
created_at | int64 | Creation date and time |
updated_at | int64 | Last Updated timestamp |
data | DataSourceDefinition | |
status | DataSourceSpec.Status | Status describes the status of the data source spec |
DataSourceSpecConfiguration
All types of external data sources use the same configuration set for meeting requirements in order for the data to be useful for Vega - valid signatures and matching filters.
Name | Type | Description |
---|---|---|
signers | data.v1.Signer | Signers is the list of authorized signatures that signed the data for this source. All the signatures in the data source data should be contained in this external source. All the signatures in the data should be contained in this list. |
filters | data.v1.Filter | Filters describes which source data are considered of interest or not for the product (or the risk model). |
DataSourceSpecConfigurationTime
DataSourceSpecConfigurationTime is the internal data source used for emitting timestamps.
Name | Type | Description |
---|---|---|
conditions | data.v1.Condition | Conditions that the timestamps should meet in order to be considered. |
EthCallSpec
Specifies a data source that derives its content from calling a read method on an Ethereum contract.
Name | Type | Description |
---|---|---|
address | string | Ethereum address of the contract to call. |
abi | google.protobuf.ListValue | The ABI of that contract. |
method | string | Name of the method on the contract to call. |
args | google.protobuf.Value | List of arguments to pass to method call. Protobuf 'Value' wraps an arbitrary JSON type that is mapped to an Ethereum type according to the ABI. |
trigger | EthCallTrigger | Conditions for determining when to call the contract method. |
EthCallTrigger
Determines when the contract method should be called.
Name | Type | Description |
---|---|---|
time_trigger | EthTimeTrigger |
EthTimeTrigger
Trigger for an Ethereum call based on the Ethereum block timestamp. Can be one-off or repeating.
Name | Type | Description |
---|---|---|
initial | uint64 | Trigger when the Ethereum time is greater or equal to this time, in Unix seconds. |
every | uint64 | Repeat the call every n seconds after the inital call. If no time for initial call was specified, begin repeating immediately. |
until | uint64 | If repeating, stop once Ethereum time is greater than this time, in Unix seconds. If not set, then repeat indefinitely. |
ExternalDataSourceSpec
Name | Type | Description |
---|---|---|
spec | DataSourceSpec |
Enums
DataSourceSpec.Status
Status describe the status of the data source spec
Name | Number | Description |
---|---|---|
STATUS_UNSPECIFIED | 0 | Default value. |
STATUS_ACTIVE | 1 | STATUS_ACTIVE describes an active data source spec. |
STATUS_DEACTIVATED | 2 | STATUS_DEACTIVATED describes an data source spec that is not listening to data anymore. |