New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dydxprotocol/v4-proto

Package Overview
Dependencies
Maintainers
3
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dydxprotocol/v4-proto - npm Package Compare versions

Comparing version 0.3.6 to 1.0.0-rc.0

5

package.json
{
"name": "@dydxprotocol/v4-proto",
"version": "0.3.6",
"version": "1.0.0-rc.0",
"access": "public",
"description": "Protos for dYdX v4 protocol",

@@ -26,3 +27,3 @@ "author": "dYdX Trading Inc.",

"publishConfig": {
"access": "restricted"
"access": "public"
},

@@ -29,0 +30,0 @@ "repository": {

18

src/codegen/dydxprotocol/assets/asset.ts

@@ -1,3 +0,3 @@

import { Long, DeepPartial } from "../../helpers";
import * as _m0 from "protobufjs/minimal";
import { DeepPartial } from "../../helpers";
/** Asset defines a single exchangable asset. */

@@ -51,5 +51,2 @@

atomicResolution: number;
/** The total positive balance across the exchange. */
longInterest: Long;
}

@@ -66,3 +63,2 @@ /** Asset defines a single exchangable asset. */

atomic_resolution: number;
long_interest: Long;
}

@@ -78,4 +74,3 @@

marketId: 0,
atomicResolution: 0,
longInterest: Long.UZERO
atomicResolution: 0
};

@@ -114,6 +109,2 @@ }

if (!message.longInterest.isZero()) {
writer.uint32(64).uint64(message.longInterest);
}
return writer;

@@ -159,6 +150,2 @@ },

case 8:
message.longInterest = (reader.uint64() as Long);
break;
default:

@@ -182,3 +169,2 @@ reader.skipType(tag & 7);

message.atomicResolution = object.atomicResolution ?? 0;
message.longInterest = object.longInterest !== undefined && object.longInterest !== null ? Long.fromValue(object.longInterest) : Long.UZERO;
return message;

@@ -185,0 +171,0 @@ }

@@ -12,8 +12,2 @@ import { Duration, DurationSDKType } from "../../google/protobuf/duration";

durations: Duration[];
/**
* Grace-period duration when validating `MsgIsDelayedBlock` messages. Must be
* positive.
*/
clockDriftGracePeriodDuration?: Duration;
}

@@ -24,3 +18,2 @@ /** DowntimeParams defines the parameters for downtime. */

durations: DurationSDKType[];
clock_drift_grace_period_duration?: DurationSDKType;
}

@@ -30,4 +23,3 @@

return {
durations: [],
clockDriftGracePeriodDuration: undefined
durations: []
};

@@ -42,6 +34,2 @@ }

if (message.clockDriftGracePeriodDuration !== undefined) {
Duration.encode(message.clockDriftGracePeriodDuration, writer.uint32(18).fork()).ldelim();
}
return writer;

@@ -63,6 +51,2 @@ },

case 2:
message.clockDriftGracePeriodDuration = Duration.decode(reader, reader.uint32());
break;
default:

@@ -80,3 +64,2 @@ reader.skipType(tag & 7);

message.durations = object.durations?.map(e => Duration.fromPartial(e)) || [];
message.clockDriftGracePeriodDuration = object.clockDriftGracePeriodDuration !== undefined && object.clockDriftGracePeriodDuration !== null ? Duration.fromPartial(object.clockDriftGracePeriodDuration) : undefined;
return message;

@@ -83,0 +66,0 @@ }

import { Rpc } from "../../helpers";
import * as _m0 from "protobufjs/minimal";
import { MsgUpdateDowntimeParams, MsgUpdateDowntimeParamsResponse, MsgIsDelayedBlock, MsgIsDelayedBlockResponse } from "./tx";
import { MsgUpdateDowntimeParams, MsgUpdateDowntimeParamsResponse } from "./tx";
/** Msg defines the Msg service. */

@@ -9,8 +9,2 @@

updateDowntimeParams(request: MsgUpdateDowntimeParams): Promise<MsgUpdateDowntimeParamsResponse>;
/**
* IsDelayedBlock indicates a significant difference between wall time and the
* time of the proposed block.
*/
isDelayedBlock(request: MsgIsDelayedBlock): Promise<MsgIsDelayedBlockResponse>;
}

@@ -23,3 +17,2 @@ export class MsgClientImpl implements Msg {

this.updateDowntimeParams = this.updateDowntimeParams.bind(this);
this.isDelayedBlock = this.isDelayedBlock.bind(this);
}

@@ -33,8 +26,2 @@

isDelayedBlock(request: MsgIsDelayedBlock): Promise<MsgIsDelayedBlockResponse> {
const data = MsgIsDelayedBlock.encode(request).finish();
const promise = this.rpc.request("dydxprotocol.blocktime.Msg", "IsDelayedBlock", data);
return promise.then(data => MsgIsDelayedBlockResponse.decode(new _m0.Reader(data)));
}
}
import { DowntimeParams, DowntimeParamsSDKType } from "./params";
import { Duration, DurationSDKType } from "../../google/protobuf/duration";
import * as _m0 from "protobufjs/minimal";

@@ -31,23 +30,3 @@ import { DeepPartial } from "../../helpers";

export interface MsgUpdateDowntimeParamsResponseSDKType {}
/** MsgIsDelayedBlock is the Msg/IsDelayedBlock request type. */
export interface MsgIsDelayedBlock {
/**
* The duration that the block is delayed by.
* This value could possibly be negative in rare cases.
*/
delayDuration?: Duration;
}
/** MsgIsDelayedBlock is the Msg/IsDelayedBlock request type. */
export interface MsgIsDelayedBlockSDKType {
delay_duration?: DurationSDKType;
}
/** MsgIsDelayedBlock is the Msg/IsDelayedBlock response type. */
export interface MsgIsDelayedBlockResponse {}
/** MsgIsDelayedBlock is the Msg/IsDelayedBlock response type. */
export interface MsgIsDelayedBlockResponseSDKType {}
function createBaseMsgUpdateDowntimeParams(): MsgUpdateDowntimeParams {

@@ -140,81 +119,2 @@ return {

};
function createBaseMsgIsDelayedBlock(): MsgIsDelayedBlock {
return {
delayDuration: undefined
};
}
export const MsgIsDelayedBlock = {
encode(message: MsgIsDelayedBlock, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.delayDuration !== undefined) {
Duration.encode(message.delayDuration, writer.uint32(10).fork()).ldelim();
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): MsgIsDelayedBlock {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgIsDelayedBlock();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.delayDuration = Duration.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromPartial(object: DeepPartial<MsgIsDelayedBlock>): MsgIsDelayedBlock {
const message = createBaseMsgIsDelayedBlock();
message.delayDuration = object.delayDuration !== undefined && object.delayDuration !== null ? Duration.fromPartial(object.delayDuration) : undefined;
return message;
}
};
function createBaseMsgIsDelayedBlockResponse(): MsgIsDelayedBlockResponse {
return {};
}
export const MsgIsDelayedBlockResponse = {
encode(_: MsgIsDelayedBlockResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): MsgIsDelayedBlockResponse {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgIsDelayedBlockResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromPartial(_: DeepPartial<MsgIsDelayedBlockResponse>): MsgIsDelayedBlockResponse {
const message = createBaseMsgIsDelayedBlockResponse();
return message;
}
};

@@ -39,3 +39,3 @@ import { Duration, DurationSDKType } from "../../google/protobuf/duration";

/**
* The minimum amount of nanoseconds to wait between a finalized bridge and
* The minimum duration to wait between a finalized bridge and
* proposing it. This allows other validators to have enough time to

@@ -42,0 +42,0 @@ * also recognize its occurence. Therefore the bridge daemon should

@@ -5,3 +5,3 @@ import { EventParams, EventParamsSDKType, ProposeParams, ProposeParamsSDKType, SafetyParams, SafetyParamsSDKType } from "./params";

import * as _m0 from "protobufjs/minimal";
import { DeepPartial, Long } from "../../helpers";
import { DeepPartial } from "../../helpers";
/** QueryEventParamsRequest is a request type for the EventParams RPC method. */

@@ -161,3 +161,3 @@

message?: MsgCompleteBridge;
blockHeight: Long;
blockHeight: number;
}

@@ -172,3 +172,3 @@ /**

message?: MsgCompleteBridgeSDKType;
block_height: Long;
block_height: number;
}

@@ -664,3 +664,3 @@

message: undefined,
blockHeight: Long.ZERO
blockHeight: 0
};

@@ -675,4 +675,4 @@ }

if (!message.blockHeight.isZero()) {
writer.uint32(16).int64(message.blockHeight);
if (message.blockHeight !== 0) {
writer.uint32(16).uint32(message.blockHeight);
}

@@ -697,3 +697,3 @@

case 2:
message.blockHeight = (reader.int64() as Long);
message.blockHeight = reader.uint32();
break;

@@ -713,3 +713,3 @@

message.message = object.message !== undefined && object.message !== null ? MsgCompleteBridge.fromPartial(object.message) : undefined;
message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null ? Long.fromValue(object.blockHeight) : Long.ZERO;
message.blockHeight = object.blockHeight ?? 0;
return message;

@@ -716,0 +716,0 @@ }

@@ -8,3 +8,3 @@ import * as _m0 from "protobufjs/minimal";

* How many short term order attempts (successful and failed) are allowed for
* a subaccount per N blocks. Note that the rate limits are applied
* an account per N blocks. Note that the rate limits are applied
* in an AND fashion such that an order placement must pass all rate limit

@@ -17,4 +17,4 @@ * configurations.

/**
* How many stateful order attempts (successful and failed) are allowed for a
* subaccount per N blocks. Note that the rate limits are applied
* How many stateful order attempts (successful and failed) are allowed for
* an account per N blocks. Note that the rate limits are applied
* in an AND fashion such that an order placement must pass all rate limit

@@ -21,0 +21,0 @@ * configurations.

@@ -1,3 +0,3 @@

import { Long, DeepPartial } from "../../helpers";
import * as _m0 from "protobufjs/minimal";
import { DeepPartial, Long } from "../../helpers";
/** LiquidationsConfig stores all configurable fields related to liquidations. */

@@ -7,13 +7,5 @@

/**
* The maximum number of quote quantums (inclusive) that the insurance fund
* can have for deleverages to be enabled. This is typically some non-zero
* value since it is difficult to fully-drain the insurance fund (to
* zero without rounding error).
*/
maxInsuranceFundQuantumsForDeleveraging: Long;
/**
* The maximum liquidation fee (in parts-per-million). This fee goes
* 100% to the insurance fund.
*/
maxLiquidationFeePpm: number;

@@ -42,3 +34,2 @@ /**

export interface LiquidationsConfigSDKType {
max_insurance_fund_quantums_for_deleveraging: Long;
max_liquidation_fee_ppm: number;

@@ -133,3 +124,2 @@ position_block_limits?: PositionBlockLimitsSDKType;

return {
maxInsuranceFundQuantumsForDeleveraging: Long.UZERO,
maxLiquidationFeePpm: 0,

@@ -144,20 +134,16 @@ positionBlockLimits: undefined,

encode(message: LiquidationsConfig, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (!message.maxInsuranceFundQuantumsForDeleveraging.isZero()) {
writer.uint32(8).uint64(message.maxInsuranceFundQuantumsForDeleveraging);
}
if (message.maxLiquidationFeePpm !== 0) {
writer.uint32(16).uint32(message.maxLiquidationFeePpm);
writer.uint32(8).uint32(message.maxLiquidationFeePpm);
}
if (message.positionBlockLimits !== undefined) {
PositionBlockLimits.encode(message.positionBlockLimits, writer.uint32(26).fork()).ldelim();
PositionBlockLimits.encode(message.positionBlockLimits, writer.uint32(18).fork()).ldelim();
}
if (message.subaccountBlockLimits !== undefined) {
SubaccountBlockLimits.encode(message.subaccountBlockLimits, writer.uint32(34).fork()).ldelim();
SubaccountBlockLimits.encode(message.subaccountBlockLimits, writer.uint32(26).fork()).ldelim();
}
if (message.fillablePriceConfig !== undefined) {
FillablePriceConfig.encode(message.fillablePriceConfig, writer.uint32(42).fork()).ldelim();
FillablePriceConfig.encode(message.fillablePriceConfig, writer.uint32(34).fork()).ldelim();
}

@@ -178,18 +164,14 @@

case 1:
message.maxInsuranceFundQuantumsForDeleveraging = (reader.uint64() as Long);
message.maxLiquidationFeePpm = reader.uint32();
break;
case 2:
message.maxLiquidationFeePpm = reader.uint32();
message.positionBlockLimits = PositionBlockLimits.decode(reader, reader.uint32());
break;
case 3:
message.positionBlockLimits = PositionBlockLimits.decode(reader, reader.uint32());
message.subaccountBlockLimits = SubaccountBlockLimits.decode(reader, reader.uint32());
break;
case 4:
message.subaccountBlockLimits = SubaccountBlockLimits.decode(reader, reader.uint32());
break;
case 5:
message.fillablePriceConfig = FillablePriceConfig.decode(reader, reader.uint32());

@@ -209,3 +191,2 @@ break;

const message = createBaseLiquidationsConfig();
message.maxInsuranceFundQuantumsForDeleveraging = object.maxInsuranceFundQuantumsForDeleveraging !== undefined && object.maxInsuranceFundQuantumsForDeleveraging !== null ? Long.fromValue(object.maxInsuranceFundQuantumsForDeleveraging) : Long.UZERO;
message.maxLiquidationFeePpm = object.maxLiquidationFeePpm ?? 0;

@@ -212,0 +193,0 @@ message.positionBlockLimits = object.positionBlockLimits !== undefined && object.positionBlockLimits !== null ? PositionBlockLimits.fromPartial(object.positionBlockLimits) : undefined;

import { Any, AnySDKType } from "../../google/protobuf/any";
import { Long, DeepPartial } from "../../helpers";
import * as _m0 from "protobufjs/minimal";
import { DeepPartial } from "../../helpers";
/** DelayedMessage is a message that is delayed until a certain block height. */

@@ -14,3 +14,3 @@

blockHeight: Long;
blockHeight: number;
}

@@ -22,3 +22,3 @@ /** DelayedMessage is a message that is delayed until a certain block height. */

msg?: AnySDKType;
block_height: Long;
block_height: number;
}

@@ -30,3 +30,3 @@

msg: undefined,
blockHeight: Long.ZERO
blockHeight: 0
};

@@ -45,4 +45,4 @@ }

if (!message.blockHeight.isZero()) {
writer.uint32(24).sint64(message.blockHeight);
if (message.blockHeight !== 0) {
writer.uint32(24).uint32(message.blockHeight);
}

@@ -71,3 +71,3 @@

case 3:
message.blockHeight = (reader.sint64() as Long);
message.blockHeight = reader.uint32();
break;

@@ -88,3 +88,3 @@

message.msg = object.msg !== undefined && object.msg !== null ? Any.fromPartial(object.msg) : undefined;
message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null ? Long.fromValue(object.blockHeight) : Long.ZERO;
message.blockHeight = object.blockHeight ?? 0;
return message;

@@ -91,0 +91,0 @@ }

@@ -7,11 +7,7 @@ import { DelayedMessage, DelayedMessageSDKType } from "./delayed_message";

export interface GenesisState {
/** delayed_messages is a list of delayed messages. */
delayedMessages: DelayedMessage[];
/**
* num_messages is the number of messages that have been created. It denotes
* the id to be assigned to the next message. This number may not match the
* number of messages currently stored on the chain because messages are
* deleted from the chain after they are executed.
*/
/** next_delayed_message_id is the id to be assigned to next delayed message. */
numMessages: number;
nextDelayedMessageId: number;
}

@@ -22,3 +18,3 @@ /** GenesisState defines the delaymsg module's genesis state. */

delayed_messages: DelayedMessageSDKType[];
num_messages: number;
next_delayed_message_id: number;
}

@@ -29,3 +25,3 @@

delayedMessages: [],
numMessages: 0
nextDelayedMessageId: 0
};

@@ -40,4 +36,4 @@ }

if (message.numMessages !== 0) {
writer.uint32(16).uint32(message.numMessages);
if (message.nextDelayedMessageId !== 0) {
writer.uint32(16).uint32(message.nextDelayedMessageId);
}

@@ -62,3 +58,3 @@

case 2:
message.numMessages = reader.uint32();
message.nextDelayedMessageId = reader.uint32();
break;

@@ -78,3 +74,3 @@

message.delayedMessages = object.delayedMessages?.map(e => DelayedMessage.fromPartial(e)) || [];
message.numMessages = object.numMessages ?? 0;
message.nextDelayedMessageId = object.nextDelayedMessageId ?? 0;
return message;

@@ -81,0 +77,0 @@ }

import { LCDClient } from "@osmonauts/lcd";
import { QueryNumMessagesRequest, QueryNumMessagesResponseSDKType, QueryMessageRequest, QueryMessageResponseSDKType, QueryBlockMessageIdsRequest, QueryBlockMessageIdsResponseSDKType } from "./query";
import { QueryNextDelayedMessageIdRequest, QueryNextDelayedMessageIdResponseSDKType, QueryMessageRequest, QueryMessageResponseSDKType, QueryBlockMessageIdsRequest, QueryBlockMessageIdsResponseSDKType } from "./query";
export class LCDQueryClient {

@@ -12,12 +12,12 @@ req: LCDClient;

this.req = requestClient;
this.numMessages = this.numMessages.bind(this);
this.nextDelayedMessageId = this.nextDelayedMessageId.bind(this);
this.message = this.message.bind(this);
this.blockMessageIds = this.blockMessageIds.bind(this);
}
/* Queries the number of DelayedMessages. */
/* Queries the next DelayedMessage's id. */
async numMessages(_params: QueryNumMessagesRequest = {}): Promise<QueryNumMessagesResponseSDKType> {
const endpoint = `dydxprotocol/v4/delaymsg/messages`;
return await this.req.get<QueryNumMessagesResponseSDKType>(endpoint);
async nextDelayedMessageId(_params: QueryNextDelayedMessageIdRequest = {}): Promise<QueryNextDelayedMessageIdResponseSDKType> {
const endpoint = `dydxprotocol/v4/delaymsg/next_id`;
return await this.req.get<QueryNextDelayedMessageIdResponseSDKType>(endpoint);
}

@@ -24,0 +24,0 @@ /* Queries the DelayedMessage by id. */

import { Rpc } from "../../helpers";
import * as _m0 from "protobufjs/minimal";
import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate";
import { QueryNumMessagesRequest, QueryNumMessagesResponse, QueryMessageRequest, QueryMessageResponse, QueryBlockMessageIdsRequest, QueryBlockMessageIdsResponse } from "./query";
import { QueryNextDelayedMessageIdRequest, QueryNextDelayedMessageIdResponse, QueryMessageRequest, QueryMessageResponse, QueryBlockMessageIdsRequest, QueryBlockMessageIdsResponse } from "./query";
/** Query defines the gRPC querier service. */
export interface Query {
/** Queries the number of DelayedMessages. */
numMessages(request?: QueryNumMessagesRequest): Promise<QueryNumMessagesResponse>;
/** Queries the next DelayedMessage's id. */
nextDelayedMessageId(request?: QueryNextDelayedMessageIdRequest): Promise<QueryNextDelayedMessageIdResponse>;
/** Queries the DelayedMessage by id. */

@@ -22,3 +22,3 @@

this.rpc = rpc;
this.numMessages = this.numMessages.bind(this);
this.nextDelayedMessageId = this.nextDelayedMessageId.bind(this);
this.message = this.message.bind(this);

@@ -28,6 +28,6 @@ this.blockMessageIds = this.blockMessageIds.bind(this);

numMessages(request: QueryNumMessagesRequest = {}): Promise<QueryNumMessagesResponse> {
const data = QueryNumMessagesRequest.encode(request).finish();
const promise = this.rpc.request("dydxprotocol.delaymsg.Query", "NumMessages", data);
return promise.then(data => QueryNumMessagesResponse.decode(new _m0.Reader(data)));
nextDelayedMessageId(request: QueryNextDelayedMessageIdRequest = {}): Promise<QueryNextDelayedMessageIdResponse> {
const data = QueryNextDelayedMessageIdRequest.encode(request).finish();
const promise = this.rpc.request("dydxprotocol.delaymsg.Query", "NextDelayedMessageId", data);
return promise.then(data => QueryNextDelayedMessageIdResponse.decode(new _m0.Reader(data)));
}

@@ -52,4 +52,4 @@

return {
numMessages(request?: QueryNumMessagesRequest): Promise<QueryNumMessagesResponse> {
return queryService.numMessages(request);
nextDelayedMessageId(request?: QueryNextDelayedMessageIdRequest): Promise<QueryNextDelayedMessageIdResponse> {
return queryService.nextDelayedMessageId(request);
},

@@ -56,0 +56,0 @@

import { DelayedMessage, DelayedMessageSDKType } from "./delayed_message";
import * as _m0 from "protobufjs/minimal";
import { DeepPartial, Long } from "../../helpers";
import { DeepPartial } from "../../helpers";
/**
* QueryNumMessagesRequest is the request type for the NumMessages RPC
* method.
* QueryNextDelayedMessageIdRequest is the request type for the
* NextDelayedMessageId RPC method.
*/
export interface QueryNumMessagesRequest {}
export interface QueryNextDelayedMessageIdRequest {}
/**
* QueryNumMessagesRequest is the request type for the NumMessages RPC
* method.
* QueryNextDelayedMessageIdRequest is the request type for the
* NextDelayedMessageId RPC method.
*/
export interface QueryNumMessagesRequestSDKType {}
export interface QueryNextDelayedMessageIdRequestSDKType {}
/**
* QueryGetNumMessagesResponse is the response type for the NumMessages RPC
* method.
* QueryNextDelayedMessageIdResponse is the response type for the
* NextDelayedMessageId RPC method.
*/
export interface QueryNumMessagesResponse {
/**
* QueryGetNumMessagesResponse is the response type for the NumMessages RPC
* method.
*/
numMessages: number;
export interface QueryNextDelayedMessageIdResponse {
nextDelayedMessageId: number;
}
/**
* QueryGetNumMessagesResponse is the response type for the NumMessages RPC
* method.
* QueryNextDelayedMessageIdResponse is the response type for the
* NextDelayedMessageId RPC method.
*/
export interface QueryNumMessagesResponseSDKType {
num_messages: number;
export interface QueryNextDelayedMessageIdResponseSDKType {
next_delayed_message_id: number;
}

@@ -68,3 +64,3 @@ /** QueryMessageRequest is the request type for the Message RPC method. */

*/
blockHeight: Long;
blockHeight: number;
}

@@ -77,3 +73,3 @@ /**

export interface QueryBlockMessageIdsRequestSDKType {
block_height: Long;
block_height: number;
}

@@ -101,15 +97,15 @@ /**

function createBaseQueryNumMessagesRequest(): QueryNumMessagesRequest {
function createBaseQueryNextDelayedMessageIdRequest(): QueryNextDelayedMessageIdRequest {
return {};
}
export const QueryNumMessagesRequest = {
encode(_: QueryNumMessagesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
export const QueryNextDelayedMessageIdRequest = {
encode(_: QueryNextDelayedMessageIdRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): QueryNumMessagesRequest {
decode(input: _m0.Reader | Uint8Array, length?: number): QueryNextDelayedMessageIdRequest {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseQueryNumMessagesRequest();
const message = createBaseQueryNextDelayedMessageIdRequest();

@@ -129,4 +125,4 @@ while (reader.pos < end) {

fromPartial(_: DeepPartial<QueryNumMessagesRequest>): QueryNumMessagesRequest {
const message = createBaseQueryNumMessagesRequest();
fromPartial(_: DeepPartial<QueryNextDelayedMessageIdRequest>): QueryNextDelayedMessageIdRequest {
const message = createBaseQueryNextDelayedMessageIdRequest();
return message;

@@ -137,12 +133,12 @@ }

function createBaseQueryNumMessagesResponse(): QueryNumMessagesResponse {
function createBaseQueryNextDelayedMessageIdResponse(): QueryNextDelayedMessageIdResponse {
return {
numMessages: 0
nextDelayedMessageId: 0
};
}
export const QueryNumMessagesResponse = {
encode(message: QueryNumMessagesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.numMessages !== 0) {
writer.uint32(8).uint32(message.numMessages);
export const QueryNextDelayedMessageIdResponse = {
encode(message: QueryNextDelayedMessageIdResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.nextDelayedMessageId !== 0) {
writer.uint32(8).uint32(message.nextDelayedMessageId);
}

@@ -153,6 +149,6 @@

decode(input: _m0.Reader | Uint8Array, length?: number): QueryNumMessagesResponse {
decode(input: _m0.Reader | Uint8Array, length?: number): QueryNextDelayedMessageIdResponse {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseQueryNumMessagesResponse();
const message = createBaseQueryNextDelayedMessageIdResponse();

@@ -164,3 +160,3 @@ while (reader.pos < end) {

case 1:
message.numMessages = reader.uint32();
message.nextDelayedMessageId = reader.uint32();
break;

@@ -177,5 +173,5 @@

fromPartial(object: DeepPartial<QueryNumMessagesResponse>): QueryNumMessagesResponse {
const message = createBaseQueryNumMessagesResponse();
message.numMessages = object.numMessages ?? 0;
fromPartial(object: DeepPartial<QueryNextDelayedMessageIdResponse>): QueryNextDelayedMessageIdResponse {
const message = createBaseQueryNextDelayedMessageIdResponse();
message.nextDelayedMessageId = object.nextDelayedMessageId ?? 0;
return message;

@@ -278,3 +274,3 @@ }

return {
blockHeight: Long.ZERO
blockHeight: 0
};

@@ -285,4 +281,4 @@ }

encode(message: QueryBlockMessageIdsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (!message.blockHeight.isZero()) {
writer.uint32(8).sint64(message.blockHeight);
if (message.blockHeight !== 0) {
writer.uint32(8).uint32(message.blockHeight);
}

@@ -303,3 +299,3 @@

case 1:
message.blockHeight = (reader.sint64() as Long);
message.blockHeight = reader.uint32();
break;

@@ -318,3 +314,3 @@

const message = createBaseQueryBlockMessageIdsRequest();
message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null ? Long.fromValue(object.blockHeight) : Long.ZERO;
message.blockHeight = object.blockHeight ?? 0;
return message;

@@ -321,0 +317,0 @@ }

@@ -103,8 +103,2 @@ import { Timestamp } from "../../../google/protobuf/timestamp";

subtype: string;
/**
* Base64 encoded proto from the Tendermint event.
* TODO(DEC-1720): Change to bytes post-migration.
*/
data: string;
transactionIndex?: number;

@@ -122,2 +116,5 @@ blockEvent?: IndexerTendermintEvent_BlockEvent;

version: number;
/** Tendermint event bytes. */
dataBytes: Uint8Array;
}

@@ -132,3 +129,2 @@ /**

subtype: string;
data: string;
transaction_index?: number;

@@ -138,2 +134,3 @@ block_event?: IndexerTendermintEvent_BlockEvent;

version: number;
data_bytes: Uint8Array;
}

@@ -270,7 +267,7 @@ /**

subtype: "",
data: "",
transactionIndex: undefined,
blockEvent: undefined,
eventIndex: 0,
version: 0
version: 0,
dataBytes: new Uint8Array()
};

@@ -285,6 +282,2 @@ }

if (message.data !== "") {
writer.uint32(18).string(message.data);
}
if (message.transactionIndex !== undefined) {

@@ -306,2 +299,6 @@ writer.uint32(24).uint32(message.transactionIndex);

if (message.dataBytes.length !== 0) {
writer.uint32(58).bytes(message.dataBytes);
}
return writer;

@@ -323,6 +320,2 @@ },

case 2:
message.data = reader.string();
break;
case 3:

@@ -344,2 +337,6 @@ message.transactionIndex = reader.uint32();

case 7:
message.dataBytes = reader.bytes();
break;
default:

@@ -357,3 +354,2 @@ reader.skipType(tag & 7);

message.subtype = object.subtype ?? "";
message.data = object.data ?? "";
message.transactionIndex = object.transactionIndex ?? undefined;

@@ -363,2 +359,3 @@ message.blockEvent = object.blockEvent ?? undefined;

message.version = object.version ?? 0;
message.dataBytes = object.dataBytes ?? new Uint8Array();
return message;

@@ -365,0 +362,0 @@ }

@@ -1,3 +0,3 @@

import { Long, DeepPartial } from "../../helpers";
import * as _m0 from "protobufjs/minimal";
import { DeepPartial, Long } from "../../helpers";
/** Perpetual represents a perpetual on the dYdX exchange. */

@@ -14,8 +14,2 @@

fundingIndex: Uint8Array;
/**
* The total open-interest of the perpetual used for
* bookkeeping purposes. In base quantums.
*/
openInterest: Long;
}

@@ -27,3 +21,2 @@ /** Perpetual represents a perpetual on the dYdX exchange. */

funding_index: Uint8Array;
open_interest: Long;
}

@@ -190,4 +183,3 @@ /**

params: undefined,
fundingIndex: new Uint8Array(),
openInterest: Long.UZERO
fundingIndex: new Uint8Array()
};

@@ -206,6 +198,2 @@ }

if (!message.openInterest.isZero()) {
writer.uint32(24).uint64(message.openInterest);
}
return writer;

@@ -231,6 +219,2 @@ },

case 3:
message.openInterest = (reader.uint64() as Long);
break;
default:

@@ -249,3 +233,2 @@ reader.skipType(tag & 7);

message.fundingIndex = object.fundingIndex ?? new Uint8Array();
message.openInterest = object.openInterest !== undefined && object.openInterest !== null ? Long.fromValue(object.openInterest) : Long.UZERO;
return message;

@@ -252,0 +235,0 @@ }

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc