chore: use generated types from vega protos - remove redundant files

This commit is contained in:
maciek
2023-06-15 15:45:36 +02:00
parent d4f6fd7c58
commit 2b7fb5ea87
12 changed files with 0 additions and 3688 deletions
-78
View File
@@ -1,78 +0,0 @@
/* eslint-disable */
export const protobufPackage = "google.protobuf";
/**
* `NullValue` is a singleton enumeration to represent the null value for the
* `Value` type union.
*
* The JSON representation for `NullValue` is JSON `null`.
*/
export enum NullValue {
/** NULL_VALUE - Null value. */
NULL_VALUE = 0,
UNRECOGNIZED = -1,
}
/**
* `Struct` represents a structured data value, consisting of fields
* which map to dynamically typed values. In some languages, `Struct`
* might be supported by a native representation. For example, in
* scripting languages like JS a struct is represented as an
* object. The details of that representation are described together
* with the proto support for the language.
*
* The JSON representation for `Struct` is JSON object.
*/
export interface Struct {
/** Unordered map of dynamically typed values. */
fields: { [key: string]: any | undefined };
}
export interface Struct_FieldsEntry {
key: string;
value: any | undefined;
}
/**
* `Value` represents a dynamically typed value which can be either
* null, a number, a string, a boolean, a recursive struct value, or a
* list of values. A producer of value is expected to set one of these
* variants. Absence of any variant indicates an error.
*
* The JSON representation for `Value` is JSON value.
*/
export interface Value {
/** Represents a null value. */
nullValue?:
| NullValue
| undefined;
/** Represents a double value. */
numberValue?:
| number
| undefined;
/** Represents a string value. */
stringValue?:
| string
| undefined;
/** Represents a boolean value. */
boolValue?:
| boolean
| undefined;
/** Represents a structured value. */
structValue?:
| { [key: string]: any }
| undefined;
/** Represents a repeated `Value`. */
listValue?: Array<any> | undefined;
}
/**
* `ListValue` is a wrapper around a repeated field of values.
*
* The JSON representation for `ListValue` is JSON array.
*/
export interface ListValue {
/** Repeated field of dynamically typed values. */
values: any[];
}
-93
View File
@@ -1,93 +0,0 @@
/* eslint-disable */
export const protobufPackage = "vega";
/** Vega representation of an external asset */
export interface Asset {
/** Internal identifier of the asset. */
id: string;
/** Definition of the external source for this asset. */
details:
| AssetDetails
| undefined;
/** Status of the asset. */
status: Asset_Status;
}
export enum Asset_Status {
/** STATUS_UNSPECIFIED - Default value, always invalid */
STATUS_UNSPECIFIED = 0,
/** STATUS_PROPOSED - Asset is proposed and under vote */
STATUS_PROPOSED = 1,
/** STATUS_REJECTED - Asset has been rejected from governance */
STATUS_REJECTED = 2,
/** STATUS_PENDING_LISTING - Asset is pending listing from the bridge */
STATUS_PENDING_LISTING = 3,
/** STATUS_ENABLED - Asset is fully usable in the network */
STATUS_ENABLED = 4,
UNRECOGNIZED = -1,
}
/** Vega representation of an external asset */
export interface AssetDetails {
/** Name of the asset (e.g: Great British Pound). */
name: string;
/** Symbol of the asset (e.g: GBP). */
symbol: string;
/** Number of decimal / precision handled by this asset. */
decimals: number;
/** Minimum economically meaningful amount in the asset. */
quantum: string;
/** Vega built-in asset. */
builtinAsset?:
| BuiltinAsset
| undefined;
/** Ethereum ERC20 asset. */
erc20?: ERC20 | undefined;
}
/** Vega internal asset */
export interface BuiltinAsset {
/** Maximum amount that can be requested by a party through the built-in asset faucet at a time. */
maxFaucetAmountMint: string;
}
/** ERC20 token based asset, living on the ethereum network */
export interface ERC20 {
/** Address of the contract for the token, on the ethereum network. */
contractAddress: string;
/**
* Lifetime limits deposit per address
* note: this is a temporary measure that can be changed by governance.
*/
lifetimeLimit: string;
/**
* Maximum you can withdraw instantly. All withdrawals over the threshold will be delayed by the withdrawal delay.
* Theres no limit on the size of a withdrawal
* note: this is a temporary measure that can be changed by governance.
*/
withdrawThreshold: string;
}
/** Changes to apply on an existing asset. */
export interface AssetDetailsUpdate {
/** Minimum economically meaningful amount in the asset. */
quantum: string;
/** Ethereum ERC20 asset update. */
erc20?: ERC20Update | undefined;
}
export interface ERC20Update {
/**
* Lifetime limits deposit per address.
* This will be interpreted against the asset decimals.
* note: this is a temporary measure that can be changed by governance.
*/
lifetimeLimit: string;
/**
* Maximum you can withdraw instantly. All withdrawals over the threshold will be delayed by the withdrawal delay.
* Theres no limit on the size of a withdrawal
* note: this is a temporary measure that can be changed by governance.
*/
withdrawThreshold: string;
}
-234
View File
@@ -1,234 +0,0 @@
/* eslint-disable */
export const protobufPackage = "vega";
/** Result of calling an arbitrary Ethereum contract method */
export interface EthContractCallEvent {
/** ID of the data source spec that triggered this contract call. */
specId: string;
/** Ethereum block height. */
blockHeight: number;
/** Ethereum block time in Unix seconds. */
blockTime: number;
/** Result of contract call, packed according to the ABI stored in the associated data source spec. */
result: Uint8Array;
}
/** Deposit for a Vega built-in asset */
export interface BuiltinAssetDeposit {
/** Vega network internal asset ID. */
vegaAssetId: string;
/** Vega party ID i.e. public key. */
partyId: string;
/** Amount to be deposited. This field is an unsigned integer scaled to the asset's decimal places. */
amount: string;
}
/** Withdrawal for a Vega built-in asset */
export interface BuiltinAssetWithdrawal {
/** Vega network internal asset ID. */
vegaAssetId: string;
/** Vega network party ID i.e. public key. */
partyId: string;
/** The amount to be withdrawn. This field is an unsigned integer scaled to the asset's decimal places. */
amount: string;
}
/** Event related to a Vega built-in asset */
export interface BuiltinAssetEvent {
/** Built-in asset deposit. */
deposit?:
| BuiltinAssetDeposit
| undefined;
/** Built-in asset withdrawal. */
withdrawal?: BuiltinAssetWithdrawal | undefined;
}
/** Asset allow-listing for an ERC20 token */
export interface ERC20AssetList {
/** Vega network internal asset ID. */
vegaAssetId: string;
/** Ethereum address of the asset. */
assetSource: string;
}
/** Asset deny-listing for an ERC20 token */
export interface ERC20AssetDelist {
/** Vega network internal asset ID. */
vegaAssetId: string;
}
export interface ERC20AssetLimitsUpdated {
/** Vega network internal asset ID. */
vegaAssetId: string;
/** Ethereum wallet that initiated the deposit. */
sourceEthereumAddress: string;
/** Updated lifetime limits. */
lifetimeLimits: string;
/** Updated withdrawal threshold. */
withdrawThreshold: string;
}
/** Asset deposit for an ERC20 token */
export interface ERC20Deposit {
/** Vega network internal asset ID. */
vegaAssetId: string;
/** Ethereum wallet that initiated the deposit. */
sourceEthereumAddress: string;
/** Vega party ID i.e. public key that is the target of the deposit. */
targetPartyId: string;
/** Amount to be deposited. */
amount: string;
}
/** Asset withdrawal for an ERC20 token */
export interface ERC20Withdrawal {
/** Vega network internal asset ID. */
vegaAssetId: string;
/** Target Ethereum wallet address. */
targetEthereumAddress: string;
/** Reference nonce used for the transaction. */
referenceNonce: string;
}
/** Event related to an ERC20 token */
export interface ERC20Event {
/** Index of the log in the transaction. */
index: number;
/** Block in which the transaction was added. */
block: number;
/** List an ERC20 asset. */
assetList?:
| ERC20AssetList
| undefined;
/** De-list an ERC20 asset. */
assetDelist?:
| ERC20AssetDelist
| undefined;
/** Deposit ERC20 asset. */
deposit?:
| ERC20Deposit
| undefined;
/** Withdraw ERC20 asset. */
withdrawal?:
| ERC20Withdrawal
| undefined;
/** Update an ERC20 asset. */
assetLimitsUpdated?:
| ERC20AssetLimitsUpdated
| undefined;
/** Bridge operations has been stopped. */
bridgeStopped?:
| boolean
| undefined;
/** Bridge operations has been resumed. */
bridgeResumed?: boolean | undefined;
}
/** New signer added to the ERC20 bridge */
export interface ERC20SignerAdded {
/** Ethereum address of the new signer */
newSigner: string;
/** Nonce created by the Vega network used for this new signer */
nonce: string;
/**
* Time at which the block was produced
* will be used to inform the core at what time
* the stake was made unavailable.
*/
blockTime: number;
}
/** Signer removed from the ERC20 bridge */
export interface ERC20SignerRemoved {
/** Ethereum address of the old signer */
oldSigner: string;
/** Nonce created by the Vega network used for this old signer */
nonce: string;
/**
* Time at which the block was produced.
* Will be used to inform the core at what time
* the stake was made unavailable.
*/
blockTime: number;
}
/** Threshold has been updated on the multisig control */
export interface ERC20ThresholdSet {
/** New threshold value to set */
newThreshold: number;
/** Nonce created by the Vega network */
nonce: string;
/**
* Time at which the block was produced.
* Will be used to inform the core at what time
* the stake was made unavailable.
*/
blockTime: number;
}
/** Event related to the ERC20 MultiSig */
export interface ERC20MultiSigEvent {
/** Index of the log in the transaction */
index: number;
/** Block in which the transaction was added */
block: number;
/** Add a signer to the erc20 bridge */
signerAdded?:
| ERC20SignerAdded
| undefined;
/** Remove a signer from the erc20 bridge */
signerRemoved?:
| ERC20SignerRemoved
| undefined;
/** Threshold set */
thresholdSet?: ERC20ThresholdSet | undefined;
}
/** Event related to staking on the Vega network. */
export interface StakingEvent {
/** Index of the log in the transaction. */
index: number;
/** Block in which the transaction was added. */
block: number;
stakeDeposited?: StakeDeposited | undefined;
stakeRemoved?: StakeRemoved | undefined;
totalSupply?: StakeTotalSupply | undefined;
}
export interface StakeDeposited {
/** Ethereum Address of the user depositing stake (hex encode with 0x prefix) */
ethereumAddress: string;
/** Hex encoded public key of the party receiving the stake deposit. */
vegaPublicKey: string;
/** Amount deposited as an unsigned base 10 integer scaled to the asset's decimal places. */
amount: string;
/**
* Time at which the block was produced.
* Will be used to inform the core at what time
* the stake started to be available.
*/
blockTime: number;
}
export interface StakeRemoved {
/** Ethereum address of the user removing stake. This should be hex encoded with 0x prefix. */
ethereumAddress: string;
/** Hex encoded public key of the party from which to remove stake. */
vegaPublicKey: string;
/** Amount removed as a base 10 unsigned integer scaled to the asset's decimal places. */
amount: string;
/**
* The time at which the block was produced
* will be used to inform the core at what time
* the stake was made unavailable.
*/
blockTime: number;
}
export interface StakeTotalSupply {
/** Address of the staking asset */
tokenAddress: string;
/** Total supply observed for the token as an unsigned based 10 integer scaled to the asset's decimal places. */
totalSupply: string;
}
-288
View File
@@ -1,288 +0,0 @@
/* eslint-disable */
import type { ProposalRationale, ProposalTerms, Vote_Value } from "../../governance";
import type {
AccountType,
DispatchStrategy,
LiquidityOrder,
Order_TimeInForce,
Order_Type,
PeggedOrder,
PeggedReference,
Side,
WithdrawExt,
} from "../../vega";
import type { NodeSignatureKind } from "./validator_commands";
export const protobufPackage = "vega.commands.v1";
/**
* Batch of order instructions.
* This command accepts only the following batches of commands
* and will be processed in the following order:
* - OrderCancellation
* - OrderAmendment
* - OrderSubmission
* The total amount of commands in the batch across all three lists of
* instructions is restricted by the following network parameter:
* "spam.protection.max.batchSize"
*/
export interface BatchMarketInstructions {
/** List of order cancellations to be processed sequentially. */
cancellations: OrderCancellation[];
/** List of order amendments to be processed sequentially. */
amendments: OrderAmendment[];
/** List of order submissions to be processed sequentially. */
submissions: OrderSubmission[];
}
/** Order submission is a request to submit or create a new order on Vega */
export interface OrderSubmission {
/** Market ID for the order, required field. */
marketId: string;
/**
* Price for the order, the price is an integer, for example `123456` is a correctly
* formatted price of `1.23456` assuming market configured to 5 decimal places,
* required field for limit orders, however it is not required for market orders.
* This field is an unsigned integer scaled to the market's decimal places.
*/
price: string;
/** Size for the order, for example, in a futures market the size equals the number of units, cannot be negative. */
size: number;
/** Side for the order, e.g. SIDE_BUY or SIDE_SELL, required field. */
side: Side;
/** Time in force indicates how long an order will remain active before it is executed or expires, required field. */
timeInForce: Order_TimeInForce;
/**
* Timestamp in Unix nanoseconds for when the order will expire,
* required field only for `Order.TimeInForce`.TIME_IN_FORCE_GTT`.
*/
expiresAt: number;
/** Type for the order, required field - See `Order.Type`. */
type: Order_Type;
/**
* Reference given for the order, this is typically used to retrieve an order submitted through consensus, currently
* set internally by the node to return a unique reference ID for the order submission.
*/
reference: string;
/** Used to specify the details for a pegged order. */
peggedOrder:
| PeggedOrder
| undefined;
/** Only valid for Limit orders. Cannot be True at the same time as Reduce-Only. */
postOnly: boolean;
/**
* Only valid for Non-Persistent orders. Cannot be True at the same time as Post-Only.
* If set, order will only be executed if the outcome of the trade moves the trader's position closer to 0.
*/
reduceOnly: boolean;
/** Parameters used to specify an iceberg order. */
icebergOpts?: IcebergOpts | undefined;
}
/** Iceberg order options */
export interface IcebergOpts {
/** Size of the order that is initially made visible and can cause a trade within a single transaction. */
initialPeakSize: number;
/** Threshold at which the order's visible remaining size will be refreshed back to its initial peak size. */
minimumPeakSize: number;
}
/** Order cancellation is a request to cancel an existing order on Vega */
export interface OrderCancellation {
/** Unique ID for the order. This is set by the system after consensus. Required field. */
orderId: string;
/** Market ID for the order, required field. */
marketId: string;
}
/** An order amendment is a request to amend or update an existing order on Vega */
export interface OrderAmendment {
/** Order ID, this is required to find the order and will not be updated, required field. */
orderId: string;
/** Market ID, this is required to find the order and will not be updated. */
marketId: string;
/**
* Amend the price for the order if the price value is set, otherwise price will remain unchanged.
* This field is an unsigned integer scaled to the market's decimal places.
*/
price?:
| string
| undefined;
/**
* Amend the size for the order by the delta specified:
* - To reduce the size from the current value set a negative integer value
* - To increase the size from the current value, set a positive integer value
* - To leave the size unchanged set a value of zero
* This field needs to be scaled using the market's position decimal places.
*/
sizeDelta: number;
/** Amend the expiry time for the order, if the Timestamp value is set, otherwise expiry time will remain unchanged. */
expiresAt?:
| number
| undefined;
/** Amend the time in force for the order, set to TIME_IN_FORCE_UNSPECIFIED to remain unchanged. */
timeInForce: Order_TimeInForce;
/** Amend the pegged order offset for the order. This field is an unsigned integer scaled to the market's decimal places. */
peggedOffset: string;
/** Amend the pegged order reference for the order. */
peggedReference: PeggedReference;
}
/** A liquidity provision submitted for a given market */
export interface LiquidityProvisionSubmission {
/** Market ID for the order. */
marketId: string;
/**
* Specified as a unitless number that represents the amount of settlement asset of the market.
* This field is an unsigned integer scaled using the asset's decimal places.
*/
commitmentAmount: string;
/** Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per setting fees and rewarding liquidity providers. */
fee: string;
/** Set of liquidity sell orders to meet the liquidity provision obligation. */
sells: LiquidityOrder[];
/** Set of liquidity buy orders to meet the liquidity provision obligation. */
buys: LiquidityOrder[];
/** Reference to be added to every order created out of this liquidity provision submission. */
reference: string;
}
/** Cancel a liquidity provision request */
export interface LiquidityProvisionCancellation {
/** Unique ID for the market with the liquidity provision to be cancelled. */
marketId: string;
}
/** Amend a liquidity provision request */
export interface LiquidityProvisionAmendment {
/** Unique ID for the market with the liquidity provision to be amended. */
marketId: string;
/** From here at least one of the following is required to consider the command valid. */
commitmentAmount: string;
/** empty strings means no change */
fee: string;
/** empty slice means no change */
sells: LiquidityOrder[];
/** empty slice means no change */
buys: LiquidityOrder[];
/** empty string means no change */
reference: string;
}
/** Represents the submission request to withdraw funds for a party on Vega */
export interface WithdrawSubmission {
/** Amount to be withdrawn. This field is an unsigned integer scaled to the asset's decimal places. */
amount: string;
/** Asset to be withdrawn. */
asset: string;
/** Foreign chain specifics. */
ext: WithdrawExt | undefined;
}
/**
* Command to submit a new proposal for the
* Vega network governance
*/
export interface ProposalSubmission {
/** Reference identifying the proposal. */
reference: string;
/** Proposal configuration and the actual change that is meant to be executed when proposal is enacted. */
terms:
| ProposalTerms
| undefined;
/** Rationale behind a proposal. */
rationale: ProposalRationale | undefined;
}
/** Command to submit a new vote for a governance proposal. */
export interface VoteSubmission {
/** Submit vote for the specified proposal ID. */
proposalId: string;
/** Actual value of the vote. */
value: Vote_Value;
}
/** Command to submit an instruction to delegate some stake to a node */
export interface DelegateSubmission {
/** Delegate to the specified node ID. */
nodeId: string;
/** Amount of stake to delegate. This field is an unsigned integer scaled to the asset's decimal places. */
amount: string;
}
export interface UndelegateSubmission {
/** Node ID to delegate to. */
nodeId: string;
/**
* Optional, if not specified = ALL.
* If provided, this field must be an unsigned integer passed as a string
* and needs to be scaled using the asset decimal places for the token.
*/
amount: string;
/** Method of delegation. */
method: UndelegateSubmission_Method;
}
export enum UndelegateSubmission_Method {
METHOD_UNSPECIFIED = 0,
METHOD_NOW = 1,
METHOD_AT_END_OF_EPOCH = 2,
UNRECOGNIZED = -1,
}
/** Transfer initiated by a party */
export interface Transfer {
/**
* Account type from which the funds of the party
* should be taken.
*/
fromAccountType: AccountType;
/** Public key of the destination account. */
to: string;
/** Type of the destination account. */
toAccountType: AccountType;
/** Asset ID of the asset to be transferred. */
asset: string;
/** Amount to be taken from the source account. This field is an unsigned integer scaled to the asset's decimal places. */
amount: string;
/** Reference to be attached to the transfer. */
reference: string;
oneOff?: OneOffTransfer | undefined;
recurring?: RecurringTransfer | undefined;
}
/** Specific details for a one off transfer */
export interface OneOffTransfer {
/** Timestamp in Unix nanoseconds for when the transfer should be delivered into the receiver's account. */
deliverOn: number;
}
/** Specific details for a recurring transfer */
export interface RecurringTransfer {
/** First epoch from which this transfer shall be paid. */
startEpoch: number;
/** Last epoch at which this transfer shall be paid. */
endEpoch?:
| number
| undefined;
/** Factor needs to be > 0. */
factor: string;
/** Optional parameter defining how a transfer is dispatched. */
dispatchStrategy: DispatchStrategy | undefined;
}
/** Request for cancelling a recurring transfer */
export interface CancelTransfer {
/** Transfer ID of the transfer to cancel. */
transferId: string;
}
/** Transaction for a validator to submit signatures to a smart contract */
export interface IssueSignatures {
/** Ethereum address which will submit the signatures to the smart contract. */
submitter: string;
/** What kind of signatures to generate, namely for whether a signer is being added or removed. */
kind: NodeSignatureKind;
/** Node ID of the validator node that will be signed in or out of the smart contract. */
validatorNodeId: string;
}
@@ -1,16 +0,0 @@
/* eslint-disable */
export const protobufPackage = "vega.commands.v1";
/**
* Signature to authenticate a transaction and to be verified by the Vega
* network.
*/
export interface Signature {
/** Hex encoded bytes of the signature. */
value: string;
/** Algorithm used to create the signature. */
algo: string;
/** Version of the signature used to create the signature. */
version: number;
}
@@ -1,202 +0,0 @@
/* eslint-disable */
import type {
BuiltinAssetEvent,
ERC20Event,
ERC20MultiSigEvent,
EthContractCallEvent,
StakingEvent,
} from "../../chain_events";
import type { StateValueProposal } from "../../vega";
import type { Signature } from "./signature";
export const protobufPackage = "vega.commands.v1";
/** Kind of signature created by a node, for example, allow-listing a new asset, withdrawal etc */
export enum NodeSignatureKind {
/** NODE_SIGNATURE_KIND_UNSPECIFIED - Represents an unspecified or missing value from the input */
NODE_SIGNATURE_KIND_UNSPECIFIED = 0,
/** NODE_SIGNATURE_KIND_ASSET_NEW - Represents a signature for a new asset allow-listing */
NODE_SIGNATURE_KIND_ASSET_NEW = 1,
/** NODE_SIGNATURE_KIND_ASSET_WITHDRAWAL - Represents a signature for an asset withdrawal */
NODE_SIGNATURE_KIND_ASSET_WITHDRAWAL = 2,
/** NODE_SIGNATURE_KIND_ERC20_MULTISIG_SIGNER_ADDED - Represents a signature for a new signer added to the erc20 multisig contract */
NODE_SIGNATURE_KIND_ERC20_MULTISIG_SIGNER_ADDED = 3,
/** NODE_SIGNATURE_KIND_ERC20_MULTISIG_SIGNER_REMOVED - Represents a signature for a signer removed from the erc20 multisig contract */
NODE_SIGNATURE_KIND_ERC20_MULTISIG_SIGNER_REMOVED = 4,
/** NODE_SIGNATURE_KIND_ASSET_UPDATE - Represents a signature for an asset update allow-listing */
NODE_SIGNATURE_KIND_ASSET_UPDATE = 5,
UNRECOGNIZED = -1,
}
/**
* Message from a validator signalling they are still online and validating blocks
* or ready to validate blocks when they are still a pending validator
*/
export interface ValidatorHeartbeat {
/** Node ID of the validator emitting the heartbeat. */
nodeId: string;
/** Signature from the validator made using the ethereum wallet. */
ethereumSignature:
| Signature
| undefined;
/** Signature from the validator made using the vega wallet. */
vegaSignature:
| Signature
| undefined;
/** Message which has been signed. */
message: string;
}
/** Used to announce a node as a new pending validator */
export interface AnnounceNode {
/** Vega public key, required field. */
vegaPubKey: string;
/** Ethereum public key, required field. */
ethereumAddress: string;
/** Public key for the blockchain, required field. */
chainPubKey: string;
/** URL with more info on the node. */
infoUrl: string;
/** Country code (ISO 3166-1 alpha-2) for the location of the node. */
country: string;
/** Node ID of the validator, i.e. the node's public master key. */
id: string;
/** Name of the validator. */
name: string;
/** AvatarURL of the validator. */
avatarUrl: string;
/** Vega public key derivation index. */
vegaPubKeyIndex: number;
/**
* Epoch from which the validator is expected
* to be ready to validate blocks.
*/
fromEpoch: number;
/** Signature from the validator made using the ethereum wallet. */
ethereumSignature:
| Signature
| undefined;
/** Signature from the validator made using the Vega wallet. */
vegaSignature:
| Signature
| undefined;
/** Ethereum public key to use as a submitter to allow automatic signature generation. */
submitterAddress: string;
}
/**
* Used when a node votes for validating that a given resource exists or is valid,
* for example, an ERC20 deposit is valid and exists on ethereum.
*/
export interface NodeVote {
/** Reference identifying the resource making the vote, required field. */
reference: string;
/** Type of NodeVote, also required. */
type: NodeVote_Type;
}
export enum NodeVote_Type {
/** TYPE_UNSPECIFIED - Represents an unspecified or missing value from the input */
TYPE_UNSPECIFIED = 0,
/** TYPE_STAKE_DEPOSITED - Node vote for a new stake deposit */
TYPE_STAKE_DEPOSITED = 1,
/** TYPE_STAKE_REMOVED - Node vote for a new stake removed event */
TYPE_STAKE_REMOVED = 2,
/** TYPE_FUNDS_DEPOSITED - Node vote for a new collateral deposit */
TYPE_FUNDS_DEPOSITED = 3,
/** TYPE_SIGNER_ADDED - Node vote for a new signer added to the erc20 bridge */
TYPE_SIGNER_ADDED = 4,
/** TYPE_SIGNER_REMOVED - Node vote for a signer removed from the erc20 bridge */
TYPE_SIGNER_REMOVED = 5,
/** TYPE_BRIDGE_STOPPED - Node vote for a bridge stopped event */
TYPE_BRIDGE_STOPPED = 6,
/** TYPE_BRIDGE_RESUMED - Node vote for a bridge resumed event */
TYPE_BRIDGE_RESUMED = 7,
/** TYPE_ASSET_LISTED - Node vote for a newly listed asset */
TYPE_ASSET_LISTED = 8,
/** TYPE_LIMITS_UPDATED - Node vote for an asset limits update */
TYPE_LIMITS_UPDATED = 9,
/** TYPE_STAKE_TOTAL_SUPPLY - Node vote to share the total supply of the staking token */
TYPE_STAKE_TOTAL_SUPPLY = 10,
/** TYPE_SIGNER_THRESHOLD_SET - Node vote to update the threshold of the signer set for the multisig contract */
TYPE_SIGNER_THRESHOLD_SET = 11,
/** TYPE_GOVERNANCE_VALIDATE_ASSET - Node vote to validate a new assert governance proposal */
TYPE_GOVERNANCE_VALIDATE_ASSET = 12,
UNRECOGNIZED = -1,
}
/** Represents a signature from a validator, to be used by a foreign chain in order to recognise a decision taken by the Vega network */
export interface NodeSignature {
/** ID of the resource being signed. */
id: string;
/** The signature generated by the signer. */
sig: Uint8Array;
/** Kind of resource being signed. */
kind: NodeSignatureKind;
}
/** Event forwarded to the Vega network to provide information on events happening on other networks */
export interface ChainEvent {
/** Transaction ID of the transaction in which the events happened, usually a hash. */
txId: string;
/** Arbitrary one-time integer used to prevent replay attacks. */
nonce: number;
/** Built-in asset event. */
builtin?:
| BuiltinAssetEvent
| undefined;
/** Ethereum ERC20 event. */
erc20?:
| ERC20Event
| undefined;
/** Ethereum Staking event. */
stakingEvent?:
| StakingEvent
| undefined;
/** Ethereum ERC20 multisig event. */
erc20Multisig?:
| ERC20MultiSigEvent
| undefined;
/** Arbitrary contract call */
contractCall?: EthContractCallEvent | undefined;
}
/** Transaction to allow a validator to rotate their Vega keys */
export interface KeyRotateSubmission {
/** New Vega public key derivation index. */
newPubKeyIndex: number;
/** Target block at which the key rotation will take effect on. */
targetBlock: number;
/** New public key to rotate to. */
newPubKey: string;
/** Hash of currently used public key. */
currentPubKeyHash: string;
}
/** Transaction to allow a validator to rotate their ethereum keys */
export interface EthereumKeyRotateSubmission {
/** Target block at which the key rotation will take effect on. */
targetBlock: number;
/** New address to rotate to. */
newAddress: string;
/** Currently used public address. */
currentAddress: string;
/** Ethereum public key to use as a submitter to allow automatic signature generation. */
submitterAddress: string;
/** Signature that can be verified using the new ethereum address. */
ethereumSignature: Signature | undefined;
}
/** Transaction for a validator to submit a floating point value */
export interface StateVariableProposal {
/** State value proposal details. */
proposal: StateValueProposal | undefined;
}
/** Transaction for a validator to suggest a protocol upgrade */
export interface ProtocolUpgradeProposal {
/** Block height at which to perform the upgrade. */
upgradeBlockHeight: number;
/** Release tag for the Vega binary. */
vegaReleaseTag: string;
}
-60
View File
@@ -1,60 +0,0 @@
/* eslint-disable */
export const protobufPackage = "vega.data.v1";
export interface ETHAddress {
address: string;
}
/**
* PubKey is the public key that signed this data.
* Different public keys coming from different sources will be further separated.
*/
export interface PubKey {
key: string;
}
export interface Signer {
/**
* List of authorized public keys that signed the data for this
* source. All the public keys in the data should be contained in these
* public keys.
*/
pubKey?:
| PubKey
| undefined;
/** In case of an open oracle - Ethereum address will be submitted. */
ethAddress?: ETHAddress | undefined;
}
/** Property describes one property of data spec with a key with its value. */
export interface Property {
/** Name of the property. */
name: string;
/** Value of the property. */
value: string;
}
/**
* Data describes valid source data that has been received by the node.
* It represents both matched and unmatched data.
*/
export interface Data {
signers: Signer[];
/** Data holds all the properties of the data */
data: Property[];
/**
* `matched_specs_ids` lists all the specs that matched this data.
* When the array is empty, it means no spec matched this data.
*/
matchedSpecIds: string[];
/**
* Timestamp in Unix nanoseconds for when the data was broadcast to the markets
* with a matching spec. It has no value when the data did not match any spec.
*/
broadcastAt: number;
}
export interface ExternalData {
data: Data | undefined;
}
-85
View File
@@ -1,85 +0,0 @@
/* eslint-disable */
export const protobufPackage = "vega.data.v1";
/**
* Filter describes the conditions under which a data source data is considered of
* interest or not.
*/
export interface Filter {
/** Data source's data property key targeted by the filter. */
key:
| PropertyKey
| undefined;
/**
* Conditions that should be matched by the data to be
* considered of interest.
*/
conditions: Condition[];
}
/** PropertyKey describes the property key contained in data source data. */
export interface PropertyKey {
/** Name of the property. */
name: string;
/** Data type of the property. */
type: PropertyKey_Type;
/**
* Optional decimal place to be be applied on the provided value
* valid only for PropertyType of type DECIMAL and INTEGER
*/
numberDecimalPlaces?: number | undefined;
}
/**
* Type describes the data type of properties that are supported by the data source
* engine.
*/
export enum PropertyKey_Type {
/** TYPE_UNSPECIFIED - The default value. */
TYPE_UNSPECIFIED = 0,
/** TYPE_EMPTY - Any type. */
TYPE_EMPTY = 1,
/** TYPE_INTEGER - Integer type. */
TYPE_INTEGER = 2,
/** TYPE_STRING - String type. */
TYPE_STRING = 3,
/** TYPE_BOOLEAN - Boolean type. */
TYPE_BOOLEAN = 4,
/** TYPE_DECIMAL - Any floating point decimal type. */
TYPE_DECIMAL = 5,
/** TYPE_TIMESTAMP - Timestamp date type. */
TYPE_TIMESTAMP = 6,
UNRECOGNIZED = -1,
}
/** Condition describes the condition that must be validated by the network */
export interface Condition {
/** Type of comparison to make on the value. */
operator: Condition_Operator;
/** Value to be compared with by the operator. */
value: string;
}
/** Operator describes the type of comparison. */
export enum Condition_Operator {
/** OPERATOR_UNSPECIFIED - The default value */
OPERATOR_UNSPECIFIED = 0,
/** OPERATOR_EQUALS - Verify if the property values are strictly equal or not. */
OPERATOR_EQUALS = 1,
/** OPERATOR_GREATER_THAN - Verify if the data source data value is greater than the Condition value. */
OPERATOR_GREATER_THAN = 2,
/**
* OPERATOR_GREATER_THAN_OR_EQUAL - Verify if the data source data value is greater than or equal to the Condition
* value.
*/
OPERATOR_GREATER_THAN_OR_EQUAL = 3,
/** OPERATOR_LESS_THAN - Verify if the data source data value is less than the Condition value. */
OPERATOR_LESS_THAN = 4,
/**
* OPERATOR_LESS_THAN_OR_EQUAL - Verify if the data source data value is less or equal to than the Condition
* value.
*/
OPERATOR_LESS_THAN_OR_EQUAL = 5,
UNRECOGNIZED = -1,
}
-131
View File
@@ -1,131 +0,0 @@
/* eslint-disable */
import type { Signer } from "./data/v1/data";
import type { Condition, Filter } from "./data/v1/spec";
export const protobufPackage = "vega";
/**
* 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.
*/
export interface DataSourceDefinition {
internal?: DataSourceDefinitionInternal | undefined;
external?: DataSourceDefinitionExternal | undefined;
}
/** DataSourceSpecConfigurationTime is the internal data source used for emitting timestamps. */
export interface DataSourceSpecConfigurationTime {
/** Conditions that the timestamps should meet in order to be considered. */
conditions: Condition[];
}
/**
* DataSourceDefinitionInternal is the top level object used for all internal data sources.
* It contains one of any of the defined `SourceType` variants.
*/
export interface DataSourceDefinitionInternal {
time?: DataSourceSpecConfigurationTime | undefined;
}
/**
* DataSourceDefinitionExternal is the top level object used for all external data sources.
* It contains one of any of the defined `SourceType` variants.
*/
export interface DataSourceDefinitionExternal {
oracle?: DataSourceSpecConfiguration | undefined;
ethCall?: EthCallSpec | undefined;
}
/**
* 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.
*/
export interface DataSourceSpecConfiguration {
/**
* 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.
*/
signers: Signer[];
/**
* Filters describes which source data are considered of interest or not for
* the product (or the risk model).
*/
filters: Filter[];
}
/** Specifies a data source that derives its content from calling a read method on an Ethereum contract. */
export interface EthCallSpec {
/** Ethereum address of the contract to call. */
address: string;
/** The ABI of that contract. */
abi:
| Array<any>
| undefined;
/** Name of the method on the contract to call. */
method: string;
/**
* 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.
*/
args: any[];
/** Conditions for determining when to call the contract method. */
trigger: EthCallTrigger | undefined;
}
/** Determines when the contract method should be called. */
export interface EthCallTrigger {
timeTrigger?: EthTimeTrigger | undefined;
}
/** Trigger for an Ethereum call based on the Ethereum block timestamp. Can be one-off or repeating. */
export interface EthTimeTrigger {
/** Trigger when the Ethereum time is greater or equal to this time, in Unix seconds. */
initial?:
| number
| undefined;
/** Repeat the call every n seconds after the inital call. If no time for initial call was specified, begin repeating immediately. */
every?:
| number
| undefined;
/** If repeating, stop once Ethereum time is greater than this time, in Unix seconds. If not set, then repeat indefinitely. */
until?: number | undefined;
}
/**
* 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.
*/
export interface DataSourceSpec {
/** Hash generated from the DataSpec data. */
id: string;
/** Creation date and time */
createdAt: number;
/** Last Updated timestamp */
updatedAt: number;
data:
| DataSourceDefinition
| undefined;
/** Status describes the status of the data source spec */
status: DataSourceSpec_Status;
}
/** Status describe the status of the data source spec */
export enum DataSourceSpec_Status {
/** STATUS_UNSPECIFIED - Default value. */
STATUS_UNSPECIFIED = 0,
/** STATUS_ACTIVE - STATUS_ACTIVE describes an active data source spec. */
STATUS_ACTIVE = 1,
/**
* STATUS_DEACTIVATED - STATUS_DEACTIVATED describes an data source spec that is not listening to data
* anymore.
*/
STATUS_DEACTIVATED = 2,
UNRECOGNIZED = -1,
}
export interface ExternalDataSourceSpec {
spec: DataSourceSpec | undefined;
}
-642
View File
@@ -1,642 +0,0 @@
/* eslint-disable */
import type { AssetDetails, AssetDetailsUpdate } from "./assets";
import type { DataSourceDefinition } from "./data_source";
import type {
DataSourceSpecToFutureBinding,
LiquidityMonitoringParameters,
LogNormalRiskModel,
PriceMonitoringParameters,
SimpleModelParams,
TargetStakeParameters,
} from "./markets";
import type { AccountType, NetworkParameter } from "./vega";
export const protobufPackage = "vega";
/** List of possible errors that can cause a proposal to be in state rejected or failed */
export enum ProposalError {
/** PROPOSAL_ERROR_UNSPECIFIED - Default value */
PROPOSAL_ERROR_UNSPECIFIED = 0,
/** PROPOSAL_ERROR_CLOSE_TIME_TOO_SOON - Specified close time is too early based on network parameters */
PROPOSAL_ERROR_CLOSE_TIME_TOO_SOON = 1,
/** PROPOSAL_ERROR_CLOSE_TIME_TOO_LATE - Specified close time is too late based on network parameters */
PROPOSAL_ERROR_CLOSE_TIME_TOO_LATE = 2,
/** PROPOSAL_ERROR_ENACT_TIME_TOO_SOON - Specified enactment time is too early based on network parameters */
PROPOSAL_ERROR_ENACT_TIME_TOO_SOON = 3,
/** PROPOSAL_ERROR_ENACT_TIME_TOO_LATE - Specified enactment time is too late based on network parameters */
PROPOSAL_ERROR_ENACT_TIME_TOO_LATE = 4,
/** PROPOSAL_ERROR_INSUFFICIENT_TOKENS - Proposer for this proposal has insufficient tokens */
PROPOSAL_ERROR_INSUFFICIENT_TOKENS = 5,
/** PROPOSAL_ERROR_INVALID_INSTRUMENT_SECURITY - Instrument quote name and base name were the same */
PROPOSAL_ERROR_INVALID_INSTRUMENT_SECURITY = 6,
/** PROPOSAL_ERROR_NO_PRODUCT - Proposal has no product */
PROPOSAL_ERROR_NO_PRODUCT = 7,
/** PROPOSAL_ERROR_UNSUPPORTED_PRODUCT - Specified product is not supported */
PROPOSAL_ERROR_UNSUPPORTED_PRODUCT = 8,
/** PROPOSAL_ERROR_NO_TRADING_MODE - Proposal has no trading mode */
PROPOSAL_ERROR_NO_TRADING_MODE = 11,
/** PROPOSAL_ERROR_UNSUPPORTED_TRADING_MODE - Proposal has an unsupported trading mode */
PROPOSAL_ERROR_UNSUPPORTED_TRADING_MODE = 12,
/** PROPOSAL_ERROR_NODE_VALIDATION_FAILED - Proposal failed node validation */
PROPOSAL_ERROR_NODE_VALIDATION_FAILED = 13,
/** PROPOSAL_ERROR_MISSING_BUILTIN_ASSET_FIELD - Field is missing in a builtin asset source */
PROPOSAL_ERROR_MISSING_BUILTIN_ASSET_FIELD = 14,
/** PROPOSAL_ERROR_MISSING_ERC20_CONTRACT_ADDRESS - Contract address is missing in the ERC20 asset source */
PROPOSAL_ERROR_MISSING_ERC20_CONTRACT_ADDRESS = 15,
/** PROPOSAL_ERROR_INVALID_ASSET - Asset ID is invalid or does not exist on the Vega network */
PROPOSAL_ERROR_INVALID_ASSET = 16,
/** PROPOSAL_ERROR_INCOMPATIBLE_TIMESTAMPS - Proposal terms timestamps are not compatible (Validation < Closing < Enactment) */
PROPOSAL_ERROR_INCOMPATIBLE_TIMESTAMPS = 17,
/** PROPOSAL_ERROR_NO_RISK_PARAMETERS - No risk parameters were specified */
PROPOSAL_ERROR_NO_RISK_PARAMETERS = 18,
/** PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_KEY - Invalid key in update network parameter proposal */
PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_KEY = 19,
/** PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_VALUE - Invalid value in update network parameter proposal */
PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_VALUE = 20,
/** PROPOSAL_ERROR_NETWORK_PARAMETER_VALIDATION_FAILED - Validation failed for network parameter proposal */
PROPOSAL_ERROR_NETWORK_PARAMETER_VALIDATION_FAILED = 21,
/** PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_SMALL - Opening auction duration is less than the network minimum opening auction time */
PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_SMALL = 22,
/** PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_LARGE - Opening auction duration is more than the network minimum opening auction time */
PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_LARGE = 23,
/** PROPOSAL_ERROR_COULD_NOT_INSTANTIATE_MARKET - Market proposal market could not be instantiated in execution */
PROPOSAL_ERROR_COULD_NOT_INSTANTIATE_MARKET = 25,
/** PROPOSAL_ERROR_INVALID_FUTURE_PRODUCT - Market proposal market contained invalid product definition */
PROPOSAL_ERROR_INVALID_FUTURE_PRODUCT = 26,
/** PROPOSAL_ERROR_INVALID_RISK_PARAMETER - Market proposal has invalid risk parameter */
PROPOSAL_ERROR_INVALID_RISK_PARAMETER = 30,
/** PROPOSAL_ERROR_MAJORITY_THRESHOLD_NOT_REACHED - Proposal was declined because vote didn't reach the majority threshold required */
PROPOSAL_ERROR_MAJORITY_THRESHOLD_NOT_REACHED = 31,
/** PROPOSAL_ERROR_PARTICIPATION_THRESHOLD_NOT_REACHED - Proposal declined because the participation threshold was not reached */
PROPOSAL_ERROR_PARTICIPATION_THRESHOLD_NOT_REACHED = 32,
/** PROPOSAL_ERROR_INVALID_ASSET_DETAILS - Asset proposal has invalid asset details */
PROPOSAL_ERROR_INVALID_ASSET_DETAILS = 33,
/** PROPOSAL_ERROR_UNKNOWN_TYPE - Proposal is an unknown type */
PROPOSAL_ERROR_UNKNOWN_TYPE = 34,
/** PROPOSAL_ERROR_UNKNOWN_RISK_PARAMETER_TYPE - Proposal has an unknown risk parameter type */
PROPOSAL_ERROR_UNKNOWN_RISK_PARAMETER_TYPE = 35,
/** PROPOSAL_ERROR_INVALID_FREEFORM - Validation failed for freeform proposal */
PROPOSAL_ERROR_INVALID_FREEFORM = 36,
/**
* PROPOSAL_ERROR_INSUFFICIENT_EQUITY_LIKE_SHARE - Party doesn't have enough equity-like share to propose an update on the market
* targeted by the proposal
*/
PROPOSAL_ERROR_INSUFFICIENT_EQUITY_LIKE_SHARE = 37,
/** PROPOSAL_ERROR_INVALID_MARKET - Market targeted by the proposal does not exist or is not eligible for modification */
PROPOSAL_ERROR_INVALID_MARKET = 38,
/** PROPOSAL_ERROR_TOO_MANY_MARKET_DECIMAL_PLACES - Market proposal decimal place is higher than the market settlement asset decimal places */
PROPOSAL_ERROR_TOO_MANY_MARKET_DECIMAL_PLACES = 39,
/** PROPOSAL_ERROR_TOO_MANY_PRICE_MONITORING_TRIGGERS - Market proposal contains too many price monitoring triggers */
PROPOSAL_ERROR_TOO_MANY_PRICE_MONITORING_TRIGGERS = 40,
/** PROPOSAL_ERROR_ERC20_ADDRESS_ALREADY_IN_USE - Market proposal contains too many price monitoring triggers */
PROPOSAL_ERROR_ERC20_ADDRESS_ALREADY_IN_USE = 41,
/** PROPOSAL_ERROR_LP_PRICE_RANGE_NONPOSITIVE - LP price range must be larger than 0 */
PROPOSAL_ERROR_LP_PRICE_RANGE_NONPOSITIVE = 42,
/** PROPOSAL_ERROR_LP_PRICE_RANGE_TOO_LARGE - LP price range must not be larger than 100 */
PROPOSAL_ERROR_LP_PRICE_RANGE_TOO_LARGE = 43,
/** PROPOSAL_ERROR_LINEAR_SLIPPAGE_FACTOR_OUT_OF_RANGE - Linear slippage factor is out of range, either negative or too large */
PROPOSAL_ERROR_LINEAR_SLIPPAGE_FACTOR_OUT_OF_RANGE = 44,
/** PROPOSAL_ERROR_QUADRATIC_SLIPPAGE_FACTOR_OUT_OF_RANGE - Quadratic slippage factor is out of range, either negative or too large */
PROPOSAL_ERROR_QUADRATIC_SLIPPAGE_FACTOR_OUT_OF_RANGE = 45,
/** PROPOSAL_ERROR_INVALID_SPOT - Validation failed for spot proposal */
PROPOSAL_ERROR_INVALID_SPOT = 46,
/** PROPOSAL_ERROR_SPOT_PRODUCT_DISABLED - Spot trading not enabled */
PROPOSAL_ERROR_SPOT_PRODUCT_DISABLED = 47,
/** PROPOSAL_ERROR_INVALID_SUCCESSOR_MARKET - Market proposal is invalid, either invalid insurance pool fraction, or it specifies a parent market that it can't succeed. */
PROPOSAL_ERROR_INVALID_SUCCESSOR_MARKET = 48,
/** PROPOSAL_ERROR_GOVERNANCE_TRANSFER_PROPOSAL_FAILED - Governance transfer proposal is invalid */
PROPOSAL_ERROR_GOVERNANCE_TRANSFER_PROPOSAL_FAILED = 49,
/** PROPOSAL_ERROR_GOVERNANCE_TRANSFER_PROPOSAL_INVALID - Governance transfer proposal failed */
PROPOSAL_ERROR_GOVERNANCE_TRANSFER_PROPOSAL_INVALID = 50,
/** PROPOSAL_ERROR_GOVERNANCE_CANCEL_TRANSFER_PROPOSAL_INVALID - Proposal for cancelling transfer is invalid, check proposal ID */
PROPOSAL_ERROR_GOVERNANCE_CANCEL_TRANSFER_PROPOSAL_INVALID = 51,
UNRECOGNIZED = -1,
}
export enum GovernanceTransferType {
GOVERNANCE_TRANSFER_TYPE_UNSPECIFIED = 0,
GOVERNANCE_TRANSFER_TYPE_ALL_OR_NOTHING = 1,
GOVERNANCE_TRANSFER_TYPE_BEST_EFFORT = 2,
UNRECOGNIZED = -1,
}
/** Spot product configuration */
export interface SpotProduct {
/** Base asset ID. */
baseAsset: string;
/** Quote asset ID. */
quoteAsset: string;
/** Product name. */
name: string;
}
/** Future product configuration */
export interface FutureProduct {
/** Asset ID for the product's settlement asset. */
settlementAsset: string;
/** Product quote name. */
quoteName: string;
/** Data source spec describing the data source for settlement. */
dataSourceSpecForSettlementData:
| DataSourceDefinition
| undefined;
/** The external data source spec describing the data source of trading termination. */
dataSourceSpecForTradingTermination:
| DataSourceDefinition
| undefined;
/** Binding between the data source spec and the settlement data. */
dataSourceSpecBinding: DataSourceSpecToFutureBinding | undefined;
}
/** Instrument configuration */
export interface InstrumentConfiguration {
/** Instrument name. */
name: string;
/** Instrument code, human-readable shortcode used to describe the instrument. */
code: string;
/** Future. */
future?:
| FutureProduct
| undefined;
/** Spot. */
spot?: SpotProduct | undefined;
}
/** Configuration for a new spot market on Vega */
export interface NewSpotMarketConfiguration {
/** New spot market instrument configuration. */
instrument:
| InstrumentConfiguration
| undefined;
/** Decimal places used for the new spot market, sets the smallest price increment on the book. */
decimalPlaces: number;
/** Optional new spot market metadata, tags. */
metadata: string[];
/** Price monitoring parameters. */
priceMonitoringParameters:
| PriceMonitoringParameters
| undefined;
/** Specifies parameters related to target stake calculation. */
targetStakeParameters:
| TargetStakeParameters
| undefined;
/** Simple risk model parameters, valid only if MODEL_SIMPLE is selected. */
simple?:
| SimpleModelParams
| undefined;
/** Log normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected. */
logNormal?:
| LogNormalRiskModel
| undefined;
/** Decimal places for order sizes, sets what size the smallest order / position on the spot market can be. */
positionDecimalPlaces: number;
}
/** Configuration for a new futures market on Vega */
export interface NewMarketConfiguration {
/** New futures market instrument configuration. */
instrument:
| InstrumentConfiguration
| undefined;
/** Decimal places used for the new futures market, sets the smallest price increment on the book. */
decimalPlaces: number;
/** Optional new futures market metadata, tags. */
metadata: string[];
/** Price monitoring parameters. */
priceMonitoringParameters:
| PriceMonitoringParameters
| undefined;
/** Liquidity monitoring parameters. */
liquidityMonitoringParameters:
| LiquidityMonitoringParameters
| undefined;
/** Simple risk model parameters, valid only if MODEL_SIMPLE is selected. */
simple?:
| SimpleModelParams
| undefined;
/** Log normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected. */
logNormal?:
| LogNormalRiskModel
| undefined;
/** Decimal places for order sizes, sets what size the smallest order / position on the futures market can be. */
positionDecimalPlaces: number;
/**
* Percentage move up and down from the mid price which specifies the range of
* price levels over which automated liquidity provision orders will be deployed.
*/
lpPriceRange: string;
/** Linear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume. */
linearSlippageFactor: string;
/** Quadratic slippage factor is used to cap the slippage component of maintenance margin - it is applied to the square of the slippage volume. */
quadraticSlippageFactor: string;
/** Successor configuration. If this proposal is meant to succeed a given market, then this should be set. */
successor?: SuccessorConfiguration | undefined;
}
/** New spot market on Vega */
export interface NewSpotMarket {
/** Configuration of the new spot market. */
changes: NewSpotMarketConfiguration | undefined;
}
/** Configuration required to turn a new market proposal in to a successor market proposal. */
export interface SuccessorConfiguration {
/** ID of the market that the successor should take over from. */
parentMarketId: string;
/** A decimal value between or equal to 0 and 1, specifying the fraction of the insurance pool balance that is carried over from the parent market to the successor. */
insurancePoolFraction: string;
}
/** New market on Vega */
export interface NewMarket {
/** Configuration of the new market. */
changes: NewMarketConfiguration | undefined;
}
/** Update an existing market on Vega */
export interface UpdateMarket {
/** Market ID the update is for. */
marketId: string;
/** Updated configuration of the futures market. */
changes: UpdateMarketConfiguration | undefined;
}
/** Update an existing spot market on Vega */
export interface UpdateSpotMarket {
/** Market ID the update is for. */
marketId: string;
/** Updated configuration of the spot market. */
changes: UpdateSpotMarketConfiguration | undefined;
}
/** Configuration to update a futures market on Vega */
export interface UpdateMarketConfiguration {
/** Updated futures market instrument configuration. */
instrument:
| UpdateInstrumentConfiguration
| undefined;
/** Optional futures market metadata, tags. */
metadata: string[];
/** Price monitoring parameters. */
priceMonitoringParameters:
| PriceMonitoringParameters
| undefined;
/** Liquidity monitoring parameters. */
liquidityMonitoringParameters:
| LiquidityMonitoringParameters
| undefined;
/** Simple risk model parameters, valid only if MODEL_SIMPLE is selected. */
simple?:
| SimpleModelParams
| undefined;
/** Log normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected. */
logNormal?:
| LogNormalRiskModel
| undefined;
/**
* Percentage move up and down from the mid price which specifies the range of
* price levels over which automated liquidity provision orders will be deployed.
*/
lpPriceRange: string;
/** Linear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume. */
linearSlippageFactor: string;
/** Quadratic slippage factor is used to cap the slippage component of maintenance margin - it is applied to the square of the slippage volume. */
quadraticSlippageFactor: string;
}
/** Configuration to update a spot market on Vega */
export interface UpdateSpotMarketConfiguration {
/** Optional spot market metadata, tags. */
metadata: string[];
/** Price monitoring parameters. */
priceMonitoringParameters:
| PriceMonitoringParameters
| undefined;
/** Specifies parameters related to target stake calculation. */
targetStakeParameters:
| TargetStakeParameters
| undefined;
/** Simple risk model parameters, valid only if MODEL_SIMPLE is selected. */
simple?:
| SimpleModelParams
| undefined;
/** Log normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected. */
logNormal?: LogNormalRiskModel | undefined;
}
/** Instrument configuration */
export interface UpdateInstrumentConfiguration {
/** Instrument code, human-readable shortcode used to describe the instrument. */
code: string;
/** Future. */
future?: UpdateFutureProduct | undefined;
}
/** Future product configuration */
export interface UpdateFutureProduct {
/** Human-readable name/abbreviation of the quote name. */
quoteName: string;
/** The data source spec describing the data of settlement data. */
dataSourceSpecForSettlementData:
| DataSourceDefinition
| undefined;
/** The data source spec describing the data source for trading termination. */
dataSourceSpecForTradingTermination:
| DataSourceDefinition
| undefined;
/** The binding between the data source spec and the settlement data. */
dataSourceSpecBinding: DataSourceSpecToFutureBinding | undefined;
}
/** Update network configuration on Vega */
export interface UpdateNetworkParameter {
/** The network parameter to update. */
changes: NetworkParameter | undefined;
}
/** New asset on Vega */
export interface NewAsset {
/** Configuration of the new asset. */
changes: AssetDetails | undefined;
}
/** Update an existing asset on Vega */
export interface UpdateAsset {
/** Asset ID the update is for. */
assetId: string;
/** Changes to apply on an existing asset. */
changes: AssetDetailsUpdate | undefined;
}
/**
* Freeform proposal
* This message is just used as a placeholder to sort out the nature of the
* proposal once parsed.
*/
export interface NewFreeform {
}
/** Terms for a governance proposal on Vega */
export interface ProposalTerms {
/**
* Timestamp as Unix time in seconds when voting closes for this proposal,
* constrained by `minClose` and `maxClose` network parameters.
*/
closingTimestamp: number;
/**
* Timestamp as Unix time in seconds when proposal gets enacted if passed,
* constrained by `minEnact` and `maxEnact` network parameters.
*/
enactmentTimestamp: number;
/** Validation timestamp as Unix time in seconds. */
validationTimestamp: number;
/** Proposal change for modifying an existing futures market on Vega. */
updateMarket?:
| UpdateMarket
| undefined;
/** Proposal change for creating new futures market on Vega. */
newMarket?:
| NewMarket
| undefined;
/** Proposal change for updating Vega network parameters. */
updateNetworkParameter?:
| UpdateNetworkParameter
| undefined;
/** Proposal change for creating new assets on Vega. */
newAsset?:
| NewAsset
| undefined;
/**
* Proposal change for a freeform request, which can be voted on but does not change the behaviour of the system,
* and can be used to gauge community sentiment.
*/
newFreeform?:
| NewFreeform
| undefined;
/** Proposal change for updating an asset. */
updateAsset?:
| UpdateAsset
| undefined;
/** Proposal change for creating new spot market on Vega. */
newSpotMarket?:
| NewSpotMarket
| undefined;
/** Proposal change for modifying an existing spot market on Vega. */
updateSpotMarket?:
| UpdateSpotMarket
| undefined;
/** Proposal change for a governance transfer. */
newTransfer?:
| NewTransfer
| undefined;
/** Cancel a governance transfer. */
cancelTransfer?: CancelTransfer | undefined;
}
/** Rationale behind a proposal. */
export interface ProposalRationale {
/**
* Description to show a short title / something in case the link goes offline.
* This is to be between 0 and 20k unicode characters.
* This is mandatory for all proposals.
*/
description: string;
/**
* Title to be used to give a short description of the proposal in lists.
* This is to be between 0 and 100 unicode characters.
* This is mandatory for all proposals.
*/
title: string;
}
/** Governance data */
export interface GovernanceData {
/** Governance proposal that is being voted on. */
proposal:
| Proposal
| undefined;
/** All YES votes in favour of the proposal above. */
yes: Vote[];
/** All NO votes against the proposal above. */
no: Vote[];
/**
* All latest YES votes by party which is guaranteed to be unique,
* where key (string) is the party ID i.e. public key and
* value (Vote) is the vote cast by the given party.
*/
yesParty: { [key: string]: Vote };
/**
* All latest NO votes by party which is guaranteed to be unique,
* where key (string) is the party ID i.e. public key and
* value (Vote) is the vote cast by the given party.
*/
noParty: { [key: string]: Vote };
}
export interface GovernanceData_YesPartyEntry {
key: string;
value: Vote | undefined;
}
export interface GovernanceData_NoPartyEntry {
key: string;
value: Vote | undefined;
}
/** Governance proposal */
export interface Proposal {
/** Unique proposal ID. */
id: string;
/** Proposal reference. */
reference: string;
/** Party ID i.e. public key of the party submitting the proposal. */
partyId: string;
/** Current state of the proposal, i.e. open, passed, failed etc. */
state: Proposal_State;
/** Proposal timestamp for date and time as Unix time in nanoseconds when proposal was submitted to the network. */
timestamp: number;
/** Proposal configuration and the actual change that is meant to be executed when proposal is enacted. */
terms:
| ProposalTerms
| undefined;
/** Reason for the current state of the proposal, this may be set in case of REJECTED and FAILED statuses. */
reason?:
| ProposalError
| undefined;
/** Detailed error associated to the reason. */
errorDetails?:
| string
| undefined;
/** Rationale behind a proposal. */
rationale:
| ProposalRationale
| undefined;
/** Required vote participation for this proposal. */
requiredParticipation: string;
/** Required majority for this proposal. */
requiredMajority: string;
/** Required participation from liquidity providers, optional but is required for market update proposal. */
requiredLiquidityProviderParticipation?:
| string
| undefined;
/** Required majority from liquidity providers, optional but is required for market update proposal. */
requiredLiquidityProviderMajority?: string | undefined;
}
/**
* Proposal state transition:
* Open ->
* - Passed -> Enacted.
* - Passed -> Failed.
* - Declined
* Rejected
* Proposal can enter Failed state from any other state
*/
export enum Proposal_State {
/** STATE_UNSPECIFIED - Default value, always invalid */
STATE_UNSPECIFIED = 0,
/** STATE_FAILED - Proposal enactment has failed - even though proposal has passed, its execution could not be performed */
STATE_FAILED = 1,
/** STATE_OPEN - Proposal is open for voting */
STATE_OPEN = 2,
/** STATE_PASSED - Proposal has gained enough support to be executed */
STATE_PASSED = 3,
/** STATE_REJECTED - Proposal wasn't accepted i.e. proposal terms failed validation due to wrong configuration or failed to meet network requirements. */
STATE_REJECTED = 4,
/** STATE_DECLINED - Proposal didn't get enough votes, e.g. either failed to gain required participation or majority level. */
STATE_DECLINED = 5,
/** STATE_ENACTED - Proposal enacted */
STATE_ENACTED = 6,
/** STATE_WAITING_FOR_NODE_VOTE - Waiting for node validation of the proposal */
STATE_WAITING_FOR_NODE_VOTE = 7,
UNRECOGNIZED = -1,
}
/** Governance vote */
export interface Vote {
/** Voter's party ID. */
partyId: string;
/** Which way the party voted. */
value: Vote_Value;
/** Proposal ID being voted on. */
proposalId: string;
/** Timestamp in Unix nanoseconds when the vote was acknowledged by the network. */
timestamp: number;
/** Total number of governance token for the party that cast the vote. */
totalGovernanceTokenBalance: string;
/** The weight of this vote based on the total number of governance tokens. */
totalGovernanceTokenWeight: string;
/** The weight of the vote compared to the total amount of equity-like share on the market. */
totalEquityLikeShareWeight: string;
}
/** Vote value */
export enum Vote_Value {
/** VALUE_UNSPECIFIED - Default value, always invalid */
VALUE_UNSPECIFIED = 0,
/** VALUE_NO - Vote against the proposal */
VALUE_NO = 1,
/** VALUE_YES - Vote in favour of the proposal */
VALUE_YES = 2,
UNRECOGNIZED = -1,
}
export interface CancelTransfer {
/** Configuration for cancellation of a governance-initiated transfer */
changes: CancelTransferConfiguration | undefined;
}
export interface CancelTransferConfiguration {
/** ID of the governance transfer proposal. */
transferId: string;
}
/** New governance transfer */
export interface NewTransfer {
/** Configuration for a new transfer. */
changes: NewTransferConfiguration | undefined;
}
export interface NewTransferConfiguration {
/** Source account type, such as network treasury, market insurance pool */
sourceType: AccountType;
/** If network treasury, field is empty, otherwise uses the market ID */
source: string;
/**
* "All or nothing" or "best effort":
* All or nothing: Transfers the specified amount or does not transfer anything
* Best effort: Transfers the specified amount or the max allowable amount if this is less than the specified amount
*/
transferType: GovernanceTransferType;
/** Maximum amount to transfer */
amount: string;
/** ID of asset to transfer */
asset: string;
/** Maximum fraction of the source account's balance to transfer as a decimal - i.e. 0.1 = 10% of the balance */
fractionOfBalance: string;
/** Specifies the account type to transfer to: reward pool, party, network insurance pool, market insurance pool */
destinationType: AccountType;
/**
* Specifies the account to transfer to, depending on the account type:
* Network treasury: leave empty
* Party: party's public key
* Market insurance pool: market ID
*/
destination: string;
oneOff?: OneOffTransfer | undefined;
recurring?: RecurringTransfer | undefined;
}
/** Specific details for a one off transfer */
export interface OneOffTransfer {
/** Timestamp in Unix nanoseconds for when the transfer should be delivered into the receiver's account. */
deliverOn: number;
}
/** Specific details for a recurring transfer */
export interface RecurringTransfer {
/** First epoch from which this transfer shall be paid. */
startEpoch: number;
/** Last epoch at which this transfer shall be paid. */
endEpoch?: number | undefined;
}
-361
View File
@@ -1,361 +0,0 @@
/* eslint-disable */
import type { DataSourceSpec } from "./data_source";
export const protobufPackage = "vega";
/**
* Auction duration is used to configure 3 auction periods:
* 1. `duration > 0`, `volume == 0`:
* The auction will last for at least N seconds
* 2. `duration == 0`, `volume > 0`:
* The auction will end once the given volume will match at uncrossing
* 3. `duration > 0`, `volume > 0`:
* The auction will take at least N seconds, but can end sooner if the market can trade a certain volume
*/
export interface AuctionDuration {
/** Duration of the auction in seconds. */
duration: number;
/** Target uncrossing trading volume. */
volume: number;
}
/** Spot product definition */
export interface Spot {
/** Asset ID of the underlying base asset for the spot product. */
baseAsset: string;
/** Asset ID of the underlying quote asset for the spot product. */
quoteAsset: string;
/** Name of the instrument. */
name: string;
}
/** Future product definition */
export interface Future {
/** Underlying asset for the future. */
settlementAsset: string;
/** Quote name of the instrument. */
quoteName: string;
/** Data source specification that describes the settlement data source filter. */
dataSourceSpecForSettlementData:
| DataSourceSpec
| undefined;
/** Data source specification that describes the trading termination data source filter. */
dataSourceSpecForTradingTermination:
| DataSourceSpec
| undefined;
/** Binding between the data spec and the data source. */
dataSourceSpecBinding: DataSourceSpecToFutureBinding | undefined;
}
/**
* DataSourceSpecToFutureBinding describes which property of the data source data is to be
* used as settlement data and which to use as the trading terminated trigger
*/
export interface DataSourceSpecToFutureBinding {
/**
* Name of the property in the source data that should be used as settlement data.
* If it is set to "prices.BTC.value", then the Future will use the value of
* this property as settlement data.
*/
settlementDataProperty: string;
/** Name of the property in the data source data that signals termination of trading. */
tradingTerminationProperty: string;
}
/** Instrument metadata definition */
export interface InstrumentMetadata {
/** List of 0 or more tags. */
tags: string[];
}
/** Instrument definition */
export interface Instrument {
/** Unique instrument ID. */
id: string;
/** Code for the instrument. */
code: string;
/** Name of the instrument. */
name: string;
/** Collection of instrument meta-data. */
metadata:
| InstrumentMetadata
| undefined;
/** Future. */
future?:
| Future
| undefined;
/** Spot. */
spot?: Spot | undefined;
}
/** Risk model for log normal */
export interface LogNormalRiskModel {
/** Risk Aversion Parameter. */
riskAversionParameter: number;
/**
* Tau parameter of the risk model, projection horizon measured as a year fraction used in the expected shortfall
* calculation to obtain the maintenance margin, must be a strictly non-negative real number.
*/
tau: number;
/** Risk model parameters for log normal. */
params: LogNormalModelParams | undefined;
}
/** Risk model parameters for log normal */
export interface LogNormalModelParams {
/** Mu parameter, annualised growth rate of the underlying asset. */
mu: number;
/** R parameter, annualised growth rate of the risk-free asset, used for discounting of future cash flows, can be any real number. */
r: number;
/** Sigma parameter, annualised volatility of the underlying asset, must be a strictly non-negative real number. */
sigma: number;
}
/** Risk model for simple modelling */
export interface SimpleRiskModel {
/** Risk model params for simple modelling. */
params: SimpleModelParams | undefined;
}
/** Risk model parameters for simple modelling */
export interface SimpleModelParams {
/** Pre-defined risk factor value for long. */
factorLong: number;
/** Pre-defined risk factor value for short. */
factorShort: number;
/** Pre-defined maximum price move up that the model considers as valid. */
maxMoveUp: number;
/** Pre-defined minimum price move down that the model considers as valid. */
minMoveDown: number;
/** Pre-defined constant probability of trading. */
probabilityOfTrading: number;
}
/** Scaling Factors (for use in margin calculation) */
export interface ScalingFactors {
/**
* Collateral search level. If collateral dips below this value,
* the system will search for collateral to release.
*/
searchLevel: number;
/**
* Initial margin level. This is the minimum amount of collateral
* required to open a position in a market that requires margin.
*/
initialMargin: number;
/**
* Collateral release level. If a trader has collateral above this level,
* the system will release collateral to a trader's general collateral account
* for the asset.
*/
collateralRelease: number;
}
/** Margin Calculator definition */
export interface MarginCalculator {
/** Scaling factors for margin calculation. */
scalingFactors: ScalingFactors | undefined;
}
/** Tradable Instrument definition */
export interface TradableInstrument {
/** Details for the underlying instrument. */
instrument:
| Instrument
| undefined;
/** Margin calculator for the instrument. */
marginCalculator:
| MarginCalculator
| undefined;
/** Log normal. */
logNormalRiskModel?:
| LogNormalRiskModel
| undefined;
/** Simple. */
simpleRiskModel?: SimpleRiskModel | undefined;
}
/** Fee factors definition */
export interface FeeFactors {
/** Market maker fee charged network wide. */
makerFee: string;
/** Infrastructure fee charged network wide for staking and governance. */
infrastructureFee: string;
/** Liquidity fee applied per market for market making. */
liquidityFee: string;
}
/** Fees definition */
export interface Fees {
/** Fee factors. */
factors: FeeFactors | undefined;
}
/** PriceMonitoringTrigger holds together price projection horizon τ, probability level p, and auction extension duration */
export interface PriceMonitoringTrigger {
/** Price monitoring projection horizon τ in seconds. */
horizon: number;
/** Price monitoring probability level p. */
probability: string;
/**
* Price monitoring auction extension duration in seconds should the price
* breach its theoretical level over the specified horizon at the specified
* probability level.
*/
auctionExtension: number;
}
/** PriceMonitoringParameters contains a collection of triggers to be used for a given market */
export interface PriceMonitoringParameters {
triggers: PriceMonitoringTrigger[];
}
/** PriceMonitoringSettings contains the settings for price monitoring */
export interface PriceMonitoringSettings {
/** Specifies price monitoring parameters to be used for price monitoring purposes. */
parameters: PriceMonitoringParameters | undefined;
}
/** LiquidityMonitoringParameters contains settings used for liquidity monitoring */
export interface LiquidityMonitoringParameters {
/** Specifies parameters related to target stake calculation. */
targetStakeParameters:
| TargetStakeParameters
| undefined;
/** Specifies the triggering ratio for entering liquidity auction. */
triggeringRatio: string;
/** Specifies by how many seconds an auction should be extended if leaving the auction were to trigger a liquidity auction. */
auctionExtension: number;
}
/** TargetStakeParameters contains parameters used in target stake calculation */
export interface TargetStakeParameters {
/** Specifies length of time window expressed in seconds for target stake calculation. */
timeWindow: number;
/** Specifies scaling factors used in target stake calculation. */
scalingFactor: number;
}
/** Market definition */
export interface Market {
/** Unique ID for the market. */
id: string;
/** Tradable instrument configuration. */
tradableInstrument:
| TradableInstrument
| undefined;
/**
* Number of decimal places that a price must be shifted by in order to get a
* correct price denominated in the currency of the market, for example:
* `realPrice = price / 10^decimalPlaces`.
*/
decimalPlaces: number;
/** Fees configuration that apply to the market. */
fees:
| Fees
| undefined;
/**
* Auction duration specifies how long the opening auction will run (minimum
* duration and optionally a minimum traded volume).
*/
openingAuction:
| AuctionDuration
| undefined;
/** PriceMonitoringSettings for the market. */
priceMonitoringSettings:
| PriceMonitoringSettings
| undefined;
/** LiquidityMonitoringParameters for the market. */
liquidityMonitoringParameters:
| LiquidityMonitoringParameters
| undefined;
/** Current mode of execution of the market. */
tradingMode: Market_TradingMode;
/** Current state of the market. */
state: Market_State;
/** Timestamps for when the market state changes. */
marketTimestamps:
| MarketTimestamps
| undefined;
/** The number of decimal places for a position. */
positionDecimalPlaces: number;
/**
* Percentage move up and down from the mid price which specifies the range of
* price levels over which automated liquidity provision orders will be deployed.
*/
lpPriceRange: string;
/** Linear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume. */
linearSlippageFactor: string;
/** Quadratic slippage factor is used to cap the slippage component of maintenance margin - it is applied to the square of the slippage volume. */
quadraticSlippageFactor: string;
/** ID of the market this market succeeds */
parentMarketId?:
| string
| undefined;
/** The fraction of the parent market's insurance pool that this market inherits; range 0 through 1. */
insurancePoolFraction?:
| string
| undefined;
/** ID of the market that succeeds this market if it exists. This will be populated by the system when the successor market is enabled. */
successorMarketId?: string | undefined;
}
/** Current state of the market */
export enum Market_State {
/** STATE_UNSPECIFIED - Default value, invalid */
STATE_UNSPECIFIED = 0,
/** STATE_PROPOSED - Governance proposal valid and accepted */
STATE_PROPOSED = 1,
/** STATE_REJECTED - Outcome of governance votes is to reject the market */
STATE_REJECTED = 2,
/** STATE_PENDING - Governance vote passes/wins */
STATE_PENDING = 3,
/**
* STATE_CANCELLED - Market triggers cancellation condition or governance
* votes to close before market becomes Active
*/
STATE_CANCELLED = 4,
/** STATE_ACTIVE - Enactment date reached and usual auction exit checks pass */
STATE_ACTIVE = 5,
/** STATE_SUSPENDED - Price monitoring or liquidity monitoring trigger */
STATE_SUSPENDED = 6,
/** STATE_CLOSED - Governance vote to close (Not currently implemented) */
STATE_CLOSED = 7,
/**
* STATE_TRADING_TERMINATED - Defined by the product (i.e. from a product parameter,
* specified in market definition, giving close date/time)
*/
STATE_TRADING_TERMINATED = 8,
/** STATE_SETTLED - Settlement triggered and completed as defined by product */
STATE_SETTLED = 9,
UNRECOGNIZED = -1,
}
/** Trading mode the market is currently running, also referred to as 'market state' */
export enum Market_TradingMode {
/** TRADING_MODE_UNSPECIFIED - Default value, this is invalid */
TRADING_MODE_UNSPECIFIED = 0,
/** TRADING_MODE_CONTINUOUS - Normal trading */
TRADING_MODE_CONTINUOUS = 1,
/** TRADING_MODE_BATCH_AUCTION - Auction trading (FBA) */
TRADING_MODE_BATCH_AUCTION = 2,
/** TRADING_MODE_OPENING_AUCTION - Opening auction */
TRADING_MODE_OPENING_AUCTION = 3,
/** TRADING_MODE_MONITORING_AUCTION - Auction triggered by monitoring */
TRADING_MODE_MONITORING_AUCTION = 4,
/** TRADING_MODE_NO_TRADING - No trading is allowed */
TRADING_MODE_NO_TRADING = 5,
UNRECOGNIZED = -1,
}
/** Time stamps for important times about creating, enacting etc the market */
export interface MarketTimestamps {
/** Time when the market is first proposed. */
proposed: number;
/** Time when the market has been voted in and began its opening auction. */
pending: number;
/** Time when the market has left the opening auction and is ready to accept trades. */
open: number;
/** Time when the market closed. */
close: number;
}
File diff suppressed because it is too large Load Diff