@initia/initia.proto
Advanced tools
Comparing version 0.0.18-alpha1 to 0.0.19-alpha1
@@ -36,2 +36,15 @@ import Long from "long"; | ||
} | ||
/** WhitelistProposal */ | ||
export interface WhitelistProposal { | ||
/** Title is a short summary */ | ||
title: string; | ||
/** Description is a human readable text */ | ||
description: string; | ||
/** Dex coin A struct_tag */ | ||
coinA: string; | ||
/** Dex coin B struct_tag */ | ||
coinB: string; | ||
/** Dex coin LP struct_tag */ | ||
coinLp: string; | ||
} | ||
export declare const OperationsProposal: { | ||
@@ -130,2 +143,21 @@ encode(message: OperationsProposal, writer?: _m0.Writer): _m0.Writer; | ||
}; | ||
export declare const WhitelistProposal: { | ||
encode(message: WhitelistProposal, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number): WhitelistProposal; | ||
fromJSON(object: any): WhitelistProposal; | ||
toJSON(message: WhitelistProposal): unknown; | ||
fromPartial<I extends { | ||
title?: string | undefined; | ||
description?: string | undefined; | ||
coinA?: string | undefined; | ||
coinB?: string | undefined; | ||
coinLp?: string | undefined; | ||
} & { | ||
title?: string | undefined; | ||
description?: string | undefined; | ||
coinA?: string | undefined; | ||
coinB?: string | undefined; | ||
coinLp?: string | undefined; | ||
} & { [K in Exclude<keyof I, keyof WhitelistProposal>]: never; }>(object: I): WhitelistProposal; | ||
}; | ||
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
@@ -132,0 +164,0 @@ export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ExecuteOperation = exports.PublishOperation = exports.OperationWrapper = exports.OperationsProposal = exports.protobufPackage = void 0; | ||
exports.WhitelistProposal = exports.ExecuteOperation = exports.PublishOperation = exports.OperationWrapper = exports.OperationsProposal = exports.protobufPackage = void 0; | ||
/* eslint-disable */ | ||
@@ -260,2 +260,82 @@ const long_1 = __importDefault(require("long")); | ||
}; | ||
function createBaseWhitelistProposal() { | ||
return { title: "", description: "", coinA: "", coinB: "", coinLp: "" }; | ||
} | ||
exports.WhitelistProposal = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
if (message.title !== "") { | ||
writer.uint32(10).string(message.title); | ||
} | ||
if (message.description !== "") { | ||
writer.uint32(18).string(message.description); | ||
} | ||
if (message.coinA !== "") { | ||
writer.uint32(26).string(message.coinA); | ||
} | ||
if (message.coinB !== "") { | ||
writer.uint32(34).string(message.coinB); | ||
} | ||
if (message.coinLp !== "") { | ||
writer.uint32(42).string(message.coinLp); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseWhitelistProposal(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.title = reader.string(); | ||
break; | ||
case 2: | ||
message.description = reader.string(); | ||
break; | ||
case 3: | ||
message.coinA = reader.string(); | ||
break; | ||
case 4: | ||
message.coinB = reader.string(); | ||
break; | ||
case 5: | ||
message.coinLp = reader.string(); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
title: isSet(object.title) ? String(object.title) : "", | ||
description: isSet(object.description) ? String(object.description) : "", | ||
coinA: isSet(object.coinA) ? String(object.coinA) : "", | ||
coinB: isSet(object.coinB) ? String(object.coinB) : "", | ||
coinLp: isSet(object.coinLp) ? String(object.coinLp) : "", | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.title !== undefined && (obj.title = message.title); | ||
message.description !== undefined && (obj.description = message.description); | ||
message.coinA !== undefined && (obj.coinA = message.coinA); | ||
message.coinB !== undefined && (obj.coinB = message.coinB); | ||
message.coinLp !== undefined && (obj.coinLp = message.coinLp); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b, _c, _d, _e; | ||
const message = createBaseWhitelistProposal(); | ||
message.title = (_a = object.title) !== null && _a !== void 0 ? _a : ""; | ||
message.description = (_b = object.description) !== null && _b !== void 0 ? _b : ""; | ||
message.coinA = (_c = object.coinA) !== null && _c !== void 0 ? _c : ""; | ||
message.coinB = (_d = object.coinB) !== null && _d !== void 0 ? _d : ""; | ||
message.coinLp = (_e = object.coinLp) !== null && _e !== void 0 ? _e : ""; | ||
return message; | ||
}, | ||
}; | ||
var globalThis = (() => { | ||
@@ -262,0 +342,0 @@ if (typeof globalThis !== "undefined") { |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.GrpcWebError = exports.GrpcWebImpl = exports.QueryParamsDesc = exports.QueryDenomDesc = exports.QueryStructTagDesc = exports.QueryScriptABIDesc = exports.QueryEntryFunctionDesc = exports.QueryResourcesDesc = exports.QueryResourceDesc = exports.QueryModulesDesc = exports.QueryModuleDesc = exports.QueryDesc = exports.QueryClientImpl = exports.QueryParamsResponse = exports.QueryParamsRequest = exports.QueryDenomResponse = exports.QueryDenomRequest = exports.QueryStructTagResponse = exports.QueryStructTagRequest = exports.QueryScriptABIResponse = exports.QueryScriptABIRequest = exports.QueryEntryFunctionResponse = exports.QueryEntryFunctionRequest = exports.QueryResourcesResponse = exports.QueryResourcesRequest = exports.QueryResourceResponse = exports.QueryResourceRequest = exports.QueryModulesResponse = exports.QueryModulesRequest = exports.QueryModuleResponse = exports.QueryModuleRequest = exports.protobufPackage = void 0; | ||
exports.GrpcWebError = exports.GrpcWebImpl = exports.QueryParamsDesc = exports.QueryDenomDesc = exports.QueryStructTagDesc = exports.QueryScriptABIDesc = exports.QueryViewFunctionDesc = exports.QueryTableEntriesDesc = exports.QueryTableEntryDesc = exports.QueryResourcesDesc = exports.QueryResourceDesc = exports.QueryModulesDesc = exports.QueryModuleDesc = exports.QueryDesc = exports.QueryClientImpl = exports.QueryParamsResponse = exports.QueryParamsRequest = exports.QueryDenomResponse = exports.QueryDenomRequest = exports.QueryStructTagResponse = exports.QueryStructTagRequest = exports.QueryScriptABIResponse = exports.QueryScriptABIRequest = exports.QueryViewFunctionResponse = exports.QueryViewFunctionRequest = exports.QueryTableEntriesResponse = exports.QueryTableEntriesRequest = exports.QueryTableEntryResponse = exports.QueryTableEntryRequest = exports.QueryResourcesResponse = exports.QueryResourcesRequest = exports.QueryResourceResponse = exports.QueryResourceRequest = exports.QueryModulesResponse = exports.QueryModulesRequest = exports.QueryModuleResponse = exports.QueryModuleRequest = exports.protobufPackage = void 0; | ||
/* eslint-disable */ | ||
@@ -449,6 +449,226 @@ const grpc_web_1 = require("@improbable-eng/grpc-web"); | ||
}; | ||
function createBaseQueryEntryFunctionRequest() { | ||
function createBaseQueryTableEntryRequest() { | ||
return { address: "", keyBytes: new Uint8Array() }; | ||
} | ||
exports.QueryTableEntryRequest = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
if (message.address !== "") { | ||
writer.uint32(10).string(message.address); | ||
} | ||
if (message.keyBytes.length !== 0) { | ||
writer.uint32(18).bytes(message.keyBytes); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseQueryTableEntryRequest(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.address = reader.string(); | ||
break; | ||
case 2: | ||
message.keyBytes = reader.bytes(); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
address: isSet(object.address) ? String(object.address) : "", | ||
keyBytes: isSet(object.keyBytes) ? bytesFromBase64(object.keyBytes) : new Uint8Array(), | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.address !== undefined && (obj.address = message.address); | ||
message.keyBytes !== undefined && | ||
(obj.keyBytes = base64FromBytes(message.keyBytes !== undefined ? message.keyBytes : new Uint8Array())); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b; | ||
const message = createBaseQueryTableEntryRequest(); | ||
message.address = (_a = object.address) !== null && _a !== void 0 ? _a : ""; | ||
message.keyBytes = (_b = object.keyBytes) !== null && _b !== void 0 ? _b : new Uint8Array(); | ||
return message; | ||
}, | ||
}; | ||
function createBaseQueryTableEntryResponse() { | ||
return { tableEntry: undefined }; | ||
} | ||
exports.QueryTableEntryResponse = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
if (message.tableEntry !== undefined) { | ||
types_1.TableEntry.encode(message.tableEntry, writer.uint32(10).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseQueryTableEntryResponse(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.tableEntry = types_1.TableEntry.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { tableEntry: isSet(object.tableEntry) ? types_1.TableEntry.fromJSON(object.tableEntry) : undefined }; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.tableEntry !== undefined && | ||
(obj.tableEntry = message.tableEntry ? types_1.TableEntry.toJSON(message.tableEntry) : undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
const message = createBaseQueryTableEntryResponse(); | ||
message.tableEntry = | ||
object.tableEntry !== undefined && object.tableEntry !== null | ||
? types_1.TableEntry.fromPartial(object.tableEntry) | ||
: undefined; | ||
return message; | ||
}, | ||
}; | ||
function createBaseQueryTableEntriesRequest() { | ||
return { address: "", pagination: undefined }; | ||
} | ||
exports.QueryTableEntriesRequest = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
if (message.address !== "") { | ||
writer.uint32(10).string(message.address); | ||
} | ||
if (message.pagination !== undefined) { | ||
pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseQueryTableEntriesRequest(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.address = reader.string(); | ||
break; | ||
case 2: | ||
message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
address: isSet(object.address) ? String(object.address) : "", | ||
pagination: isSet(object.pagination) ? pagination_1.PageRequest.fromJSON(object.pagination) : undefined, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.address !== undefined && (obj.address = message.address); | ||
message.pagination !== undefined && | ||
(obj.pagination = message.pagination ? pagination_1.PageRequest.toJSON(message.pagination) : undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a; | ||
const message = createBaseQueryTableEntriesRequest(); | ||
message.address = (_a = object.address) !== null && _a !== void 0 ? _a : ""; | ||
message.pagination = | ||
object.pagination !== undefined && object.pagination !== null | ||
? pagination_1.PageRequest.fromPartial(object.pagination) | ||
: undefined; | ||
return message; | ||
}, | ||
}; | ||
function createBaseQueryTableEntriesResponse() { | ||
return { tableEntries: [], pagination: undefined }; | ||
} | ||
exports.QueryTableEntriesResponse = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
for (const v of message.tableEntries) { | ||
types_1.TableEntry.encode(v, writer.uint32(10).fork()).ldelim(); | ||
} | ||
if (message.pagination !== undefined) { | ||
pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseQueryTableEntriesResponse(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.tableEntries.push(types_1.TableEntry.decode(reader, reader.uint32())); | ||
break; | ||
case 2: | ||
message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
tableEntries: Array.isArray(object === null || object === void 0 ? void 0 : object.tableEntries) | ||
? object.tableEntries.map((e) => types_1.TableEntry.fromJSON(e)) | ||
: [], | ||
pagination: isSet(object.pagination) ? pagination_1.PageResponse.fromJSON(object.pagination) : undefined, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
if (message.tableEntries) { | ||
obj.tableEntries = message.tableEntries.map((e) => (e ? types_1.TableEntry.toJSON(e) : undefined)); | ||
} | ||
else { | ||
obj.tableEntries = []; | ||
} | ||
message.pagination !== undefined && | ||
(obj.pagination = message.pagination ? pagination_1.PageResponse.toJSON(message.pagination) : undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a; | ||
const message = createBaseQueryTableEntriesResponse(); | ||
message.tableEntries = ((_a = object.tableEntries) === null || _a === void 0 ? void 0 : _a.map((e) => types_1.TableEntry.fromPartial(e))) || []; | ||
message.pagination = | ||
object.pagination !== undefined && object.pagination !== null | ||
? pagination_1.PageResponse.fromPartial(object.pagination) | ||
: undefined; | ||
return message; | ||
}, | ||
}; | ||
function createBaseQueryViewFunctionRequest() { | ||
return { address: "", moduleName: "", functionName: "", typeArgs: [], args: [] }; | ||
} | ||
exports.QueryEntryFunctionRequest = { | ||
exports.QueryViewFunctionRequest = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
@@ -475,3 +695,3 @@ if (message.address !== "") { | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseQueryEntryFunctionRequest(); | ||
const message = createBaseQueryViewFunctionRequest(); | ||
while (reader.pos < end) { | ||
@@ -532,3 +752,3 @@ const tag = reader.uint32(); | ||
var _a, _b, _c, _d, _e; | ||
const message = createBaseQueryEntryFunctionRequest(); | ||
const message = createBaseQueryViewFunctionRequest(); | ||
message.address = (_a = object.address) !== null && _a !== void 0 ? _a : ""; | ||
@@ -542,6 +762,6 @@ message.moduleName = (_b = object.moduleName) !== null && _b !== void 0 ? _b : ""; | ||
}; | ||
function createBaseQueryEntryFunctionResponse() { | ||
function createBaseQueryViewFunctionResponse() { | ||
return { data: "" }; | ||
} | ||
exports.QueryEntryFunctionResponse = { | ||
exports.QueryViewFunctionResponse = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
@@ -556,3 +776,3 @@ if (message.data !== "") { | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseQueryEntryFunctionResponse(); | ||
const message = createBaseQueryViewFunctionResponse(); | ||
while (reader.pos < end) { | ||
@@ -581,3 +801,3 @@ const tag = reader.uint32(); | ||
var _a; | ||
const message = createBaseQueryEntryFunctionResponse(); | ||
const message = createBaseQueryViewFunctionResponse(); | ||
message.data = (_a = object.data) !== null && _a !== void 0 ? _a : ""; | ||
@@ -923,3 +1143,5 @@ return message; | ||
this.Resources = this.Resources.bind(this); | ||
this.EntryFunction = this.EntryFunction.bind(this); | ||
this.TableEntry = this.TableEntry.bind(this); | ||
this.TableEntries = this.TableEntries.bind(this); | ||
this.ViewFunction = this.ViewFunction.bind(this); | ||
this.ScriptABI = this.ScriptABI.bind(this); | ||
@@ -942,5 +1164,11 @@ this.StructTag = this.StructTag.bind(this); | ||
} | ||
EntryFunction(request, metadata) { | ||
return this.rpc.unary(exports.QueryEntryFunctionDesc, exports.QueryEntryFunctionRequest.fromPartial(request), metadata); | ||
TableEntry(request, metadata) { | ||
return this.rpc.unary(exports.QueryTableEntryDesc, exports.QueryTableEntryRequest.fromPartial(request), metadata); | ||
} | ||
TableEntries(request, metadata) { | ||
return this.rpc.unary(exports.QueryTableEntriesDesc, exports.QueryTableEntriesRequest.fromPartial(request), metadata); | ||
} | ||
ViewFunction(request, metadata) { | ||
return this.rpc.unary(exports.QueryViewFunctionDesc, exports.QueryViewFunctionRequest.fromPartial(request), metadata); | ||
} | ||
ScriptABI(request, metadata) { | ||
@@ -1033,4 +1261,4 @@ return this.rpc.unary(exports.QueryScriptABIDesc, exports.QueryScriptABIRequest.fromPartial(request), metadata); | ||
}; | ||
exports.QueryEntryFunctionDesc = { | ||
methodName: "EntryFunction", | ||
exports.QueryTableEntryDesc = { | ||
methodName: "TableEntry", | ||
service: exports.QueryDesc, | ||
@@ -1041,3 +1269,3 @@ requestStream: false, | ||
serializeBinary() { | ||
return exports.QueryEntryFunctionRequest.encode(this).finish(); | ||
return exports.QueryTableEntryRequest.encode(this).finish(); | ||
}, | ||
@@ -1047,3 +1275,3 @@ }, | ||
deserializeBinary(data) { | ||
return Object.assign(Object.assign({}, exports.QueryEntryFunctionResponse.decode(data)), { toObject() { | ||
return Object.assign(Object.assign({}, exports.QueryTableEntryResponse.decode(data)), { toObject() { | ||
return this; | ||
@@ -1054,2 +1282,38 @@ } }); | ||
}; | ||
exports.QueryTableEntriesDesc = { | ||
methodName: "TableEntries", | ||
service: exports.QueryDesc, | ||
requestStream: false, | ||
responseStream: false, | ||
requestType: { | ||
serializeBinary() { | ||
return exports.QueryTableEntriesRequest.encode(this).finish(); | ||
}, | ||
}, | ||
responseType: { | ||
deserializeBinary(data) { | ||
return Object.assign(Object.assign({}, exports.QueryTableEntriesResponse.decode(data)), { toObject() { | ||
return this; | ||
} }); | ||
}, | ||
}, | ||
}; | ||
exports.QueryViewFunctionDesc = { | ||
methodName: "ViewFunction", | ||
service: exports.QueryDesc, | ||
requestStream: false, | ||
responseStream: false, | ||
requestType: { | ||
serializeBinary() { | ||
return exports.QueryViewFunctionRequest.encode(this).finish(); | ||
}, | ||
}, | ||
responseType: { | ||
deserializeBinary(data) { | ||
return Object.assign(Object.assign({}, exports.QueryViewFunctionResponse.decode(data)), { toObject() { | ||
return this; | ||
} }); | ||
}, | ||
}, | ||
}; | ||
exports.QueryScriptABIDesc = { | ||
@@ -1056,0 +1320,0 @@ methodName: "ScriptABI", |
@@ -61,2 +61,11 @@ import Long from "long"; | ||
} | ||
/** | ||
* DexPair contains coin structs to access | ||
* std::dex::Pool and std::dex::Config resources. | ||
*/ | ||
export interface DexPair { | ||
coinA: string; | ||
coinB: string; | ||
coinLp: string; | ||
} | ||
export declare const Params: { | ||
@@ -208,2 +217,17 @@ encode(message: Params, writer?: _m0.Writer): _m0.Writer; | ||
}; | ||
export declare const DexPair: { | ||
encode(message: DexPair, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number): DexPair; | ||
fromJSON(object: any): DexPair; | ||
toJSON(message: DexPair): unknown; | ||
fromPartial<I extends { | ||
coinA?: string | undefined; | ||
coinB?: string | undefined; | ||
coinLp?: string | undefined; | ||
} & { | ||
coinA?: string | undefined; | ||
coinB?: string | undefined; | ||
coinLp?: string | undefined; | ||
} & { [K in Exclude<keyof I, keyof DexPair>]: never; }>(object: I): DexPair; | ||
}; | ||
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
@@ -210,0 +234,0 @@ export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.UpgradePolicyProto = exports.TableEntry = exports.Module = exports.Resource = exports.Params = exports.upgradePolicyToJSON = exports.upgradePolicyFromJSON = exports.UpgradePolicy = exports.protobufPackage = void 0; | ||
exports.DexPair = exports.UpgradePolicyProto = exports.TableEntry = exports.Module = exports.Resource = exports.Params = exports.upgradePolicyToJSON = exports.upgradePolicyFromJSON = exports.UpgradePolicy = exports.protobufPackage = void 0; | ||
/* eslint-disable */ | ||
@@ -380,2 +380,64 @@ const long_1 = __importDefault(require("long")); | ||
}; | ||
function createBaseDexPair() { | ||
return { coinA: "", coinB: "", coinLp: "" }; | ||
} | ||
exports.DexPair = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
if (message.coinA !== "") { | ||
writer.uint32(10).string(message.coinA); | ||
} | ||
if (message.coinB !== "") { | ||
writer.uint32(18).string(message.coinB); | ||
} | ||
if (message.coinLp !== "") { | ||
writer.uint32(26).string(message.coinLp); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseDexPair(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.coinA = reader.string(); | ||
break; | ||
case 2: | ||
message.coinB = reader.string(); | ||
break; | ||
case 3: | ||
message.coinLp = reader.string(); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
coinA: isSet(object.coinA) ? String(object.coinA) : "", | ||
coinB: isSet(object.coinB) ? String(object.coinB) : "", | ||
coinLp: isSet(object.coinLp) ? String(object.coinLp) : "", | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.coinA !== undefined && (obj.coinA = message.coinA); | ||
message.coinB !== undefined && (obj.coinB = message.coinB); | ||
message.coinLp !== undefined && (obj.coinLp = message.coinLp); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b, _c; | ||
const message = createBaseDexPair(); | ||
message.coinA = (_a = object.coinA) !== null && _a !== void 0 ? _a : ""; | ||
message.coinB = (_b = object.coinB) !== null && _b !== void 0 ? _b : ""; | ||
message.coinLp = (_c = object.coinLp) !== null && _c !== void 0 ? _c : ""; | ||
return message; | ||
}, | ||
}; | ||
var globalThis = (() => { | ||
@@ -382,0 +444,0 @@ if (typeof globalThis !== "undefined") { |
{ | ||
"name": "@initia/initia.proto", | ||
"version": "0.0.18-alpha1", | ||
"version": "0.0.19-alpha1", | ||
"description": "JS and TS types relating to Protocol Buffers used by Initia project", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
18759516
217069
0