diff --git a/.gitmodules b/.gitmodules index bfb251e..8c169f0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,3 @@ [submodule "vega"] path = vendor/vega url = git@github.com:vegaprotocol/vega.git - branch = release/v0.74.0-preview.7 diff --git a/messages.json b/messages.json index 1cedde8..d6ecc0e 100644 --- a/messages.json +++ b/messages.json @@ -2171,6 +2171,18 @@ "typeName": null, "messageTypeLocal": null, "oneofIndex": null + }, + { + "name": "chainId", + "number": 4, + "type": "string", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": null, + "messageTypeLocal": null, + "oneofIndex": null } ] }, @@ -4182,6 +4194,10 @@ { "name": "ACCOUNT_TYPE_ORDER_MARGIN", "value": 29 + }, + { + "name": "ACCOUNT_TYPE_REWARD_REALISED_RETURN", + "value": 30 } ] }, @@ -4402,6 +4418,10 @@ { "name": "DISPATCH_METRIC_VALIDATOR_RANKING", "value": 8 + }, + { + "name": "DISPATCH_METRIC_REALISED_RETURN", + "value": 9 } ] }, @@ -4758,6 +4778,10 @@ { "name": "PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED", "value": 59 + }, + { + "name": "PROPOSAL_ERROR_INVALID_SIZE_DECIMAL_PLACES", + "value": 60 } ] }, @@ -5283,6 +5307,18 @@ "messageTypeLocal": null, "oneofIndex": null }, + { + "name": "chainId", + "number": 3, + "type": "string", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": null, + "messageTypeLocal": null, + "oneofIndex": null + }, { "name": "assetList", "number": 1001, @@ -5553,6 +5589,18 @@ "messageTypeLocal": null, "oneofIndex": null }, + { + "name": "chainId", + "number": 3, + "type": "string", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": null, + "messageTypeLocal": null, + "oneofIndex": null + }, { "name": "signerAdded", "number": 1001, @@ -6472,18 +6520,6 @@ "typeName": null, "messageTypeLocal": null, "oneofIndex": null - }, - { - "name": "name", - "number": 3, - "type": "string", - "wireType": "bytes", - "repeated": false, - "packed": false, - "optional": false, - "typeName": null, - "messageTypeLocal": null, - "oneofIndex": null } ] }, @@ -8095,6 +8131,18 @@ "typeName": null, "messageTypeLocal": null, "oneofIndex": null + }, + { + "name": "disposalSlippageRange", + "number": 5, + "type": "string", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": null, + "messageTypeLocal": null, + "oneofIndex": null } ] }, @@ -8427,6 +8475,10 @@ { "name": "REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES", "value": 9 + }, + { + "name": "REJECTION_REASON_STOP_ORDER_SIZE_OVERRIDE_UNSUPPORTED_FOR_SPOT", + "value": 10 } ] } @@ -10207,6 +10259,10 @@ { "name": "STATUS_FINALIZED", "value": 3 + }, + { + "name": "STATUS_DUPLICATE_REJECTED", + "value": 4 } ] } @@ -12982,6 +13038,125 @@ } ] }, + { + "name": "EVMBridgeConfig", + "fullName": ".vega.EVMBridgeConfig", + "map": false, + "oneofs": [], + "enums": [], + "messages": [], + "fields": [ + { + "name": "networkId", + "number": 1, + "type": "string", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": null, + "messageTypeLocal": null, + "oneofIndex": null + }, + { + "name": "chainId", + "number": 2, + "type": "string", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": null, + "messageTypeLocal": null, + "oneofIndex": null + }, + { + "name": "collateralBridgeContract", + "number": 3, + "type": "message", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": ".vega.EthereumContractConfig", + "messageType": "EthereumContractConfig", + "messageTypeLocal": null, + "oneofIndex": null + }, + { + "name": "confirmations", + "number": 4, + "type": "uint32", + "wireType": "varint", + "repeated": false, + "packed": false, + "optional": false, + "typeName": null, + "messageTypeLocal": null, + "oneofIndex": null + }, + { + "name": "multisigControlContract", + "number": 5, + "type": "message", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": ".vega.EthereumContractConfig", + "messageType": "EthereumContractConfig", + "messageTypeLocal": null, + "oneofIndex": null + }, + { + "name": "blockTime", + "number": 6, + "type": "string", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": null, + "messageTypeLocal": null, + "oneofIndex": null + }, + { + "name": "name", + "number": 7, + "type": "string", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": null, + "messageTypeLocal": null, + "oneofIndex": null + } + ] + }, + { + "name": "EVMBridgeConfigs", + "fullName": ".vega.EVMBridgeConfigs", + "map": false, + "oneofs": [], + "enums": [], + "messages": [], + "fields": [ + { + "name": "configs", + "number": 1, + "type": "message", + "wireType": "bytes", + "repeated": true, + "packed": false, + "optional": false, + "typeName": ".vega.EVMBridgeConfig", + "messageType": "EVMBridgeConfig", + "messageTypeLocal": null, + "oneofIndex": null + } + ] + }, { "name": "EthereumContractConfig", "fullName": ".vega.EthereumContractConfig", @@ -14998,6 +15173,18 @@ "typeName": null, "messageTypeLocal": null, "oneofIndex": null + }, + { + "name": "chainId", + "number": 4, + "type": "string", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": null, + "messageTypeLocal": null, + "oneofIndex": null } ] }, @@ -15104,18 +15291,6 @@ "typeName": null, "messageTypeLocal": null, "oneofIndex": null - }, - { - "name": "name", - "number": 3, - "type": "string", - "wireType": "bytes", - "repeated": false, - "packed": false, - "optional": false, - "typeName": null, - "messageTypeLocal": null, - "oneofIndex": null } ] }, @@ -15468,7 +15643,7 @@ "oneofIndex": null }, { - "name": "decimalPlaces", + "name": "priceDecimalPlaces", "number": 2, "type": "uint64", "wireType": "varint", @@ -15546,7 +15721,7 @@ "oneofName": "riskParameters" }, { - "name": "positionDecimalPlaces", + "name": "sizeDecimalPlaces", "number": 6, "type": "int64", "wireType": "varint", @@ -16282,6 +16457,53 @@ "typeName": null, "messageTypeLocal": null, "oneofIndex": null + }, + { + "name": "instrument", + "number": 7, + "type": "message", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": ".vega.UpdateSpotInstrumentConfiguration", + "messageType": "UpdateSpotInstrumentConfiguration", + "messageTypeLocal": null, + "oneofIndex": null + } + ] + }, + { + "name": "UpdateSpotInstrumentConfiguration", + "fullName": ".vega.UpdateSpotInstrumentConfiguration", + "map": false, + "oneofs": [], + "enums": [], + "messages": [], + "fields": [ + { + "name": "code", + "number": 1, + "type": "string", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": null, + "messageTypeLocal": null, + "oneofIndex": null + }, + { + "name": "name", + "number": 2, + "type": "string", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": null, + "messageTypeLocal": null, + "oneofIndex": null } ] }, @@ -16914,6 +17136,18 @@ "messageTypeLocal": null, "oneofIndex": null }, + { + "name": "validationTimestamp", + "number": 2, + "type": "int64", + "wireType": "varint", + "repeated": false, + "packed": false, + "optional": false, + "typeName": null, + "messageTypeLocal": null, + "oneofIndex": null + }, { "name": "updateMarket", "number": 101, @@ -17081,6 +17315,20 @@ "messageTypeLocal": null, "oneofIndex": 0, "oneofName": "change" + }, + { + "name": "newAsset", + "number": 113, + "type": "message", + "wireType": "bytes", + "repeated": false, + "packed": false, + "optional": false, + "typeName": ".vega.NewAsset", + "messageType": "NewAsset", + "messageTypeLocal": null, + "oneofIndex": 0, + "oneofName": "change" } ] }, diff --git a/vega.d.ts b/vega.d.ts index 86a7ed7..c89016c 100644 --- a/vega.d.ts +++ b/vega.d.ts @@ -135,6 +135,8 @@ export * as LiquidityProvision from './vega/LiquidityProvision.js' export * as EthereumL2Config from './vega/EthereumL2Config.js' export * as EthereumL2Configs from './vega/EthereumL2Configs.js' export * as EthereumConfig from './vega/EthereumConfig.js' +export * as EVMBridgeConfig from './vega/EVMBridgeConfig.js' +export * as EVMBridgeConfigs from './vega/EVMBridgeConfigs.js' export * as EthereumContractConfig from './vega/EthereumContractConfig.js' export * as EpochTimestamps from './vega/EpochTimestamps.js' export * as Epoch from './vega/Epoch.js' @@ -183,6 +185,7 @@ export * as UpdateMarket from './vega/UpdateMarket.js' export * as UpdateSpotMarket from './vega/UpdateSpotMarket.js' export * as UpdateMarketConfiguration from './vega/UpdateMarketConfiguration.js' export * as UpdateSpotMarketConfiguration from './vega/UpdateSpotMarketConfiguration.js' +export * as UpdateSpotInstrumentConfiguration from './vega/UpdateSpotInstrumentConfiguration.js' export * as UpdateInstrumentConfiguration from './vega/UpdateInstrumentConfiguration.js' export * as UpdateFutureProduct from './vega/UpdateFutureProduct.js' export * as UpdatePerpetualProduct from './vega/UpdatePerpetualProduct.js' diff --git a/vega.js b/vega.js index 86344d2..25ca9ea 100644 --- a/vega.js +++ b/vega.js @@ -134,6 +134,8 @@ module.exports = { EthereumL2Config: require('./vega/EthereumL2Config.js'), EthereumL2Configs: require('./vega/EthereumL2Configs.js'), EthereumConfig: require('./vega/EthereumConfig.js'), + EVMBridgeConfig: require('./vega/EVMBridgeConfig.js'), + EVMBridgeConfigs: require('./vega/EVMBridgeConfigs.js'), EthereumContractConfig: require('./vega/EthereumContractConfig.js'), EpochTimestamps: require('./vega/EpochTimestamps.js'), Epoch: require('./vega/Epoch.js'), @@ -182,6 +184,7 @@ module.exports = { UpdateSpotMarket: require('./vega/UpdateSpotMarket.js'), UpdateMarketConfiguration: require('./vega/UpdateMarketConfiguration.js'), UpdateSpotMarketConfiguration: require('./vega/UpdateSpotMarketConfiguration.js'), + UpdateSpotInstrumentConfiguration: require('./vega/UpdateSpotInstrumentConfiguration.js'), UpdateInstrumentConfiguration: require('./vega/UpdateInstrumentConfiguration.js'), UpdateFutureProduct: require('./vega/UpdateFutureProduct.js'), UpdatePerpetualProduct: require('./vega/UpdatePerpetualProduct.js'), diff --git a/vega/AccountType.d.ts b/vega/AccountType.d.ts index acced36..a0b962b 100644 --- a/vega/AccountType.d.ts +++ b/vega/AccountType.d.ts @@ -30,6 +30,7 @@ export const ACCOUNT_TYPE_REWARD_RETURN_VOLATILITY = 26 export const ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING = 27 export const ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD = 28 export const ACCOUNT_TYPE_ORDER_MARGIN = 29 +export const ACCOUNT_TYPE_REWARD_REALISED_RETURN = 30 export type Values = | 0 @@ -61,6 +62,7 @@ export type Values = | 27 | 28 | 29 + | 30 export type Names = | 'ACCOUNT_TYPE_UNSPECIFIED' | 'ACCOUNT_TYPE_INSURANCE' @@ -91,6 +93,7 @@ export type Names = | 'ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING' | 'ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD' | 'ACCOUNT_TYPE_ORDER_MARGIN' + | 'ACCOUNT_TYPE_REWARD_REALISED_RETURN' export const enum AccountType { ACCOUNT_TYPE_UNSPECIFIED = 0, @@ -121,7 +124,8 @@ export const enum AccountType { ACCOUNT_TYPE_REWARD_RETURN_VOLATILITY = 26, ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING = 27, ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD = 28, - ACCOUNT_TYPE_ORDER_MARGIN = 29 + ACCOUNT_TYPE_ORDER_MARGIN = 29, + ACCOUNT_TYPE_REWARD_REALISED_RETURN = 30 } declare const enumValues: Map diff --git a/vega/AccountType.js b/vega/AccountType.js index dea7c94..3261f7d 100644 --- a/vega/AccountType.js +++ b/vega/AccountType.js @@ -32,6 +32,7 @@ const ACCOUNT_TYPE_REWARD_RETURN_VOLATILITY = 26 const ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING = 27 const ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD = 28 const ACCOUNT_TYPE_ORDER_MARGIN = 29 +const ACCOUNT_TYPE_REWARD_REALISED_RETURN = 30 const enumValues = new Map([ [0, 'ACCOUNT_TYPE_UNSPECIFIED'], @@ -62,7 +63,8 @@ const enumValues = new Map([ [26, 'ACCOUNT_TYPE_REWARD_RETURN_VOLATILITY'], [27, 'ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING'], [28, 'ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD'], - [29, 'ACCOUNT_TYPE_ORDER_MARGIN'] + [29, 'ACCOUNT_TYPE_ORDER_MARGIN'], + [30, 'ACCOUNT_TYPE_REWARD_REALISED_RETURN'] ]) const enumNames = new Map([ ['ACCOUNT_TYPE_UNSPECIFIED', 0], @@ -93,7 +95,8 @@ const enumNames = new Map([ ['ACCOUNT_TYPE_REWARD_RETURN_VOLATILITY', 26], ['ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING', 27], ['ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD', 28], - ['ACCOUNT_TYPE_ORDER_MARGIN', 29] + ['ACCOUNT_TYPE_ORDER_MARGIN', 29], + ['ACCOUNT_TYPE_REWARD_REALISED_RETURN', 30] ]) function encode(value, buf, byteOffset = 0) { @@ -114,7 +117,7 @@ function encodingLength(value) { if (typeof value === 'string') return encodingLength(parse(value)) assert(value != null, 'Invalid AccountType value (' + value + ')') - if (0 <= value && value <= 29) return 1 + if (0 <= value && value <= 30) return 1 // enumerable max value in case of unknown value return 5 @@ -170,5 +173,6 @@ module.exports = { ACCOUNT_TYPE_REWARD_RETURN_VOLATILITY, ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING, ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD, - ACCOUNT_TYPE_ORDER_MARGIN + ACCOUNT_TYPE_ORDER_MARGIN, + ACCOUNT_TYPE_REWARD_REALISED_RETURN } diff --git a/vega/BatchProposalTermsChange.d.ts b/vega/BatchProposalTermsChange.d.ts index 8f676d5..5214257 100644 --- a/vega/BatchProposalTermsChange.d.ts +++ b/vega/BatchProposalTermsChange.d.ts @@ -11,12 +11,14 @@ import type { CancelTransfer } from './CancelTransfer' import type { UpdateMarketState } from './UpdateMarketState' import type { UpdateReferralProgram } from './UpdateReferralProgram' import type { UpdateVolumeDiscountProgram } from './UpdateVolumeDiscountProgram' +import type { NewAsset } from './NewAsset' export * from './BatchProposalTermsChange/encode.js' export * from './BatchProposalTermsChange/decode.js' export type BatchProposalTermsChange = { enactmentTimestamp: bigint + validationTimestamp: bigint change: | { updateMarket: UpdateMarket } | { newMarket: NewMarket } @@ -30,5 +32,6 @@ export type BatchProposalTermsChange = { | { updateMarketState: UpdateMarketState } | { updateReferralProgram: UpdateReferralProgram } | { updateVolumeDiscountProgram: UpdateVolumeDiscountProgram } + | { newAsset: NewAsset } | null } diff --git a/vega/BatchProposalTermsChange/decode.js b/vega/BatchProposalTermsChange/decode.js index 244dfd4..c3f8fba 100644 --- a/vega/BatchProposalTermsChange/decode.js +++ b/vega/BatchProposalTermsChange/decode.js @@ -13,6 +13,7 @@ const _vega_CancelTransfer = require('./../CancelTransfer/decode.js') const _vega_UpdateMarketState = require('./../UpdateMarketState/decode.js') const _vega_UpdateReferralProgram = require('./../UpdateReferralProgram/decode.js') const _vega_UpdateVolumeDiscountProgram = require('./../UpdateVolumeDiscountProgram/decode.js') +const _vega_NewAsset = require('./../NewAsset/decode.js') exports.decode = function decode( buf, @@ -20,6 +21,7 @@ exports.decode = function decode( byteLength = buf.byteLength ) { let field$enactmentTimestamp = 0n + let field$validationTimestamp = 0n let field$change = null for (const [field, { data }] of reader(buf, byteOffset, byteLength)) { switch (field) { @@ -27,6 +29,10 @@ exports.decode = function decode( field$enactmentTimestamp = int64(data) break + case 2: + field$validationTimestamp = int64(data) + break + case 101: field$change = { updateMarket: _vega_UpdateMarket.decode(data) } break @@ -83,7 +89,15 @@ exports.decode = function decode( _vega_UpdateVolumeDiscountProgram.decode(data) } break + + case 113: + field$change = { newAsset: _vega_NewAsset.decode(data) } + break } } - return { enactmentTimestamp: field$enactmentTimestamp, change: field$change } + return { + enactmentTimestamp: field$enactmentTimestamp, + validationTimestamp: field$validationTimestamp, + change: field$change + } } diff --git a/vega/BatchProposalTermsChange/encode.js b/vega/BatchProposalTermsChange/encode.js index a2a1f7a..f146e35 100644 --- a/vega/BatchProposalTermsChange/encode.js +++ b/vega/BatchProposalTermsChange/encode.js @@ -13,11 +13,13 @@ const _vega_CancelTransfer = require('./../CancelTransfer/encode.js') const _vega_UpdateMarketState = require('./../UpdateMarketState/encode.js') const _vega_UpdateReferralProgram = require('./../UpdateReferralProgram/encode.js') const _vega_UpdateVolumeDiscountProgram = require('./../UpdateVolumeDiscountProgram/encode.js') +const _vega_NewAsset = require('./../NewAsset/encode.js') exports.encode = function encode(obj = {}, buf, byteOffset = 0) { const writer = new Writer() if (obj.enactmentTimestamp) writer.varint(1, obj.enactmentTimestamp, int64) + if (obj.validationTimestamp) writer.varint(2, obj.validationTimestamp, int64) if (obj.change?.updateMarket ?? obj.updateMarket) writer.bytes( @@ -95,6 +97,11 @@ exports.encode = function encode(obj = {}, buf, byteOffset = 0) { obj.updateVolumeDiscountProgram ) ) + if (obj.change?.newAsset ?? obj.newAsset) + writer.bytes( + 113, + _vega_NewAsset.encode(obj.change?.newAsset ?? obj.newAsset) + ) return writer.concat(buf, byteOffset) } diff --git a/vega/Deposit/Status.d.ts b/vega/Deposit/Status.d.ts index 4c71e25..fda4ee1 100644 --- a/vega/Deposit/Status.d.ts +++ b/vega/Deposit/Status.d.ts @@ -5,19 +5,22 @@ export const STATUS_UNSPECIFIED = 0 export const STATUS_OPEN = 1 export const STATUS_CANCELLED = 2 export const STATUS_FINALIZED = 3 +export const STATUS_DUPLICATE_REJECTED = 4 -export type Values = 0 | 1 | 2 | 3 +export type Values = 0 | 1 | 2 | 3 | 4 export type Names = | 'STATUS_UNSPECIFIED' | 'STATUS_OPEN' | 'STATUS_CANCELLED' | 'STATUS_FINALIZED' + | 'STATUS_DUPLICATE_REJECTED' export const enum Status { STATUS_UNSPECIFIED = 0, STATUS_OPEN = 1, STATUS_CANCELLED = 2, - STATUS_FINALIZED = 3 + STATUS_FINALIZED = 3, + STATUS_DUPLICATE_REJECTED = 4 } declare const enumValues: Map diff --git a/vega/Deposit/Status.js b/vega/Deposit/Status.js index b036dca..4b46087 100644 --- a/vega/Deposit/Status.js +++ b/vega/Deposit/Status.js @@ -7,18 +7,21 @@ const STATUS_UNSPECIFIED = 0 const STATUS_OPEN = 1 const STATUS_CANCELLED = 2 const STATUS_FINALIZED = 3 +const STATUS_DUPLICATE_REJECTED = 4 const enumValues = new Map([ [0, 'STATUS_UNSPECIFIED'], [1, 'STATUS_OPEN'], [2, 'STATUS_CANCELLED'], - [3, 'STATUS_FINALIZED'] + [3, 'STATUS_FINALIZED'], + [4, 'STATUS_DUPLICATE_REJECTED'] ]) const enumNames = new Map([ ['STATUS_UNSPECIFIED', 0], ['STATUS_OPEN', 1], ['STATUS_CANCELLED', 2], - ['STATUS_FINALIZED', 3] + ['STATUS_FINALIZED', 3], + ['STATUS_DUPLICATE_REJECTED', 4] ]) function encode(value, buf, byteOffset = 0) { @@ -38,7 +41,7 @@ function encodingLength(value) { if (typeof value === 'string') return encodingLength(parse(value)) assert(value != null, 'Invalid Status value (' + value + ')') - if (0 <= value && value <= 3) return 1 + if (0 <= value && value <= 4) return 1 // enumerable max value in case of unknown value return 5 @@ -69,5 +72,6 @@ module.exports = { STATUS_UNSPECIFIED, STATUS_OPEN, STATUS_CANCELLED, - STATUS_FINALIZED + STATUS_FINALIZED, + STATUS_DUPLICATE_REJECTED } diff --git a/vega/DispatchMetric.d.ts b/vega/DispatchMetric.d.ts index e3b6906..e425aef 100644 --- a/vega/DispatchMetric.d.ts +++ b/vega/DispatchMetric.d.ts @@ -10,8 +10,9 @@ export const DISPATCH_METRIC_AVERAGE_POSITION = 5 export const DISPATCH_METRIC_RELATIVE_RETURN = 6 export const DISPATCH_METRIC_RETURN_VOLATILITY = 7 export const DISPATCH_METRIC_VALIDATOR_RANKING = 8 +export const DISPATCH_METRIC_REALISED_RETURN = 9 -export type Values = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 +export type Values = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 export type Names = | 'DISPATCH_METRIC_UNSPECIFIED' | 'DISPATCH_METRIC_MAKER_FEES_PAID' @@ -22,6 +23,7 @@ export type Names = | 'DISPATCH_METRIC_RELATIVE_RETURN' | 'DISPATCH_METRIC_RETURN_VOLATILITY' | 'DISPATCH_METRIC_VALIDATOR_RANKING' + | 'DISPATCH_METRIC_REALISED_RETURN' export const enum DispatchMetric { DISPATCH_METRIC_UNSPECIFIED = 0, @@ -32,7 +34,8 @@ export const enum DispatchMetric { DISPATCH_METRIC_AVERAGE_POSITION = 5, DISPATCH_METRIC_RELATIVE_RETURN = 6, DISPATCH_METRIC_RETURN_VOLATILITY = 7, - DISPATCH_METRIC_VALIDATOR_RANKING = 8 + DISPATCH_METRIC_VALIDATOR_RANKING = 8, + DISPATCH_METRIC_REALISED_RETURN = 9 } declare const enumValues: Map diff --git a/vega/DispatchMetric.js b/vega/DispatchMetric.js index 99dea20..9a679ab 100644 --- a/vega/DispatchMetric.js +++ b/vega/DispatchMetric.js @@ -12,6 +12,7 @@ const DISPATCH_METRIC_AVERAGE_POSITION = 5 const DISPATCH_METRIC_RELATIVE_RETURN = 6 const DISPATCH_METRIC_RETURN_VOLATILITY = 7 const DISPATCH_METRIC_VALIDATOR_RANKING = 8 +const DISPATCH_METRIC_REALISED_RETURN = 9 const enumValues = new Map([ [0, 'DISPATCH_METRIC_UNSPECIFIED'], @@ -22,7 +23,8 @@ const enumValues = new Map([ [5, 'DISPATCH_METRIC_AVERAGE_POSITION'], [6, 'DISPATCH_METRIC_RELATIVE_RETURN'], [7, 'DISPATCH_METRIC_RETURN_VOLATILITY'], - [8, 'DISPATCH_METRIC_VALIDATOR_RANKING'] + [8, 'DISPATCH_METRIC_VALIDATOR_RANKING'], + [9, 'DISPATCH_METRIC_REALISED_RETURN'] ]) const enumNames = new Map([ ['DISPATCH_METRIC_UNSPECIFIED', 0], @@ -33,7 +35,8 @@ const enumNames = new Map([ ['DISPATCH_METRIC_AVERAGE_POSITION', 5], ['DISPATCH_METRIC_RELATIVE_RETURN', 6], ['DISPATCH_METRIC_RETURN_VOLATILITY', 7], - ['DISPATCH_METRIC_VALIDATOR_RANKING', 8] + ['DISPATCH_METRIC_VALIDATOR_RANKING', 8], + ['DISPATCH_METRIC_REALISED_RETURN', 9] ]) function encode(value, buf, byteOffset = 0) { @@ -54,7 +57,7 @@ function encodingLength(value) { if (typeof value === 'string') return encodingLength(parse(value)) assert(value != null, 'Invalid DispatchMetric value (' + value + ')') - if (0 <= value && value <= 8) return 1 + if (0 <= value && value <= 9) return 1 // enumerable max value in case of unknown value return 5 @@ -90,5 +93,6 @@ module.exports = { DISPATCH_METRIC_AVERAGE_POSITION, DISPATCH_METRIC_RELATIVE_RETURN, DISPATCH_METRIC_RETURN_VOLATILITY, - DISPATCH_METRIC_VALIDATOR_RANKING + DISPATCH_METRIC_VALIDATOR_RANKING, + DISPATCH_METRIC_REALISED_RETURN } diff --git a/vega/ERC20.d.ts b/vega/ERC20.d.ts index 3d89845..c6e2668 100644 --- a/vega/ERC20.d.ts +++ b/vega/ERC20.d.ts @@ -7,4 +7,5 @@ export type ERC20 = { contractAddress: string lifetimeLimit: string withdrawThreshold: string + chainId: string } diff --git a/vega/ERC20/decode.js b/vega/ERC20/decode.js index 12399c5..e16bdf8 100644 --- a/vega/ERC20/decode.js +++ b/vega/ERC20/decode.js @@ -10,6 +10,7 @@ exports.decode = function decode( let field$contractAddress = '' let field$lifetimeLimit = '' let field$withdrawThreshold = '' + let field$chainId = '' for (const [field, { data }] of reader(buf, byteOffset, byteLength)) { switch (field) { case 1: @@ -23,11 +24,16 @@ exports.decode = function decode( case 3: field$withdrawThreshold = string(data) break + + case 4: + field$chainId = string(data) + break } } return { contractAddress: field$contractAddress, lifetimeLimit: field$lifetimeLimit, - withdrawThreshold: field$withdrawThreshold + withdrawThreshold: field$withdrawThreshold, + chainId: field$chainId } } diff --git a/vega/ERC20/encode.js b/vega/ERC20/encode.js index d49688b..78a95aa 100644 --- a/vega/ERC20/encode.js +++ b/vega/ERC20/encode.js @@ -8,6 +8,7 @@ exports.encode = function encode(obj = {}, buf, byteOffset = 0) { if (obj.contractAddress) writer.bytes(1, obj.contractAddress, string) if (obj.lifetimeLimit) writer.bytes(2, obj.lifetimeLimit, string) if (obj.withdrawThreshold) writer.bytes(3, obj.withdrawThreshold, string) + if (obj.chainId) writer.bytes(4, obj.chainId, string) return writer.concat(buf, byteOffset) } diff --git a/vega/ERC20Event.d.ts b/vega/ERC20Event.d.ts index 10d7d10..d50f6bf 100644 --- a/vega/ERC20Event.d.ts +++ b/vega/ERC20Event.d.ts @@ -11,6 +11,7 @@ export * from './ERC20Event/decode.js' export type ERC20Event = { index: bigint block: bigint + chainId: string action: | { assetList: ERC20AssetList } | { assetDelist: ERC20AssetDelist } diff --git a/vega/ERC20Event/decode.js b/vega/ERC20Event/decode.js index 57ddb9f..d324c84 100644 --- a/vega/ERC20Event/decode.js +++ b/vega/ERC20Event/decode.js @@ -1,6 +1,6 @@ /// autogenerated by protoc-plugin-js const reader = require('protobuf-codec/decode/reader') -const { uint64, bool } = require('protobuf-codec/decode/types') +const { uint64, string, bool } = require('protobuf-codec/decode/types') const _vega_ERC20AssetList = require('./../ERC20AssetList/decode.js') const _vega_ERC20AssetDelist = require('./../ERC20AssetDelist/decode.js') const _vega_ERC20Deposit = require('./../ERC20Deposit/decode.js') @@ -14,6 +14,7 @@ exports.decode = function decode( ) { let field$index = 0n let field$block = 0n + let field$chainId = '' let field$action = null for (const [field, { data }] of reader(buf, byteOffset, byteLength)) { switch (field) { @@ -25,6 +26,10 @@ exports.decode = function decode( field$block = uint64(data) break + case 3: + field$chainId = string(data) + break + case 1001: field$action = { assetList: _vega_ERC20AssetList.decode(data) } break @@ -56,5 +61,10 @@ exports.decode = function decode( break } } - return { index: field$index, block: field$block, action: field$action } + return { + index: field$index, + block: field$block, + chainId: field$chainId, + action: field$action + } } diff --git a/vega/ERC20Event/encode.js b/vega/ERC20Event/encode.js index 87ca8e4..e6f7d61 100644 --- a/vega/ERC20Event/encode.js +++ b/vega/ERC20Event/encode.js @@ -1,6 +1,6 @@ /// autogenerated by protoc-plugin-js const Writer = require('protobuf-codec/encode/writer') -const { uint64, bool } = require('protobuf-codec/encode/types') +const { uint64, string, bool } = require('protobuf-codec/encode/types') const _vega_ERC20AssetList = require('./../ERC20AssetList/encode.js') const _vega_ERC20AssetDelist = require('./../ERC20AssetDelist/encode.js') const _vega_ERC20Deposit = require('./../ERC20Deposit/encode.js') @@ -12,6 +12,7 @@ exports.encode = function encode(obj = {}, buf, byteOffset = 0) { if (obj.index) writer.varint(1, obj.index, uint64) if (obj.block) writer.varint(2, obj.block, uint64) + if (obj.chainId) writer.bytes(3, obj.chainId, string) if (obj.action?.assetList ?? obj.assetList) writer.bytes( diff --git a/vega/ERC20MultiSigEvent.d.ts b/vega/ERC20MultiSigEvent.d.ts index 55a739a..8302888 100644 --- a/vega/ERC20MultiSigEvent.d.ts +++ b/vega/ERC20MultiSigEvent.d.ts @@ -9,6 +9,7 @@ export * from './ERC20MultiSigEvent/decode.js' export type ERC20MultiSigEvent = { index: bigint block: bigint + chainId: string action: | { signerAdded: ERC20SignerAdded } | { signerRemoved: ERC20SignerRemoved } diff --git a/vega/ERC20MultiSigEvent/decode.js b/vega/ERC20MultiSigEvent/decode.js index f1909dc..a852720 100644 --- a/vega/ERC20MultiSigEvent/decode.js +++ b/vega/ERC20MultiSigEvent/decode.js @@ -1,6 +1,6 @@ /// autogenerated by protoc-plugin-js const reader = require('protobuf-codec/decode/reader') -const { uint64 } = require('protobuf-codec/decode/types') +const { uint64, string } = require('protobuf-codec/decode/types') const _vega_ERC20SignerAdded = require('./../ERC20SignerAdded/decode.js') const _vega_ERC20SignerRemoved = require('./../ERC20SignerRemoved/decode.js') const _vega_ERC20ThresholdSet = require('./../ERC20ThresholdSet/decode.js') @@ -12,6 +12,7 @@ exports.decode = function decode( ) { let field$index = 0n let field$block = 0n + let field$chainId = '' let field$action = null for (const [field, { data }] of reader(buf, byteOffset, byteLength)) { switch (field) { @@ -23,6 +24,10 @@ exports.decode = function decode( field$block = uint64(data) break + case 3: + field$chainId = string(data) + break + case 1001: field$action = { signerAdded: _vega_ERC20SignerAdded.decode(data) } break @@ -36,5 +41,10 @@ exports.decode = function decode( break } } - return { index: field$index, block: field$block, action: field$action } + return { + index: field$index, + block: field$block, + chainId: field$chainId, + action: field$action + } } diff --git a/vega/ERC20MultiSigEvent/encode.js b/vega/ERC20MultiSigEvent/encode.js index 4f629e2..f27b55f 100644 --- a/vega/ERC20MultiSigEvent/encode.js +++ b/vega/ERC20MultiSigEvent/encode.js @@ -1,6 +1,6 @@ /// autogenerated by protoc-plugin-js const Writer = require('protobuf-codec/encode/writer') -const { uint64 } = require('protobuf-codec/encode/types') +const { uint64, string } = require('protobuf-codec/encode/types') const _vega_ERC20SignerAdded = require('./../ERC20SignerAdded/encode.js') const _vega_ERC20SignerRemoved = require('./../ERC20SignerRemoved/encode.js') const _vega_ERC20ThresholdSet = require('./../ERC20ThresholdSet/encode.js') @@ -10,6 +10,7 @@ exports.encode = function encode(obj = {}, buf, byteOffset = 0) { if (obj.index) writer.varint(1, obj.index, uint64) if (obj.block) writer.varint(2, obj.block, uint64) + if (obj.chainId) writer.bytes(3, obj.chainId, string) if (obj.action?.signerAdded ?? obj.signerAdded) writer.bytes( diff --git a/vega/EVMBridgeConfig.d.ts b/vega/EVMBridgeConfig.d.ts new file mode 100644 index 0000000..07c2ab8 --- /dev/null +++ b/vega/EVMBridgeConfig.d.ts @@ -0,0 +1,15 @@ +/// autogenerated by protoc-plugin-js +import type { EthereumContractConfig } from './EthereumContractConfig' + +export * from './EVMBridgeConfig/encode.js' +export * from './EVMBridgeConfig/decode.js' + +export type EVMBridgeConfig = { + networkId: string + chainId: string + collateralBridgeContract: EthereumContractConfig + confirmations: number + multisigControlContract: EthereumContractConfig + blockTime: string + name: string +} diff --git a/vega/EVMBridgeConfig.js b/vega/EVMBridgeConfig.js new file mode 100644 index 0000000..9d756b4 --- /dev/null +++ b/vega/EVMBridgeConfig.js @@ -0,0 +1,6 @@ +/// autogenerated by protoc-plugin-js + +module.exports = { + ...require('./EVMBridgeConfig/encode.js'), + ...require('./EVMBridgeConfig/decode.js') +} diff --git a/vega/EVMBridgeConfig/decode.d.ts b/vega/EVMBridgeConfig/decode.d.ts new file mode 100644 index 0000000..ad195da --- /dev/null +++ b/vega/EVMBridgeConfig/decode.d.ts @@ -0,0 +1,7 @@ +/// autogenerated by protoc-plugin-js +import type { EVMBridgeConfig } from '../EVMBridgeConfig' +export function decode( + buf: Uint8Array, + byteOffset?: number, + byteLength?: number +): EVMBridgeConfig diff --git a/vega/EVMBridgeConfig/decode.js b/vega/EVMBridgeConfig/decode.js new file mode 100644 index 0000000..4d3a7c6 --- /dev/null +++ b/vega/EVMBridgeConfig/decode.js @@ -0,0 +1,60 @@ +/// autogenerated by protoc-plugin-js +const reader = require('protobuf-codec/decode/reader') +const { string, uint32 } = require('protobuf-codec/decode/types') +const _vega_EthereumContractConfig = require('./../EthereumContractConfig/decode.js') + +exports.decode = function decode( + buf, + byteOffset = 0, + byteLength = buf.byteLength +) { + let field$networkId = '' + let field$chainId = '' + let field$collateralBridgeContract = {} + let field$confirmations = 0 + let field$multisigControlContract = {} + let field$blockTime = '' + let field$name = '' + for (const [field, { data }] of reader(buf, byteOffset, byteLength)) { + switch (field) { + case 1: + field$networkId = string(data) + break + + case 2: + field$chainId = string(data) + break + + case 3: + field$collateralBridgeContract = + _vega_EthereumContractConfig.decode(data) + break + + case 4: + field$confirmations = uint32(data) + break + + case 5: + field$multisigControlContract = + _vega_EthereumContractConfig.decode(data) + break + + case 6: + field$blockTime = string(data) + break + + case 7: + field$name = string(data) + break + } + } + return { + networkId: field$networkId, + chainId: field$chainId, + collateralBridgeContract: field$collateralBridgeContract, + confirmations: field$confirmations, + multisigControlContract: field$multisigControlContract, + blockTime: field$blockTime, + name: field$name + } +} diff --git a/vega/EVMBridgeConfig/encode.d.ts b/vega/EVMBridgeConfig/encode.d.ts new file mode 100644 index 0000000..2fda09b --- /dev/null +++ b/vega/EVMBridgeConfig/encode.d.ts @@ -0,0 +1,9 @@ +/// autogenerated by protoc-plugin-js +import type { PartialDeep } from 'type-fest' + +import type { EVMBridgeConfig } from '../EVMBridgeConfig' +export function encode( + obj?: PartialDeep, + buf?: Uint8Array, + byteOffset?: number +): Uint8Array diff --git a/vega/EVMBridgeConfig/encode.js b/vega/EVMBridgeConfig/encode.js new file mode 100644 index 0000000..726b3eb --- /dev/null +++ b/vega/EVMBridgeConfig/encode.js @@ -0,0 +1,30 @@ +/// autogenerated by protoc-plugin-js +const Writer = require('protobuf-codec/encode/writer') +const { string, uint32 } = require('protobuf-codec/encode/types') +const _vega_EthereumContractConfig = require('./../EthereumContractConfig/encode.js') + +exports.encode = function encode(obj = {}, buf, byteOffset = 0) { + const writer = new Writer() + + if (obj.networkId) writer.bytes(1, obj.networkId, string) + if (obj.chainId) writer.bytes(2, obj.chainId, string) + if (obj.collateralBridgeContract) + writer.bytes( + 3, + _vega_EthereumContractConfig.encode(obj.collateralBridgeContract) + ) + if (obj.confirmations) writer.varint(4, obj.confirmations, uint32) + if (obj.multisigControlContract) + writer.bytes( + 5, + _vega_EthereumContractConfig.encode(obj.multisigControlContract) + ) + if (obj.blockTime) writer.bytes(6, obj.blockTime, string) + if (obj.name) writer.bytes(7, obj.name, string) + + return writer.concat(buf, byteOffset) +} + +// export function encodingLength (obj) { +// throw new Error('Unimplemented') +// } diff --git a/vega/EVMBridgeConfigs.d.ts b/vega/EVMBridgeConfigs.d.ts new file mode 100644 index 0000000..686a58c --- /dev/null +++ b/vega/EVMBridgeConfigs.d.ts @@ -0,0 +1,9 @@ +/// autogenerated by protoc-plugin-js +import type { EVMBridgeConfig } from './EVMBridgeConfig' + +export * from './EVMBridgeConfigs/encode.js' +export * from './EVMBridgeConfigs/decode.js' + +export type EVMBridgeConfigs = { + configs: EVMBridgeConfig[] +} diff --git a/vega/EVMBridgeConfigs.js b/vega/EVMBridgeConfigs.js new file mode 100644 index 0000000..ec5eba5 --- /dev/null +++ b/vega/EVMBridgeConfigs.js @@ -0,0 +1,6 @@ +/// autogenerated by protoc-plugin-js + +module.exports = { + ...require('./EVMBridgeConfigs/encode.js'), + ...require('./EVMBridgeConfigs/decode.js') +} diff --git a/vega/EVMBridgeConfigs/decode.d.ts b/vega/EVMBridgeConfigs/decode.d.ts new file mode 100644 index 0000000..7aa51f6 --- /dev/null +++ b/vega/EVMBridgeConfigs/decode.d.ts @@ -0,0 +1,7 @@ +/// autogenerated by protoc-plugin-js +import type { EVMBridgeConfigs } from '../EVMBridgeConfigs' +export function decode( + buf: Uint8Array, + byteOffset?: number, + byteLength?: number +): EVMBridgeConfigs diff --git a/vega/EVMBridgeConfigs/decode.js b/vega/EVMBridgeConfigs/decode.js new file mode 100644 index 0000000..bcf5893 --- /dev/null +++ b/vega/EVMBridgeConfigs/decode.js @@ -0,0 +1,20 @@ +/// autogenerated by protoc-plugin-js +const reader = require('protobuf-codec/decode/reader') + +const _vega_EVMBridgeConfig = require('./../EVMBridgeConfig/decode.js') + +exports.decode = function decode( + buf, + byteOffset = 0, + byteLength = buf.byteLength +) { + const field$configs = [] + for (const [field, { data }] of reader(buf, byteOffset, byteLength)) { + switch (field) { + case 1: + field$configs.push(_vega_EVMBridgeConfig.decode(data)) + break + } + } + return { configs: field$configs } +} diff --git a/vega/EVMBridgeConfigs/encode.d.ts b/vega/EVMBridgeConfigs/encode.d.ts new file mode 100644 index 0000000..69dd3c0 --- /dev/null +++ b/vega/EVMBridgeConfigs/encode.d.ts @@ -0,0 +1,9 @@ +/// autogenerated by protoc-plugin-js +import type { PartialDeep } from 'type-fest' + +import type { EVMBridgeConfigs } from '../EVMBridgeConfigs' +export function encode( + obj?: PartialDeep, + buf?: Uint8Array, + byteOffset?: number +): Uint8Array diff --git a/vega/EVMBridgeConfigs/encode.js b/vega/EVMBridgeConfigs/encode.js new file mode 100644 index 0000000..47a4f0b --- /dev/null +++ b/vega/EVMBridgeConfigs/encode.js @@ -0,0 +1,17 @@ +/// autogenerated by protoc-plugin-js +const Writer = require('protobuf-codec/encode/writer') + +const _vega_EVMBridgeConfig = require('./../EVMBridgeConfig/encode.js') + +exports.encode = function encode(obj = {}, buf, byteOffset = 0) { + const writer = new Writer() + + if (obj.configs?.length) + obj.configs.forEach((v) => writer.bytes(1, _vega_EVMBridgeConfig.encode(v))) + + return writer.concat(buf, byteOffset) +} + +// export function encodingLength (obj) { +// throw new Error('Unimplemented') +// } diff --git a/vega/LiquidationStrategy.d.ts b/vega/LiquidationStrategy.d.ts index e8468ae..cb3dca1 100644 --- a/vega/LiquidationStrategy.d.ts +++ b/vega/LiquidationStrategy.d.ts @@ -8,4 +8,5 @@ export type LiquidationStrategy = { disposalFraction: string fullDisposalSize: bigint maxFractionConsumed: string + disposalSlippageRange: string } diff --git a/vega/LiquidationStrategy/decode.js b/vega/LiquidationStrategy/decode.js index ce733ad..8598a1a 100644 --- a/vega/LiquidationStrategy/decode.js +++ b/vega/LiquidationStrategy/decode.js @@ -11,6 +11,7 @@ exports.decode = function decode( let field$disposalFraction = '' let field$fullDisposalSize = 0n let field$maxFractionConsumed = '' + let field$disposalSlippageRange = '' for (const [field, { data }] of reader(buf, byteOffset, byteLength)) { switch (field) { case 1: @@ -28,12 +29,17 @@ exports.decode = function decode( case 4: field$maxFractionConsumed = string(data) break + + case 5: + field$disposalSlippageRange = string(data) + break } } return { disposalTimeStep: field$disposalTimeStep, disposalFraction: field$disposalFraction, fullDisposalSize: field$fullDisposalSize, - maxFractionConsumed: field$maxFractionConsumed + maxFractionConsumed: field$maxFractionConsumed, + disposalSlippageRange: field$disposalSlippageRange } } diff --git a/vega/LiquidationStrategy/encode.js b/vega/LiquidationStrategy/encode.js index 0acdb2c..8f0e63e 100644 --- a/vega/LiquidationStrategy/encode.js +++ b/vega/LiquidationStrategy/encode.js @@ -9,6 +9,8 @@ exports.encode = function encode(obj = {}, buf, byteOffset = 0) { if (obj.disposalFraction) writer.bytes(2, obj.disposalFraction, string) if (obj.fullDisposalSize) writer.varint(3, obj.fullDisposalSize, uint64) if (obj.maxFractionConsumed) writer.bytes(4, obj.maxFractionConsumed, string) + if (obj.disposalSlippageRange) + writer.bytes(5, obj.disposalSlippageRange, string) return writer.concat(buf, byteOffset) } diff --git a/vega/NewSpotMarketConfiguration.d.ts b/vega/NewSpotMarketConfiguration.d.ts index f82eed4..04cb70f 100644 --- a/vega/NewSpotMarketConfiguration.d.ts +++ b/vega/NewSpotMarketConfiguration.d.ts @@ -12,7 +12,7 @@ export * from './NewSpotMarketConfiguration/decode.js' export type NewSpotMarketConfiguration = { instrument: InstrumentConfiguration - decimalPlaces: bigint + priceDecimalPlaces: bigint metadata: string[] priceMonitoringParameters: PriceMonitoringParameters targetStakeParameters: TargetStakeParameters @@ -20,7 +20,7 @@ export type NewSpotMarketConfiguration = { | { simple: SimpleModelParams } | { logNormal: LogNormalRiskModel } | null - positionDecimalPlaces: bigint + sizeDecimalPlaces: bigint slaParams: LiquiditySLAParameters liquidityFeeSettings: LiquidityFeeSettings tickSize: string diff --git a/vega/NewSpotMarketConfiguration/decode.js b/vega/NewSpotMarketConfiguration/decode.js index c130a9a..ca2fc10 100644 --- a/vega/NewSpotMarketConfiguration/decode.js +++ b/vega/NewSpotMarketConfiguration/decode.js @@ -15,11 +15,11 @@ exports.decode = function decode( byteLength = buf.byteLength ) { let field$instrument = {} - let field$decimalPlaces = 0n + let field$priceDecimalPlaces = 0n const field$metadata = [] let field$priceMonitoringParameters = {} let field$targetStakeParameters = {} - let field$positionDecimalPlaces = 0n + let field$sizeDecimalPlaces = 0n let field$slaParams = {} let field$liquidityFeeSettings = {} let field$tickSize = '' @@ -31,7 +31,7 @@ exports.decode = function decode( break case 2: - field$decimalPlaces = uint64(data) + field$priceDecimalPlaces = uint64(data) break case 3: @@ -58,7 +58,7 @@ exports.decode = function decode( break case 6: - field$positionDecimalPlaces = int64(data) + field$sizeDecimalPlaces = int64(data) break case 7: @@ -76,11 +76,11 @@ exports.decode = function decode( } return { instrument: field$instrument, - decimalPlaces: field$decimalPlaces, + priceDecimalPlaces: field$priceDecimalPlaces, metadata: field$metadata, priceMonitoringParameters: field$priceMonitoringParameters, targetStakeParameters: field$targetStakeParameters, - positionDecimalPlaces: field$positionDecimalPlaces, + sizeDecimalPlaces: field$sizeDecimalPlaces, slaParams: field$slaParams, liquidityFeeSettings: field$liquidityFeeSettings, tickSize: field$tickSize, diff --git a/vega/NewSpotMarketConfiguration/encode.js b/vega/NewSpotMarketConfiguration/encode.js index b3f0548..8b19b23 100644 --- a/vega/NewSpotMarketConfiguration/encode.js +++ b/vega/NewSpotMarketConfiguration/encode.js @@ -14,7 +14,7 @@ exports.encode = function encode(obj = {}, buf, byteOffset = 0) { if (obj.instrument) writer.bytes(1, _vega_InstrumentConfiguration.encode(obj.instrument)) - if (obj.decimalPlaces) writer.varint(2, obj.decimalPlaces, uint64) + if (obj.priceDecimalPlaces) writer.varint(2, obj.priceDecimalPlaces, uint64) if (obj.metadata?.length) obj.metadata.forEach((v) => writer.bytes(3, v, string)) if (obj.priceMonitoringParameters) @@ -27,8 +27,7 @@ exports.encode = function encode(obj = {}, buf, byteOffset = 0) { 5, _vega_TargetStakeParameters.encode(obj.targetStakeParameters) ) - if (obj.positionDecimalPlaces) - writer.varint(6, obj.positionDecimalPlaces, int64) + if (obj.sizeDecimalPlaces) writer.varint(6, obj.sizeDecimalPlaces, int64) if (obj.slaParams) writer.bytes(7, _vega_LiquiditySLAParameters.encode(obj.slaParams)) if (obj.liquidityFeeSettings) diff --git a/vega/ProposalError.d.ts b/vega/ProposalError.d.ts index 9e46f25..c6461c7 100644 --- a/vega/ProposalError.d.ts +++ b/vega/ProposalError.d.ts @@ -55,6 +55,7 @@ export const PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM = 56 export const PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM = 57 export const PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED = 58 export const PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED = 59 +export const PROPOSAL_ERROR_INVALID_SIZE_DECIMAL_PLACES = 60 export type Values = | 0 @@ -111,6 +112,7 @@ export type Values = | 57 | 58 | 59 + | 60 export type Names = | 'PROPOSAL_ERROR_UNSPECIFIED' | 'PROPOSAL_ERROR_CLOSE_TIME_TOO_SOON' @@ -166,6 +168,7 @@ export type Names = | 'PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM' | 'PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED' | 'PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED' + | 'PROPOSAL_ERROR_INVALID_SIZE_DECIMAL_PLACES' export const enum ProposalError { PROPOSAL_ERROR_UNSPECIFIED = 0, @@ -221,7 +224,8 @@ export const enum ProposalError { PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM = 56, PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM = 57, PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED = 58, - PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED = 59 + PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED = 59, + PROPOSAL_ERROR_INVALID_SIZE_DECIMAL_PLACES = 60 } declare const enumValues: Map diff --git a/vega/ProposalError.js b/vega/ProposalError.js index b72152a..a073271 100644 --- a/vega/ProposalError.js +++ b/vega/ProposalError.js @@ -57,6 +57,7 @@ const PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM = 56 const PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM = 57 const PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED = 58 const PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED = 59 +const PROPOSAL_ERROR_INVALID_SIZE_DECIMAL_PLACES = 60 const enumValues = new Map([ [0, 'PROPOSAL_ERROR_UNSPECIFIED'], @@ -112,7 +113,8 @@ const enumValues = new Map([ [56, 'PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM'], [57, 'PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM'], [58, 'PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED'], - [59, 'PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED'] + [59, 'PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED'], + [60, 'PROPOSAL_ERROR_INVALID_SIZE_DECIMAL_PLACES'] ]) const enumNames = new Map([ ['PROPOSAL_ERROR_UNSPECIFIED', 0], @@ -168,7 +170,8 @@ const enumNames = new Map([ ['PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM', 56], ['PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM', 57], ['PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED', 58], - ['PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED', 59] + ['PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED', 59], + ['PROPOSAL_ERROR_INVALID_SIZE_DECIMAL_PLACES', 60] ]) function encode(value, buf, byteOffset = 0) { @@ -189,7 +192,7 @@ function encodingLength(value) { if (typeof value === 'string') return encodingLength(parse(value)) assert(value != null, 'Invalid ProposalError value (' + value + ')') - if (0 <= value && value <= 59) return 1 + if (0 <= value && value <= 60) return 1 // enumerable max value in case of unknown value return 5 @@ -270,5 +273,6 @@ module.exports = { PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM, PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM, PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED, - PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED + PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED, + PROPOSAL_ERROR_INVALID_SIZE_DECIMAL_PLACES } diff --git a/vega/Spot.d.ts b/vega/Spot.d.ts index 2db182f..1c22d13 100644 --- a/vega/Spot.d.ts +++ b/vega/Spot.d.ts @@ -6,5 +6,4 @@ export * from './Spot/decode.js' export type Spot = { baseAsset: string quoteAsset: string - name: string } diff --git a/vega/Spot/decode.js b/vega/Spot/decode.js index 7d0e0d6..0f4ca14 100644 --- a/vega/Spot/decode.js +++ b/vega/Spot/decode.js @@ -9,7 +9,6 @@ exports.decode = function decode( ) { let field$baseAsset = '' let field$quoteAsset = '' - let field$name = '' for (const [field, { data }] of reader(buf, byteOffset, byteLength)) { switch (field) { case 1: @@ -19,15 +18,7 @@ exports.decode = function decode( case 2: field$quoteAsset = string(data) break - - case 3: - field$name = string(data) - break } } - return { - baseAsset: field$baseAsset, - quoteAsset: field$quoteAsset, - name: field$name - } + return { baseAsset: field$baseAsset, quoteAsset: field$quoteAsset } } diff --git a/vega/Spot/encode.js b/vega/Spot/encode.js index 5a55477..b4c67fd 100644 --- a/vega/Spot/encode.js +++ b/vega/Spot/encode.js @@ -7,7 +7,6 @@ exports.encode = function encode(obj = {}, buf, byteOffset = 0) { if (obj.baseAsset) writer.bytes(1, obj.baseAsset, string) if (obj.quoteAsset) writer.bytes(2, obj.quoteAsset, string) - if (obj.name) writer.bytes(3, obj.name, string) return writer.concat(buf, byteOffset) } diff --git a/vega/SpotProduct.d.ts b/vega/SpotProduct.d.ts index a57d807..31eaf7f 100644 --- a/vega/SpotProduct.d.ts +++ b/vega/SpotProduct.d.ts @@ -6,5 +6,4 @@ export * from './SpotProduct/decode.js' export type SpotProduct = { baseAsset: string quoteAsset: string - name: string } diff --git a/vega/SpotProduct/decode.js b/vega/SpotProduct/decode.js index 7d0e0d6..0f4ca14 100644 --- a/vega/SpotProduct/decode.js +++ b/vega/SpotProduct/decode.js @@ -9,7 +9,6 @@ exports.decode = function decode( ) { let field$baseAsset = '' let field$quoteAsset = '' - let field$name = '' for (const [field, { data }] of reader(buf, byteOffset, byteLength)) { switch (field) { case 1: @@ -19,15 +18,7 @@ exports.decode = function decode( case 2: field$quoteAsset = string(data) break - - case 3: - field$name = string(data) - break } } - return { - baseAsset: field$baseAsset, - quoteAsset: field$quoteAsset, - name: field$name - } + return { baseAsset: field$baseAsset, quoteAsset: field$quoteAsset } } diff --git a/vega/SpotProduct/encode.js b/vega/SpotProduct/encode.js index 5a55477..b4c67fd 100644 --- a/vega/SpotProduct/encode.js +++ b/vega/SpotProduct/encode.js @@ -7,7 +7,6 @@ exports.encode = function encode(obj = {}, buf, byteOffset = 0) { if (obj.baseAsset) writer.bytes(1, obj.baseAsset, string) if (obj.quoteAsset) writer.bytes(2, obj.quoteAsset, string) - if (obj.name) writer.bytes(3, obj.name, string) return writer.concat(buf, byteOffset) } diff --git a/vega/StopOrder/RejectionReason.d.ts b/vega/StopOrder/RejectionReason.d.ts index 8973da5..daf6eff 100644 --- a/vega/StopOrder/RejectionReason.d.ts +++ b/vega/StopOrder/RejectionReason.d.ts @@ -11,8 +11,9 @@ export const REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION = 6 export const REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID = 7 export const REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION = 8 export const REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES = 9 +export const REJECTION_REASON_STOP_ORDER_SIZE_OVERRIDE_UNSUPPORTED_FOR_SPOT = 10 -export type Values = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 +export type Values = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 export type Names = | 'REJECTION_REASON_UNSPECIFIED' | 'REJECTION_REASON_TRADING_NOT_ALLOWED' @@ -24,6 +25,7 @@ export type Names = | 'REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID' | 'REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION' | 'REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES' + | 'REJECTION_REASON_STOP_ORDER_SIZE_OVERRIDE_UNSUPPORTED_FOR_SPOT' export const enum RejectionReason { REJECTION_REASON_UNSPECIFIED = 0, @@ -35,7 +37,8 @@ export const enum RejectionReason { REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION = 6, REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID = 7, REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION = 8, - REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES = 9 + REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES = 9, + REJECTION_REASON_STOP_ORDER_SIZE_OVERRIDE_UNSUPPORTED_FOR_SPOT = 10 } declare const enumValues: Map diff --git a/vega/StopOrder/RejectionReason.js b/vega/StopOrder/RejectionReason.js index d29285c..dd858a6 100644 --- a/vega/StopOrder/RejectionReason.js +++ b/vega/StopOrder/RejectionReason.js @@ -13,6 +13,7 @@ const REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION = 6 const REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID = 7 const REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION = 8 const REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES = 9 +const REJECTION_REASON_STOP_ORDER_SIZE_OVERRIDE_UNSUPPORTED_FOR_SPOT = 10 const enumValues = new Map([ [0, 'REJECTION_REASON_UNSPECIFIED'], @@ -24,7 +25,8 @@ const enumValues = new Map([ [6, 'REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION'], [7, 'REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID'], [8, 'REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION'], - [9, 'REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES'] + [9, 'REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES'], + [10, 'REJECTION_REASON_STOP_ORDER_SIZE_OVERRIDE_UNSUPPORTED_FOR_SPOT'] ]) const enumNames = new Map([ ['REJECTION_REASON_UNSPECIFIED', 0], @@ -36,7 +38,8 @@ const enumNames = new Map([ ['REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION', 6], ['REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID', 7], ['REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION', 8], - ['REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES', 9] + ['REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES', 9], + ['REJECTION_REASON_STOP_ORDER_SIZE_OVERRIDE_UNSUPPORTED_FOR_SPOT', 10] ]) function encode(value, buf, byteOffset = 0) { @@ -57,7 +60,7 @@ function encodingLength(value) { if (typeof value === 'string') return encodingLength(parse(value)) assert(value != null, 'Invalid RejectionReason value (' + value + ')') - if (0 <= value && value <= 9) return 1 + if (0 <= value && value <= 10) return 1 // enumerable max value in case of unknown value return 5 @@ -94,5 +97,6 @@ module.exports = { REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION, REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID, REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION, - REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES + REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES, + REJECTION_REASON_STOP_ORDER_SIZE_OVERRIDE_UNSUPPORTED_FOR_SPOT } diff --git a/vega/UpdateSpotInstrumentConfiguration.d.ts b/vega/UpdateSpotInstrumentConfiguration.d.ts new file mode 100644 index 0000000..0db5e87 --- /dev/null +++ b/vega/UpdateSpotInstrumentConfiguration.d.ts @@ -0,0 +1,9 @@ +/// autogenerated by protoc-plugin-js + +export * from './UpdateSpotInstrumentConfiguration/encode.js' +export * from './UpdateSpotInstrumentConfiguration/decode.js' + +export type UpdateSpotInstrumentConfiguration = { + code: string + name: string +} diff --git a/vega/UpdateSpotInstrumentConfiguration.js b/vega/UpdateSpotInstrumentConfiguration.js new file mode 100644 index 0000000..f5e7a8f --- /dev/null +++ b/vega/UpdateSpotInstrumentConfiguration.js @@ -0,0 +1,6 @@ +/// autogenerated by protoc-plugin-js + +module.exports = { + ...require('./UpdateSpotInstrumentConfiguration/encode.js'), + ...require('./UpdateSpotInstrumentConfiguration/decode.js') +} diff --git a/vega/UpdateSpotInstrumentConfiguration/decode.d.ts b/vega/UpdateSpotInstrumentConfiguration/decode.d.ts new file mode 100644 index 0000000..f3ac4ae --- /dev/null +++ b/vega/UpdateSpotInstrumentConfiguration/decode.d.ts @@ -0,0 +1,7 @@ +/// autogenerated by protoc-plugin-js +import type { UpdateSpotInstrumentConfiguration } from '../UpdateSpotInstrumentConfiguration' +export function decode( + buf: Uint8Array, + byteOffset?: number, + byteLength?: number +): UpdateSpotInstrumentConfiguration diff --git a/vega/UpdateSpotInstrumentConfiguration/decode.js b/vega/UpdateSpotInstrumentConfiguration/decode.js new file mode 100644 index 0000000..fd2aed9 --- /dev/null +++ b/vega/UpdateSpotInstrumentConfiguration/decode.js @@ -0,0 +1,24 @@ +/// autogenerated by protoc-plugin-js +const reader = require('protobuf-codec/decode/reader') +const { string } = require('protobuf-codec/decode/types') + +exports.decode = function decode( + buf, + byteOffset = 0, + byteLength = buf.byteLength +) { + let field$code = '' + let field$name = '' + for (const [field, { data }] of reader(buf, byteOffset, byteLength)) { + switch (field) { + case 1: + field$code = string(data) + break + + case 2: + field$name = string(data) + break + } + } + return { code: field$code, name: field$name } +} diff --git a/vega/UpdateSpotInstrumentConfiguration/encode.d.ts b/vega/UpdateSpotInstrumentConfiguration/encode.d.ts new file mode 100644 index 0000000..d810b23 --- /dev/null +++ b/vega/UpdateSpotInstrumentConfiguration/encode.d.ts @@ -0,0 +1,9 @@ +/// autogenerated by protoc-plugin-js +import type { PartialDeep } from 'type-fest' + +import type { UpdateSpotInstrumentConfiguration } from '../UpdateSpotInstrumentConfiguration' +export function encode( + obj?: PartialDeep, + buf?: Uint8Array, + byteOffset?: number +): Uint8Array diff --git a/vega/UpdateSpotInstrumentConfiguration/encode.js b/vega/UpdateSpotInstrumentConfiguration/encode.js new file mode 100644 index 0000000..e899782 --- /dev/null +++ b/vega/UpdateSpotInstrumentConfiguration/encode.js @@ -0,0 +1,16 @@ +/// autogenerated by protoc-plugin-js +const Writer = require('protobuf-codec/encode/writer') +const { string } = require('protobuf-codec/encode/types') + +exports.encode = function encode(obj = {}, buf, byteOffset = 0) { + const writer = new Writer() + + if (obj.code) writer.bytes(1, obj.code, string) + if (obj.name) writer.bytes(2, obj.name, string) + + return writer.concat(buf, byteOffset) +} + +// export function encodingLength (obj) { +// throw new Error('Unimplemented') +// } diff --git a/vega/UpdateSpotMarketConfiguration.d.ts b/vega/UpdateSpotMarketConfiguration.d.ts index 792c3be..40fb4a5 100644 --- a/vega/UpdateSpotMarketConfiguration.d.ts +++ b/vega/UpdateSpotMarketConfiguration.d.ts @@ -5,6 +5,7 @@ import type { SimpleModelParams } from './SimpleModelParams' import type { LogNormalRiskModel } from './LogNormalRiskModel' import type { LiquiditySLAParameters } from './LiquiditySLAParameters' import type { LiquidityFeeSettings } from './LiquidityFeeSettings' +import type { UpdateSpotInstrumentConfiguration } from './UpdateSpotInstrumentConfiguration' export * from './UpdateSpotMarketConfiguration/encode.js' export * from './UpdateSpotMarketConfiguration/decode.js' @@ -20,4 +21,5 @@ export type UpdateSpotMarketConfiguration = { slaParams: LiquiditySLAParameters liquidityFeeSettings: LiquidityFeeSettings tickSize: string + instrument: UpdateSpotInstrumentConfiguration } diff --git a/vega/UpdateSpotMarketConfiguration/decode.js b/vega/UpdateSpotMarketConfiguration/decode.js index eed9c7c..971190f 100644 --- a/vega/UpdateSpotMarketConfiguration/decode.js +++ b/vega/UpdateSpotMarketConfiguration/decode.js @@ -7,6 +7,7 @@ const _vega_SimpleModelParams = require('./../SimpleModelParams/decode.js') const _vega_LogNormalRiskModel = require('./../LogNormalRiskModel/decode.js') const _vega_LiquiditySLAParameters = require('./../LiquiditySLAParameters/decode.js') const _vega_LiquidityFeeSettings = require('./../LiquidityFeeSettings/decode.js') +const _vega_UpdateSpotInstrumentConfiguration = require('./../UpdateSpotInstrumentConfiguration/decode.js') exports.decode = function decode( buf, @@ -19,6 +20,7 @@ exports.decode = function decode( let field$slaParams = {} let field$liquidityFeeSettings = {} let field$tickSize = '' + let field$instrument = {} let field$riskParameters = null for (const [field, { data }] of reader(buf, byteOffset, byteLength)) { switch (field) { @@ -56,6 +58,10 @@ exports.decode = function decode( case 6: field$tickSize = string(data) break + + case 7: + field$instrument = _vega_UpdateSpotInstrumentConfiguration.decode(data) + break } } return { @@ -65,6 +71,7 @@ exports.decode = function decode( slaParams: field$slaParams, liquidityFeeSettings: field$liquidityFeeSettings, tickSize: field$tickSize, + instrument: field$instrument, riskParameters: field$riskParameters } } diff --git a/vega/UpdateSpotMarketConfiguration/encode.js b/vega/UpdateSpotMarketConfiguration/encode.js index b2977bb..e3d1e04 100644 --- a/vega/UpdateSpotMarketConfiguration/encode.js +++ b/vega/UpdateSpotMarketConfiguration/encode.js @@ -7,6 +7,7 @@ const _vega_SimpleModelParams = require('./../SimpleModelParams/encode.js') const _vega_LogNormalRiskModel = require('./../LogNormalRiskModel/encode.js') const _vega_LiquiditySLAParameters = require('./../LiquiditySLAParameters/encode.js') const _vega_LiquidityFeeSettings = require('./../LiquidityFeeSettings/encode.js') +const _vega_UpdateSpotInstrumentConfiguration = require('./../UpdateSpotInstrumentConfiguration/encode.js') exports.encode = function encode(obj = {}, buf, byteOffset = 0) { const writer = new Writer() @@ -28,6 +29,11 @@ exports.encode = function encode(obj = {}, buf, byteOffset = 0) { if (obj.liquidityFeeSettings) writer.bytes(5, _vega_LiquidityFeeSettings.encode(obj.liquidityFeeSettings)) if (obj.tickSize) writer.bytes(6, obj.tickSize, string) + if (obj.instrument) + writer.bytes( + 7, + _vega_UpdateSpotInstrumentConfiguration.encode(obj.instrument) + ) if (obj.riskParameters?.simple ?? obj.simple) writer.bytes( diff --git a/vega/commands/v1/IssueSignatures.d.ts b/vega/commands/v1/IssueSignatures.d.ts index e32ba1e..adcd8c7 100644 --- a/vega/commands/v1/IssueSignatures.d.ts +++ b/vega/commands/v1/IssueSignatures.d.ts @@ -8,4 +8,5 @@ export type IssueSignatures = { submitter: string kind: NodeSignatureKind validatorNodeId: string + chainId: string } diff --git a/vega/commands/v1/IssueSignatures/decode.js b/vega/commands/v1/IssueSignatures/decode.js index 880ac48..d25116d 100644 --- a/vega/commands/v1/IssueSignatures/decode.js +++ b/vega/commands/v1/IssueSignatures/decode.js @@ -11,6 +11,7 @@ exports.decode = function decode( let field$submitter = '' let field$kind = _vega_commands_v1_NodeSignatureKind.decode(0) let field$validatorNodeId = '' + let field$chainId = '' for (const [field, { data }] of reader(buf, byteOffset, byteLength)) { switch (field) { case 1: @@ -24,11 +25,16 @@ exports.decode = function decode( case 3: field$validatorNodeId = string(data) break + + case 4: + field$chainId = string(data) + break } } return { submitter: field$submitter, kind: field$kind, - validatorNodeId: field$validatorNodeId + validatorNodeId: field$validatorNodeId, + chainId: field$chainId } } diff --git a/vega/commands/v1/IssueSignatures/encode.js b/vega/commands/v1/IssueSignatures/encode.js index 8b61030..fef3f1a 100644 --- a/vega/commands/v1/IssueSignatures/encode.js +++ b/vega/commands/v1/IssueSignatures/encode.js @@ -9,6 +9,7 @@ exports.encode = function encode(obj = {}, buf, byteOffset = 0) { if (obj.submitter) writer.bytes(1, obj.submitter, string) if (obj.kind) writer.varint(2, obj.kind, _vega_commands_v1_NodeSignatureKind) if (obj.validatorNodeId) writer.bytes(3, obj.validatorNodeId, string) + if (obj.chainId) writer.bytes(4, obj.chainId, string) return writer.concat(buf, byteOffset) } diff --git a/vendor/vega b/vendor/vega index e22c5c1..39c5d8d 160000 --- a/vendor/vega +++ b/vendor/vega @@ -1 +1 @@ -Subproject commit e22c5c1b2b05e53e5d163d5f570258a980a9426b +Subproject commit 39c5d8df7658e089520a0ef3f96c85ae12b93dbb