-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from cosmology-tech/add-proto-and-regen-icjs
add proto and regen icjs
- Loading branch information
Showing
540 changed files
with
148,164 additions
and
53 deletions.
There are no files selected for viewing
422 changes: 422 additions & 0 deletions
422
libs/interchain-react/src/cosmos/app/runtime/v1alpha1/module.ts
Large diffs are not rendered by default.
Oops, something went wrong.
588 changes: 588 additions & 0 deletions
588
libs/interchain-react/src/cosmos/app/runtime/v2/module.ts
Large diffs are not rendered by default.
Oops, something went wrong.
423 changes: 423 additions & 0 deletions
423
libs/interchain-react/src/cosmos/app/v1alpha1/config.ts
Large diffs are not rendered by default.
Oops, something went wrong.
460 changes: 460 additions & 0 deletions
460
libs/interchain-react/src/cosmos/app/v1alpha1/module.ts
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
libs/interchain-react/src/cosmos/app/v1alpha1/query.rpc.func.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { RpcResolver, buildQuery } from "../../../helper-func-types"; | ||
import { buildUseQuery } from "../../../react-query"; | ||
import { QueryConfigRequest, QueryConfigResponse } from "./query"; | ||
export const createGetConfig = (clientResolver?: RpcResolver) => buildQuery<QueryConfigRequest, QueryConfigResponse>({ | ||
encode: QueryConfigRequest.encode, | ||
decode: QueryConfigResponse.decode, | ||
service: "cosmos.app.v1alpha1.Query", | ||
method: "Config", | ||
clientResolver, | ||
deps: [QueryConfigRequest, QueryConfigResponse] | ||
}); | ||
export const useGetConfig = buildUseQuery<QueryConfigRequest, QueryConfigResponse>({ | ||
builderQueryFn: createGetConfig, | ||
queryKeyPrefix: "ConfigQuery" | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
import { Config, ConfigAmino } from "./config"; | ||
import { BinaryReader, BinaryWriter } from "../../../binary"; | ||
import { DeepPartial } from "../../../helpers"; | ||
/** QueryConfigRequest is the Query/Config request type. */ | ||
export interface QueryConfigRequest {} | ||
export interface QueryConfigRequestProtoMsg { | ||
typeUrl: "/cosmos.app.v1alpha1.QueryConfigRequest"; | ||
value: Uint8Array; | ||
} | ||
/** QueryConfigRequest is the Query/Config request type. */ | ||
export interface QueryConfigRequestAmino {} | ||
export interface QueryConfigRequestAminoMsg { | ||
type: "cosmos-sdk/QueryConfigRequest"; | ||
value: QueryConfigRequestAmino; | ||
} | ||
/** QueryConfigRequest is the Query/Config response type. */ | ||
export interface QueryConfigResponse { | ||
/** config is the current app config. */ | ||
config?: Config; | ||
} | ||
export interface QueryConfigResponseProtoMsg { | ||
typeUrl: "/cosmos.app.v1alpha1.QueryConfigResponse"; | ||
value: Uint8Array; | ||
} | ||
/** QueryConfigRequest is the Query/Config response type. */ | ||
export interface QueryConfigResponseAmino { | ||
/** config is the current app config. */ | ||
config?: ConfigAmino; | ||
} | ||
export interface QueryConfigResponseAminoMsg { | ||
type: "cosmos-sdk/QueryConfigResponse"; | ||
value: QueryConfigResponseAmino; | ||
} | ||
function createBaseQueryConfigRequest(): QueryConfigRequest { | ||
return {}; | ||
} | ||
export const QueryConfigRequest = { | ||
typeUrl: "/cosmos.app.v1alpha1.QueryConfigRequest", | ||
aminoType: "cosmos-sdk/QueryConfigRequest", | ||
is(o: any): o is QueryConfigRequest { | ||
return o && o.$typeUrl === QueryConfigRequest.typeUrl; | ||
}, | ||
isAmino(o: any): o is QueryConfigRequestAmino { | ||
return o && o.$typeUrl === QueryConfigRequest.typeUrl; | ||
}, | ||
encode(_: QueryConfigRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { | ||
return writer; | ||
}, | ||
decode(input: BinaryReader | Uint8Array, length?: number): QueryConfigRequest { | ||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseQueryConfigRequest(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromPartial(_: DeepPartial<QueryConfigRequest>): QueryConfigRequest { | ||
const message = createBaseQueryConfigRequest(); | ||
return message; | ||
}, | ||
fromAmino(_: QueryConfigRequestAmino): QueryConfigRequest { | ||
const message = createBaseQueryConfigRequest(); | ||
return message; | ||
}, | ||
toAmino(_: QueryConfigRequest): QueryConfigRequestAmino { | ||
const obj: any = {}; | ||
return obj; | ||
}, | ||
fromAminoMsg(object: QueryConfigRequestAminoMsg): QueryConfigRequest { | ||
return QueryConfigRequest.fromAmino(object.value); | ||
}, | ||
toAminoMsg(message: QueryConfigRequest): QueryConfigRequestAminoMsg { | ||
return { | ||
type: "cosmos-sdk/QueryConfigRequest", | ||
value: QueryConfigRequest.toAmino(message) | ||
}; | ||
}, | ||
fromProtoMsg(message: QueryConfigRequestProtoMsg): QueryConfigRequest { | ||
return QueryConfigRequest.decode(message.value); | ||
}, | ||
toProto(message: QueryConfigRequest): Uint8Array { | ||
return QueryConfigRequest.encode(message).finish(); | ||
}, | ||
toProtoMsg(message: QueryConfigRequest): QueryConfigRequestProtoMsg { | ||
return { | ||
typeUrl: "/cosmos.app.v1alpha1.QueryConfigRequest", | ||
value: QueryConfigRequest.encode(message).finish() | ||
}; | ||
}, | ||
registerTypeUrl() {} | ||
}; | ||
function createBaseQueryConfigResponse(): QueryConfigResponse { | ||
return { | ||
config: undefined | ||
}; | ||
} | ||
export const QueryConfigResponse = { | ||
typeUrl: "/cosmos.app.v1alpha1.QueryConfigResponse", | ||
aminoType: "cosmos-sdk/QueryConfigResponse", | ||
is(o: any): o is QueryConfigResponse { | ||
return o && o.$typeUrl === QueryConfigResponse.typeUrl; | ||
}, | ||
isAmino(o: any): o is QueryConfigResponseAmino { | ||
return o && o.$typeUrl === QueryConfigResponse.typeUrl; | ||
}, | ||
encode(message: QueryConfigResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { | ||
if (message.config !== undefined) { | ||
Config.encode(message.config, writer.uint32(10).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
decode(input: BinaryReader | Uint8Array, length?: number): QueryConfigResponse { | ||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseQueryConfigResponse(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.config = Config.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromPartial(object: DeepPartial<QueryConfigResponse>): QueryConfigResponse { | ||
const message = createBaseQueryConfigResponse(); | ||
message.config = object.config !== undefined && object.config !== null ? Config.fromPartial(object.config) : undefined; | ||
return message; | ||
}, | ||
fromAmino(object: QueryConfigResponseAmino): QueryConfigResponse { | ||
const message = createBaseQueryConfigResponse(); | ||
if (object.config !== undefined && object.config !== null) { | ||
message.config = Config.fromAmino(object.config); | ||
} | ||
return message; | ||
}, | ||
toAmino(message: QueryConfigResponse): QueryConfigResponseAmino { | ||
const obj: any = {}; | ||
obj.config = message.config ? Config.toAmino(message.config) : undefined; | ||
return obj; | ||
}, | ||
fromAminoMsg(object: QueryConfigResponseAminoMsg): QueryConfigResponse { | ||
return QueryConfigResponse.fromAmino(object.value); | ||
}, | ||
toAminoMsg(message: QueryConfigResponse): QueryConfigResponseAminoMsg { | ||
return { | ||
type: "cosmos-sdk/QueryConfigResponse", | ||
value: QueryConfigResponse.toAmino(message) | ||
}; | ||
}, | ||
fromProtoMsg(message: QueryConfigResponseProtoMsg): QueryConfigResponse { | ||
return QueryConfigResponse.decode(message.value); | ||
}, | ||
toProto(message: QueryConfigResponse): Uint8Array { | ||
return QueryConfigResponse.encode(message).finish(); | ||
}, | ||
toProtoMsg(message: QueryConfigResponse): QueryConfigResponseProtoMsg { | ||
return { | ||
typeUrl: "/cosmos.app.v1alpha1.QueryConfigResponse", | ||
value: QueryConfigResponse.encode(message).finish() | ||
}; | ||
}, | ||
registerTypeUrl() { | ||
Config.registerTypeUrl(); | ||
} | ||
}; |
Oops, something went wrong.