chore: use generated types from vega protos

This commit is contained in:
maciek
2023-06-13 18:37:22 +02:00
parent 37340b4dc3
commit d1ebd26e21
16 changed files with 3900 additions and 311 deletions
+7
View File
@@ -45,6 +45,13 @@
"options": {
"command": "yarn tsc --project ./libs/wallet/tsconfig.spec.json"
}
},
"generate": {
"executor": "nx:run-commands",
"outputs": [],
"options": {
"command": "protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./libs/wallet/src/__generated__ $WALLET_TRANSACTIONS_SOURCE --proto_path=$WALLET_TRANSACTIONS_ROOT --ts_proto_opt=onlyTypes=true"
}
}
}
}
+78
View File
@@ -0,0 +1,78 @@
/* 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
@@ -0,0 +1,93 @@
/* 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
@@ -0,0 +1,234 @@
/* 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
@@ -0,0 +1,288 @@
/* 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;
}
@@ -0,0 +1,16 @@
/* 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;
}
@@ -0,0 +1,202 @@
/* 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
@@ -0,0 +1,60 @@
/* 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
@@ -0,0 +1,85 @@
/* 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
@@ -0,0 +1,131 @@
/* 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
@@ -0,0 +1,642 @@
/* 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
@@ -0,0 +1,361 @@
/* 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
+18 -311
View File
@@ -1,68 +1,32 @@
import { WalletClientError } from '@vegaprotocol/wallet-client';
import type * as Schema from '@vegaprotocol/types';
import type { PeggedReference } from '@vegaprotocol/types';
import type {
OrderSubmission,
LiquidityProvisionSubmission as LiquidityProvisionBody,
DelegateSubmission,
UndelegateSubmission,
OrderCancellation,
OrderAmendment,
VoteSubmission,
WithdrawSubmission,
ProposalSubmission,
BatchMarketInstructions,
Transfer,
} from '@vegaprotocol/protos/dist/vega/commands/v1';
export interface LiquidityProvisionSubmission {
liquidityProvisionSubmission: LiquidityProvisionBody;
pubKey: string;
propagate: boolean;
}
export interface LiquidityProvisionBody {
marketId: string;
commitmentAmount: string;
fee: string;
buys?: PeggedOrders[];
sells?: PeggedOrders[];
}
export interface PeggedOrders {
offset: string;
proportion: string;
reference: PeggedReference;
}
export interface DelegateSubmissionBody {
delegateSubmission: {
nodeId: string;
amount: string;
};
delegateSubmission: DelegateSubmission;
}
export interface UndelegateSubmissionBody {
undelegateSubmission: {
nodeId: string;
amount: string;
method: 'METHOD_NOW' | 'METHOD_AT_END_OF_EPOCH';
};
undelegateSubmission: UndelegateSubmission;
}
export interface OrderSubmission {
marketId: string;
reference?: string;
type: Schema.OrderType;
side: Schema.Side;
timeInForce: Schema.OrderTimeInForce;
size: string;
price?: string;
expiresAt?: string;
postOnly?: boolean;
reduceOnly?: boolean;
}
export interface OrderCancellation {
orderId?: string;
marketId?: string;
}
export interface OrderAmendment {
marketId: string;
orderId: string;
reference?: string;
timeInForce: Schema.OrderTimeInForce;
sizeDelta?: number;
price?: string;
expiresAt?: string;
}
export interface OrderSubmissionBody {
orderSubmission: OrderSubmission;
}
@@ -76,230 +40,11 @@ export interface OrderAmendmentBody {
}
export interface VoteSubmissionBody {
voteSubmission: {
value: Schema.VoteValue;
proposalId: string;
};
voteSubmission: VoteSubmission;
}
export interface WithdrawSubmissionBody {
withdrawSubmission: {
amount: string;
asset: string;
ext: {
erc20: {
receiverAddress: string;
};
};
};
}
interface ProposalNewMarketTerms {
newMarket: {
changes: {
decimalPlaces: string;
positionDecimalPlaces: string;
lpPriceRange: string;
linearSlippageFactor: string;
quadraticSlippageFactor: string;
instrument: {
name: string;
code: string;
future: {
settlementAsset: string;
quoteName: string;
dataSourceSpecForSettlementData: DataSourceSpec;
dataSourceSpecForTradingTermination: DataSourceSpec;
dataSourceSpecBinding: DataSourceSpecBinding;
};
};
metadata?: string[];
priceMonitoringParameters?: PriceMonitoringParameters;
liquidityMonitoringParameters?: {
targetStakeParameters: {
timeWindow: string;
scalingFactor: number;
};
triggeringRatio: string;
auctionExtension: string;
};
logNormal: LogNormal;
};
};
closingTimestamp: number;
enactmentTimestamp: number;
}
interface ProposalUpdateMarketTerms {
updateMarket: {
marketId: string;
changes: {
linearSlippageFactor: string;
quadraticSlippageFactor: string;
instrument: {
code: string;
future: {
quoteName: string;
settlementPriceDecimals: number;
dataSourceSpecForSettlementPrice: DataSourceSpec;
dataSourceSpecForTradingTermination: DataSourceSpec;
dataSourceSpecBinding: DataSourceSpecBinding;
};
};
priceMonitoringParameters?: PriceMonitoringParameters;
logNormal: LogNormal;
};
};
closingTimestamp: number;
enactmentTimestamp: number;
}
interface ProposalNetworkParameterTerms {
updateNetworkParameter: {
changes: {
key: string;
value: string;
};
};
closingTimestamp: number;
enactmentTimestamp: number;
}
interface ProposalFreeformTerms {
newFreeform: Record<string, never>;
closingTimestamp: number;
}
interface ProposalNewAssetTerms {
newAsset: {
changes: {
name: string;
symbol: string;
decimals: string;
quantum: string;
erc20: {
contractAddress: string;
withdrawThreshold: string;
lifetimeLimit: string;
};
};
};
closingTimestamp: number;
enactmentTimestamp: number;
validationTimestamp: number;
}
interface ProposalUpdateAssetTerms {
updateAsset: {
assetId: string;
changes: {
quantum: string;
erc20: {
withdrawThreshold: string;
lifetimeLimit: string;
};
};
};
closingTimestamp: number;
enactmentTimestamp: number;
}
interface DataSourceSpecBinding {
settlementDataProperty: string;
tradingTerminationProperty: string;
}
interface InternalDataSourceSpec {
internal: {
time: {
conditions: Condition[];
};
};
}
interface ExternalDataSourceSpec {
external: {
oracle: {
signers: Signer[];
filters: Filter[];
};
};
}
type DataSourceSpec = InternalDataSourceSpec | ExternalDataSourceSpec;
type Signer =
| {
ethAddress: {
address: string;
};
}
| {
pubKey: {
key: string;
};
};
interface Filter {
key: DefaultFilterKey | IntegerFilterKey;
conditions?: Condition[];
}
interface DefaultFilterKey {
name: string;
type: 'TYPE_DECIMAL' | 'TYPE_BOOLEAN' | 'TYPE_TIMESTAMP' | 'TYPE_STRING';
}
interface IntegerFilterKey {
name: string;
type: 'TYPE_INTEGER';
numberDecimalPlaces: string;
}
type ConditionOperator =
| 'OPERATOR_EQUALS'
| 'OPERATOR_GREATER_THAN'
| 'OPERATOR_GREATER_THAN_OR_EQUAL'
| 'OPERATOR_LESS_THAN'
| 'OPERATOR_LESS_THAN_OR_EQUAL';
interface Condition {
operator: ConditionOperator;
value: string;
}
interface LogNormal {
tau: number;
riskAversionParameter: number;
params: {
mu: number;
r: number;
sigma: number;
};
}
interface PriceMonitoringParameters {
triggers: Trigger[];
}
interface Trigger {
horizon: string;
probability: string;
auctionExtension: string;
}
export interface ProposalSubmission {
rationale: {
description: string;
title: string;
};
terms:
| ProposalFreeformTerms
| ProposalNewMarketTerms
| ProposalUpdateMarketTerms
| ProposalNetworkParameterTerms
| ProposalNewAssetTerms
| ProposalUpdateAssetTerms;
withdrawSubmission: WithdrawSubmission;
}
export interface ProposalSubmissionBody {
@@ -307,47 +52,9 @@ export interface ProposalSubmissionBody {
}
export interface BatchMarketInstructionSubmissionBody {
batchMarketInstructions: {
// Will be processed in this order and the total amount of instructions is
// restricted by the net param spam.protection.max.batchSize
cancellations?: OrderCancellation[];
amendments?: OrderAmendment[];
// Note: If multiple orders are submitted the first order ID is determined by hashing the signature of the transaction
// (see determineId function). For each subsequent order's ID, a hash of the previous orders ID is used
submissions?: OrderSubmission[];
};
batchMarketInstructions: BatchMarketInstructions;
}
interface TransferBase {
fromAccountType: Schema.AccountType;
to: string;
toAccountType: Schema.AccountType;
asset: string;
amount: string;
reference?: string;
}
export interface OneOffTransfer extends TransferBase {
oneOff: {
deliverOn?: number; // omit for immediate
};
}
export interface RecurringTransfer extends TransferBase {
recurring: {
factor: string;
startEpoch: number;
endEpoch?: number;
dispatchStrategy?: {
assetForMetric: string;
metric: Schema.DispatchMetric;
markets?: string[];
};
};
}
export type Transfer = OneOffTransfer | RecurringTransfer;
export interface TransferBody {
transfer: Transfer;
}
+3
View File
@@ -39,6 +39,7 @@
"@sentry/nextjs": "^6.19.3",
"@sentry/react": "^6.19.2",
"@sentry/tracing": "^6.19.2",
"@vegaprotocol/protos": "^0.4.0",
"@vegaprotocol/wallet-client": "0.1.9",
"@walletconnect/ethereum-provider": "^2.6.0",
"@web3-react/coinbase-wallet": "8.1.2-beta.0",
@@ -199,6 +200,8 @@
"tailwindcss": "^3.2.4",
"ts-jest": "27.1.4",
"ts-node": "10.9.1",
"ts-proto": "^1.148.2",
"ts-protoc-gen": "^0.15.0",
"tslib": "^2.0.0",
"type-fest": "^3.8.0",
"typescript": "^5.0.4",
+184
View File
@@ -4329,6 +4329,59 @@
schema-utils "^3.0.0"
source-map "^0.7.3"
"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf"
integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==
"@protobufjs/base64@^1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735"
integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==
"@protobufjs/codegen@^2.0.4":
version "2.0.4"
resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb"
integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==
"@protobufjs/eventemitter@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70"
integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==
"@protobufjs/fetch@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45"
integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==
dependencies:
"@protobufjs/aspromise" "^1.1.1"
"@protobufjs/inquire" "^1.1.0"
"@protobufjs/float@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1"
integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==
"@protobufjs/inquire@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089"
integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==
"@protobufjs/path@^1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d"
integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==
"@protobufjs/pool@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54"
integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==
"@protobufjs/utf8@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==
"@radix-ui/number@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@radix-ui/number/-/number-1.0.0.tgz#4c536161d0de750b3f5d55860fc3de46264f897b"
@@ -7313,6 +7366,11 @@
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.186.tgz#862e5514dd7bd66ada6c70ee5fce844b06c8ee97"
integrity sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw==
"@types/long@^4.0.1":
version "4.0.2"
resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a"
integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==
"@types/mdast@^3.0.0":
version "3.0.10"
resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.10.tgz#4724244a82a4598884cbbe9bcfd73dff927ee8af"
@@ -7363,6 +7421,11 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.8.4.tgz#54be907698f40de8a45770b48486aa3cbd3adff7"
integrity sha512-WdlVphvfR/GJCLEMbNA8lJ0lhFNBj4SW3O+O5/cEGw9oYrv0al9zTwuQsq+myDUXgNx2jgBynoVgZ2MMJ6pbow==
"@types/node@>=13.7.0":
version "20.3.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.0.tgz#719498898d5defab83c3560f45d8498f58d11938"
integrity sha512-cumHmIAf6On83X7yP+LrsEyUOf/YlociZelmpRYaGFydoaPdxdt80MAbu6vWerQT2COCp2nPvHdsbD7tHn/YlQ==
"@types/node@^12.12.54":
version "12.20.55"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240"
@@ -7398,6 +7461,11 @@
resolved "https://registry.yarnpkg.com/@types/npmlog/-/npmlog-4.1.4.tgz#30eb872153c7ead3e8688c476054ddca004115f6"
integrity sha512-WKG4gTr8przEZBiJ5r3s8ZIAoMXNbOgQ+j/d5O4X3x6kZJRLNvyUJuUK/KoG3+8BaOHPhp2m7WC6JKKeovDSzQ==
"@types/object-hash@^1.3.0":
version "1.3.4"
resolved "https://registry.yarnpkg.com/@types/object-hash/-/object-hash-1.3.4.tgz#079ba142be65833293673254831b5e3e847fe58b"
integrity sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA==
"@types/parse-json@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
@@ -7845,6 +7913,14 @@
"@typescript-eslint/types" "5.40.0"
eslint-visitor-keys "^3.3.0"
"@vegaprotocol/protos@^0.4.0":
version "0.4.0"
resolved "https://registry.yarnpkg.com/@vegaprotocol/protos/-/protos-0.4.0.tgz#3c5640e1d42c3d5625a5d7c7457ddc41124cb0c8"
integrity sha512-1d1J1JTTuaHlfeVsMCzMnQ7l8T9XH59UJJ1Q9eLU//lDAkK/5eEoTkdkyh5g6j3PoZ5xrM/QHJijjx7w8SFhwg==
dependencies:
protobuf-codec "^1.0.6"
type-fest "^3.6.0"
"@vegaprotocol/wallet-client@0.1.9":
version "0.1.9"
resolved "https://registry.yarnpkg.com/@vegaprotocol/wallet-client/-/wallet-client-0.1.9.tgz#8c6a71c8b2222b3de5d73cade8fc6db57e332de9"
@@ -10626,6 +10702,11 @@ cardinal@^2.1.1:
ansicolors "~0.3.2"
redeyed "~2.1.0"
case-anything@^2.1.10:
version "2.1.13"
resolved "https://registry.yarnpkg.com/case-anything/-/case-anything-2.1.13.tgz#0cdc16278cb29a7fcdeb072400da3f342ba329e9"
integrity sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==
case-sensitive-paths-webpack-plugin@^2.3.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz#db64066c6422eed2e08cc14b986ca43796dbc6d4"
@@ -12155,6 +12236,11 @@ dataloader@2.1.0:
resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-2.1.0.tgz#c69c538235e85e7ac6c6c444bae8ecabf5de9df7"
integrity sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==
dataloader@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-1.4.0.tgz#bca11d867f5d3f1b9ed9f737bd15970c65dff5c8"
integrity sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==
date-fns-tz@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/date-fns-tz/-/date-fns-tz-2.0.0.tgz#1b14c386cb8bc16fc56fe333d4fc34ae1d1099d5"
@@ -12432,6 +12518,11 @@ detect-indent@^6.0.0:
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6"
integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==
detect-libc@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==
detect-newline@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
@@ -12687,6 +12778,13 @@ dotenv@~10.0.0:
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81"
integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==
dprint-node@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/dprint-node/-/dprint-node-1.0.7.tgz#f571eaf61affb3a696cff1bdde78a021875ba540"
integrity sha512-NTZOW9A7ipb0n7z7nC3wftvsbceircwVHSgzobJsEQa+7RnOMbhrfX5IflA6CtC4GA63DSAiHYXa4JKEy9F7cA==
dependencies:
detect-libc "^1.0.3"
dset@^3.1.1, dset@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/dset/-/dset-3.1.2.tgz#89c436ca6450398396dc6538ea00abc0c54cd45a"
@@ -14785,6 +14883,11 @@ globule@^1.0.0:
lodash "^4.17.21"
minimatch "~3.0.2"
google-protobuf@^3.15.5:
version "3.21.2"
resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.21.2.tgz#4580a2bea8bbb291ee579d1fefb14d6fa3070ea4"
integrity sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA==
gopd@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c"
@@ -17728,6 +17831,11 @@ log-update@^4.0.0:
slice-ansi "^4.0.0"
wrap-ansi "^6.2.0"
long@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28"
integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
@@ -18721,6 +18829,11 @@ nan@^2.12.1:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb"
integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==
nanoassert@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/nanoassert/-/nanoassert-2.0.0.tgz#a05f86de6c7a51618038a620f88878ed1e490c09"
integrity sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA==
nanoid@3.3.3:
version "3.3.3"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25"
@@ -19085,6 +19198,11 @@ object-copy@^0.1.0:
define-property "^0.2.5"
kind-of "^3.0.3"
object-hash@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.3.1.tgz#fde452098a951cb145f039bb7d455449ddc126df"
integrity sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==
object-hash@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9"
@@ -20530,6 +20648,32 @@ property-information@^6.0.0:
resolved "https://registry.yarnpkg.com/property-information/-/property-information-6.2.0.tgz#b74f522c31c097b5149e3c3cb8d7f3defd986a1d"
integrity sha512-kma4U7AFCTwpqq5twzC1YVIDXSqg6qQK6JN0smOw8fgRy1OkMi0CYSzFmsy6dnqSenamAtj0CyXMUJ1Mf6oROg==
protobuf-codec@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/protobuf-codec/-/protobuf-codec-1.0.6.tgz#46b93b76966e41e86336d5e7bec53f6f2d25c3dd"
integrity sha512-tQ9FGcca9g6COFr1yft+B/JYSafx6xsxak9YL0yCQ3FAM9HkbgEUZWyz1NbPcTN3Efw2YEVEBxaHr1+P9p+eJw==
dependencies:
nanoassert "^2.0.0"
protobufjs@^6.11.3, protobufjs@^6.8.8:
version "6.11.3"
resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74"
integrity sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==
dependencies:
"@protobufjs/aspromise" "^1.1.2"
"@protobufjs/base64" "^1.1.2"
"@protobufjs/codegen" "^2.0.4"
"@protobufjs/eventemitter" "^1.1.0"
"@protobufjs/fetch" "^1.1.0"
"@protobufjs/float" "^1.0.2"
"@protobufjs/inquire" "^1.1.0"
"@protobufjs/path" "^1.1.2"
"@protobufjs/pool" "^1.1.0"
"@protobufjs/utf8" "^1.1.0"
"@types/long" "^4.0.1"
"@types/node" ">=13.7.0"
long "^4.0.0"
protocols@^1.4.0:
version "1.4.8"
resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.8.tgz#48eea2d8f58d9644a4a32caae5d5db290a075ce8"
@@ -23617,6 +23761,41 @@ ts-pnp@^1.1.6:
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92"
integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==
ts-poet@^6.4.1:
version "6.4.1"
resolved "https://registry.yarnpkg.com/ts-poet/-/ts-poet-6.4.1.tgz#e68d314a07cf9c0d568a3bfd87023ec91ff77964"
integrity sha512-AjZEs4h2w4sDfwpHMxQKHrTlNh2wRbM5NRXmLz0RiH+yPGtSQFbe9hBpNocU8vqVNgfh0BIOiXR80xDz3kKxUQ==
dependencies:
dprint-node "^1.0.7"
ts-proto-descriptors@1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/ts-proto-descriptors/-/ts-proto-descriptors-1.9.0.tgz#0ed5631f11851846c8de21be2bff346719edce71"
integrity sha512-Ui8zA5Q4Jnq6JIGRraUWvECrqixxtwwin8GkhIkvwCpR+JcSPsxWe8HfTj5eHfyruGYI6Zjf96XlC87hTakHfQ==
dependencies:
long "^4.0.0"
protobufjs "^6.8.8"
ts-proto@^1.148.2:
version "1.148.2"
resolved "https://registry.yarnpkg.com/ts-proto/-/ts-proto-1.148.2.tgz#16abf75bbbfb3e5093e8f0c064721e7ed1149e80"
integrity sha512-sd3STxwE6/6VpASSFnIySID2lkVGwqUU9gnz0Vr1DmB83VjlJpVSeCuEj6UHsrKy7AU2UxchOfcM95LJh0uwjg==
dependencies:
"@types/object-hash" "^1.3.0"
case-anything "^2.1.10"
dataloader "^1.4.0"
object-hash "^1.3.1"
protobufjs "^6.11.3"
ts-poet "^6.4.1"
ts-proto-descriptors "1.9.0"
ts-protoc-gen@^0.15.0:
version "0.15.0"
resolved "https://registry.yarnpkg.com/ts-protoc-gen/-/ts-protoc-gen-0.15.0.tgz#2fec5930b46def7dcc9fa73c060d770b7b076b7b"
integrity sha512-TycnzEyrdVDlATJ3bWFTtra3SCiEP0W0vySXReAuEygXCUr1j2uaVyL0DhzjwuUdQoW5oXPwk6oZWeA0955V+g==
dependencies:
google-protobuf "^3.15.5"
tsconfig-paths-webpack-plugin@3.5.2:
version "3.5.2"
resolved "https://registry.yarnpkg.com/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-3.5.2.tgz#01aafff59130c04a8c4ebc96a3045c43c376449a"
@@ -23734,6 +23913,11 @@ type-fest@^0.8.1:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
type-fest@^3.6.0:
version "3.11.1"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.11.1.tgz#d8e62c7f42e14537d5b8796de5450d541f3a33a7"
integrity sha512-aCuRNRERRVh33lgQaJRlUxZqzfhzwTrsE98Mc3o3VXqmiaQdHacgUtJ0esp+7MvZ92qhtzKPeusaX6vIEcoreA==
type-fest@^3.8.0:
version "3.8.0"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.8.0.tgz#ce80d1ca7c7d11c5540560999cbd410cb5b3a385"