Skip to content

Commit

Permalink
Merge pull request #68 from cosmology-tech/cosmos-types-helper-func
Browse files Browse the repository at this point in the history
Cosmos types helper func
  • Loading branch information
Zetazzz authored Dec 16, 2024
2 parents c906d94 + 70bbf0d commit 7c92a01
Show file tree
Hide file tree
Showing 31 changed files with 1,654 additions and 918 deletions.
2 changes: 1 addition & 1 deletion libs/cosmos-types/src/binary.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@1.10.5
* This file and any referenced files were automatically generated by @cosmology/telescope@1.10.11
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
145 changes: 0 additions & 145 deletions libs/cosmos-types/src/cosmos/auth/v1beta1/query.rpc.Query.ts

This file was deleted.

72 changes: 72 additions & 0 deletions libs/cosmos-types/src/cosmos/auth/v1beta1/query.rpc.func.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import { RpcResolver, buildQuery } from "../../../helper-func-types";
import { QueryAccountsRequest, QueryAccountsResponse, QueryAccountRequest, QueryAccountResponse, QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse, QueryParamsRequest, QueryParamsResponse, QueryModuleAccountsRequest, QueryModuleAccountsResponse, QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse, Bech32PrefixRequest, Bech32PrefixResponse, AddressBytesToStringRequest, AddressBytesToStringResponse, AddressStringToBytesRequest, AddressStringToBytesResponse, QueryAccountInfoRequest, QueryAccountInfoResponse } from "./query";
export const createGetAccounts = (clientResolver?: RpcResolver) => buildQuery<QueryAccountsRequest, QueryAccountsResponse>({
encode: QueryAccountsRequest.encode,
decode: QueryAccountsResponse.decode,
service: "cosmos.auth.v1beta1.Query",
method: "Accounts",
clientResolver
});
export const createGetAccount = (clientResolver?: RpcResolver) => buildQuery<QueryAccountRequest, QueryAccountResponse>({
encode: QueryAccountRequest.encode,
decode: QueryAccountResponse.decode,
service: "cosmos.auth.v1beta1.Query",
method: "Account",
clientResolver
});
export const createGetAccountAddressByID = (clientResolver?: RpcResolver) => buildQuery<QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse>({
encode: QueryAccountAddressByIDRequest.encode,
decode: QueryAccountAddressByIDResponse.decode,
service: "cosmos.auth.v1beta1.Query",
method: "AccountAddressByID",
clientResolver
});
export const createGetParams = (clientResolver?: RpcResolver) => buildQuery<QueryParamsRequest, QueryParamsResponse>({
encode: QueryParamsRequest.encode,
decode: QueryParamsResponse.decode,
service: "cosmos.auth.v1beta1.Query",
method: "Params",
clientResolver
});
export const createGetModuleAccounts = (clientResolver?: RpcResolver) => buildQuery<QueryModuleAccountsRequest, QueryModuleAccountsResponse>({
encode: QueryModuleAccountsRequest.encode,
decode: QueryModuleAccountsResponse.decode,
service: "cosmos.auth.v1beta1.Query",
method: "ModuleAccounts",
clientResolver
});
export const createGetModuleAccountByName = (clientResolver?: RpcResolver) => buildQuery<QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse>({
encode: QueryModuleAccountByNameRequest.encode,
decode: QueryModuleAccountByNameResponse.decode,
service: "cosmos.auth.v1beta1.Query",
method: "ModuleAccountByName",
clientResolver
});
export const createGetBech32Prefix = (clientResolver?: RpcResolver) => buildQuery<Bech32PrefixRequest, Bech32PrefixResponse>({
encode: Bech32PrefixRequest.encode,
decode: Bech32PrefixResponse.decode,
service: "cosmos.auth.v1beta1.Query",
method: "Bech32Prefix",
clientResolver
});
export const createGetAddressBytesToString = (clientResolver?: RpcResolver) => buildQuery<AddressBytesToStringRequest, AddressBytesToStringResponse>({
encode: AddressBytesToStringRequest.encode,
decode: AddressBytesToStringResponse.decode,
service: "cosmos.auth.v1beta1.Query",
method: "AddressBytesToString",
clientResolver
});
export const createGetAddressStringToBytes = (clientResolver?: RpcResolver) => buildQuery<AddressStringToBytesRequest, AddressStringToBytesResponse>({
encode: AddressStringToBytesRequest.encode,
decode: AddressStringToBytesResponse.decode,
service: "cosmos.auth.v1beta1.Query",
method: "AddressStringToBytes",
clientResolver
});
export const createGetAccountInfo = (clientResolver?: RpcResolver) => buildQuery<QueryAccountInfoRequest, QueryAccountInfoResponse>({
encode: QueryAccountInfoRequest.encode,
decode: QueryAccountInfoResponse.decode,
service: "cosmos.auth.v1beta1.Query",
method: "AccountInfo",
clientResolver
});
Loading

0 comments on commit 7c92a01

Please sign in to comment.