Skip to content

Commit

Permalink
added neutron's adminmodule protobufs
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed May 3, 2024
1 parent 21beaeb commit 964e69b
Show file tree
Hide file tree
Showing 57 changed files with 2,890 additions and 1,033 deletions.
24 changes: 12 additions & 12 deletions packages/types/protobuf/codegen/alliance/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import * as _6 from "./alliance/query";
import * as _7 from "./alliance/redelegations";
import * as _8 from "./alliance/tx";
import * as _9 from "./alliance/unbonding";
import * as _345 from "./alliance/tx.amino";
import * as _346 from "./alliance/tx.registry";
import * as _347 from "./alliance/query.rpc.Query";
import * as _348 from "./alliance/tx.rpc.msg";
import * as _576 from "./rpc.query";
import * as _577 from "./rpc.tx";
import * as _348 from "./alliance/tx.amino";
import * as _349 from "./alliance/tx.registry";
import * as _350 from "./alliance/query.rpc.Query";
import * as _351 from "./alliance/tx.rpc.msg";
import * as _583 from "./rpc.query";
import * as _584 from "./rpc.tx";
export namespace alliance {
export const alliance = {
..._0,
Expand All @@ -26,13 +26,13 @@ export namespace alliance {
..._7,
..._8,
..._9,
..._345,
..._346,
..._347,
..._348
..._348,
..._349,
..._350,
..._351
};
export const ClientFactory = {
..._576,
..._577
..._583,
..._584
};
}
3 changes: 3 additions & 0 deletions packages/types/protobuf/codegen/alliance/rpc.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export const createRPCQueryClient = async ({
alliance: (await import("./alliance/query.rpc.Query")).createRpcQueryExtension(client)
},
cosmos: {
adminmodule: {
adminmodule: (await import("../cosmos/adminmodule/adminmodule/query.rpc.Query")).createRpcQueryExtension(client)
},
auth: {
v1beta1: (await import("../cosmos/auth/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
},
Expand Down
3 changes: 3 additions & 0 deletions packages/types/protobuf/codegen/alliance/rpc.tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export const createRPCMsgClient = async ({
alliance: new (await import("./alliance/tx.rpc.msg")).MsgClientImpl(rpc)
},
cosmos: {
adminmodule: {
adminmodule: new (await import("../cosmos/adminmodule/adminmodule/tx.rpc.msg")).MsgClientImpl(rpc)
},
auth: {
v1beta1: new (await import("../cosmos/auth/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
},
Expand Down
24 changes: 12 additions & 12 deletions packages/types/protobuf/codegen/circle/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import * as _23 from "./cctp/v1/sending_and_receiving_messages_paused";
import * as _24 from "./cctp/v1/signature_threshold";
import * as _25 from "./cctp/v1/token_pair";
import * as _26 from "./cctp/v1/tx";
import * as _349 from "./cctp/v1/tx.amino";
import * as _350 from "./cctp/v1/tx.registry";
import * as _351 from "./cctp/v1/query.rpc.Query";
import * as _352 from "./cctp/v1/tx.rpc.msg";
import * as _578 from "./rpc.query";
import * as _579 from "./rpc.tx";
import * as _352 from "./cctp/v1/tx.amino";
import * as _353 from "./cctp/v1/tx.registry";
import * as _354 from "./cctp/v1/query.rpc.Query";
import * as _355 from "./cctp/v1/tx.rpc.msg";
import * as _585 from "./rpc.query";
import * as _586 from "./rpc.tx";
export namespace circle {
export namespace cctp {
export const v1 = {
Expand All @@ -39,14 +39,14 @@ export namespace circle {
..._24,
..._25,
..._26,
..._349,
..._350,
..._351,
..._352
..._352,
..._353,
..._354,
..._355
};
}
export const ClientFactory = {
..._578,
..._579
..._585,
..._586
};
}
3 changes: 3 additions & 0 deletions packages/types/protobuf/codegen/circle/rpc.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export const createRPCQueryClient = async ({
}
},
cosmos: {
adminmodule: {
adminmodule: (await import("../cosmos/adminmodule/adminmodule/query.rpc.Query")).createRpcQueryExtension(client)
},
auth: {
v1beta1: (await import("../cosmos/auth/v1beta1/query.rpc.Query")).createRpcQueryExtension(client)
},
Expand Down
3 changes: 3 additions & 0 deletions packages/types/protobuf/codegen/circle/rpc.tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export const createRPCMsgClient = async ({
}
},
cosmos: {
adminmodule: {
adminmodule: new (await import("../cosmos/adminmodule/adminmodule/tx.rpc.msg")).MsgClientImpl(rpc)
},
auth: {
v1beta1: new (await import("../cosmos/auth/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc)
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
//@ts-nocheck
import { BinaryReader, BinaryWriter } from "../../../binary";
/** GenesisState defines the adminmodule module's genesis state. */
export interface GenesisState {
admins: string[];
}
export interface GenesisStateProtoMsg {
typeUrl: "/cosmos.adminmodule.adminmodule.GenesisState";
value: Uint8Array;
}
/** GenesisState defines the adminmodule module's genesis state. */
export interface GenesisStateAmino {
admins?: string[];
}
export interface GenesisStateAminoMsg {
type: "cosmos-sdk/GenesisState";
value: GenesisStateAmino;
}
/** GenesisState defines the adminmodule module's genesis state. */
export interface GenesisStateSDKType {
admins: string[];
}
function createBaseGenesisState(): GenesisState {
return {
admins: []
};
}
export const GenesisState = {
typeUrl: "/cosmos.adminmodule.adminmodule.GenesisState",
encode(message: GenesisState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
for (const v of message.admins) {
writer.uint32(10).string(v!);
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number, useInterfaces: boolean = false): GenesisState {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseGenesisState();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.admins.push(reader.string());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromPartial(object: Partial<GenesisState>): GenesisState {
const message = createBaseGenesisState();
message.admins = object.admins?.map(e => e) || [];
return message;
},
fromAmino(object: GenesisStateAmino): GenesisState {
const message = createBaseGenesisState();
message.admins = object.admins?.map(e => e) || [];
return message;
},
toAmino(message: GenesisState, useInterfaces: boolean = false): GenesisStateAmino {
const obj: any = {};
if (message.admins) {
obj.admins = message.admins.map(e => e);
} else {
obj.admins = [];
}
return obj;
},
fromAminoMsg(object: GenesisStateAminoMsg): GenesisState {
return GenesisState.fromAmino(object.value);
},
toAminoMsg(message: GenesisState, useInterfaces: boolean = false): GenesisStateAminoMsg {
return {
type: "cosmos-sdk/GenesisState",
value: GenesisState.toAmino(message, useInterfaces)
};
},
fromProtoMsg(message: GenesisStateProtoMsg, useInterfaces: boolean = false): GenesisState {
return GenesisState.decode(message.value, undefined, useInterfaces);
},
toProto(message: GenesisState): Uint8Array {
return GenesisState.encode(message).finish();
},
toProtoMsg(message: GenesisState): GenesisStateProtoMsg {
return {
typeUrl: "/cosmos.adminmodule.adminmodule.GenesisState",
value: GenesisState.encode(message).finish()
};
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { Rpc } from "../../../helpers";
import { BinaryReader } from "../../../binary";
import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate";
import { QueryAdminsRequest, QueryAdminsResponse, QueryArchivedProposalsRequest, QueryArchivedProposalsResponse, QueryArchivedProposalsLegacyRequest, QueryArchivedProposalsLegacyResponse } from "./query";
/** Query defines the gRPC querier service. */
export interface Query {
/** Queries a list of admins items. */
admins(request?: QueryAdminsRequest): Promise<QueryAdminsResponse>;
/** Queries a list of archived proposals. */
archivedProposals(request?: QueryArchivedProposalsRequest): Promise<QueryArchivedProposalsResponse>;
/** Queries a list of archived proposals. */
archivedProposalsLegacy(request?: QueryArchivedProposalsLegacyRequest): Promise<QueryArchivedProposalsLegacyResponse>;
}
export class QueryClientImpl implements Query {
private readonly rpc: Rpc;
constructor(rpc: Rpc) {
this.rpc = rpc;
this.admins = this.admins.bind(this);
this.archivedProposals = this.archivedProposals.bind(this);
this.archivedProposalsLegacy = this.archivedProposalsLegacy.bind(this);
}
admins(request: QueryAdminsRequest = {}, useInterfaces: boolean = true): Promise<QueryAdminsResponse> {
const data = QueryAdminsRequest.encode(request).finish();
const promise = this.rpc.request("cosmos.adminmodule.adminmodule.Query", "Admins", data);
return promise.then(data => QueryAdminsResponse.decode(new BinaryReader(data), undefined, useInterfaces));
}
archivedProposals(request: QueryArchivedProposalsRequest = {}, useInterfaces: boolean = true): Promise<QueryArchivedProposalsResponse> {
const data = QueryArchivedProposalsRequest.encode(request).finish();
const promise = this.rpc.request("cosmos.adminmodule.adminmodule.Query", "ArchivedProposals", data);
return promise.then(data => QueryArchivedProposalsResponse.decode(new BinaryReader(data), undefined, useInterfaces));
}
archivedProposalsLegacy(request: QueryArchivedProposalsLegacyRequest = {}, useInterfaces: boolean = true): Promise<QueryArchivedProposalsLegacyResponse> {
const data = QueryArchivedProposalsLegacyRequest.encode(request).finish();
const promise = this.rpc.request("cosmos.adminmodule.adminmodule.Query", "ArchivedProposalsLegacy", data);
return promise.then(data => QueryArchivedProposalsLegacyResponse.decode(new BinaryReader(data), undefined, useInterfaces));
}
}
export const createRpcQueryExtension = (base: QueryClient) => {
const rpc = createProtobufRpcClient(base);
const queryService = new QueryClientImpl(rpc);
return {
admins(request?: QueryAdminsRequest, useInterfaces: boolean = true): Promise<QueryAdminsResponse> {
return queryService.admins(request, useInterfaces);
},
archivedProposals(request?: QueryArchivedProposalsRequest, useInterfaces: boolean = true): Promise<QueryArchivedProposalsResponse> {
return queryService.archivedProposals(request, useInterfaces);
},
archivedProposalsLegacy(request?: QueryArchivedProposalsLegacyRequest, useInterfaces: boolean = true): Promise<QueryArchivedProposalsLegacyResponse> {
return queryService.archivedProposalsLegacy(request, useInterfaces);
}
};
};
Loading

0 comments on commit 964e69b

Please sign in to comment.