Skip to content

Commit

Permalink
Merge pull request #80 from hyperweb-io/upgrade-telescope-1.11.11
Browse files Browse the repository at this point in the history
Upgrade telescope 1.11.11
  • Loading branch information
Zetazzz authored Jan 27, 2025
2 parents 5782d91 + fe57b93 commit 19fa0c7
Show file tree
Hide file tree
Showing 863 changed files with 10,752 additions and 36,783 deletions.
5 changes: 2 additions & 3 deletions .telescope.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@
"rpcClients": {
"enabled": false
},
"helperFuncCreators": {
"enabled": true,
"genCustomHooks": false
"helperFunctions": {
"enabled": true
},
"interfaces": {
"enabled": true,
Expand Down
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.11
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.16
* 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
2 changes: 1 addition & 1 deletion libs/cosmos-types/src/extern.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.11
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.16
* 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
6 changes: 3 additions & 3 deletions libs/cosmos-types/src/helper-func-types.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.11
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.16
* 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 Expand Up @@ -38,7 +38,7 @@ export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {

export interface ITxArgs<TMsg> {
signerAddress: string;
message: TMsg;
message: TMsg | TMsg[];
fee: StdFee | 'auto';
memo: string;
}
Expand Down Expand Up @@ -78,7 +78,7 @@ export interface TxBuilderOptions {
export function buildTx<TMsg>(opts: TxBuilderOptions) {
return async (
signerAddress: string,
message: TMsg,
message: TMsg | TMsg[],
fee: StdFee | 'auto',
memo: string
): Promise<DeliverTxResponse> => {
Expand Down
2 changes: 1 addition & 1 deletion libs/cosmos-types/src/helpers.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.11
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.16
* 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
3 changes: 2 additions & 1 deletion libs/cosmos-types/src/types.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.11
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.16
* 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 Expand Up @@ -48,6 +48,7 @@ export interface TelescopeGeneratedCodec<
toProto?: (message: T) => Uint8Array;
fromProtoMsg?: (message: ProtoMsg) => T;
toProtoMsg?: (message: T) => Any;
registerTypeUrl?: () => void;
}

export type TelescopeGeneratedType<
Expand Down
2 changes: 1 addition & 1 deletion libs/cosmos-types/src/utf8.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.11
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.16
* 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
2 changes: 1 addition & 1 deletion libs/cosmos-types/src/varint.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.11
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.16
* 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
4 changes: 2 additions & 2 deletions libs/injective-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ injective-react provides hooks for sending transactions. These hooks are built o
There's also an all in one example of how to use these hooks in the [all in one example](#all-in-one-example) section.

```js
import { useDelegate } from "injective-react/cosmos/staking/v1beta1/tx.rpc.func";
import { useGetValidators } from "injective-react/cosmos/staking/v1beta1/query.rpc.func";
import { useDelegate } from "injective-react/cosmos/staking/v1beta1/tx.rpc.react";
import { useGetValidators } from "injective-react/cosmos/staking/v1beta1/query.rpc.react";

const {
data,
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/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/[email protected].8
* This file and any referenced files were automatically generated by @cosmology/[email protected].16
* 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
41 changes: 0 additions & 41 deletions libs/injective-react/src/cosmos/auth/v1beta1/query.rpc.func.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { RpcResolver, buildQuery } from "../../../helper-func-types";
import { buildUseQuery } from "../../../react-query";
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,
Expand All @@ -9,10 +8,6 @@ export const createGetAccounts = (clientResolver?: RpcResolver) => buildQuery<Qu
clientResolver,
deps: [QueryAccountsRequest, QueryAccountsResponse]
});
export const useGetAccounts = buildUseQuery<QueryAccountsRequest, QueryAccountsResponse>({
builderQueryFn: createGetAccounts,
queryKeyPrefix: "AccountsQuery"
});
export const createGetAccount = (clientResolver?: RpcResolver) => buildQuery<QueryAccountRequest, QueryAccountResponse>({
encode: QueryAccountRequest.encode,
decode: QueryAccountResponse.decode,
Expand All @@ -21,10 +16,6 @@ export const createGetAccount = (clientResolver?: RpcResolver) => buildQuery<Que
clientResolver,
deps: [QueryAccountRequest, QueryAccountResponse]
});
export const useGetAccount = buildUseQuery<QueryAccountRequest, QueryAccountResponse>({
builderQueryFn: createGetAccount,
queryKeyPrefix: "AccountQuery"
});
export const createGetAccountAddressByID = (clientResolver?: RpcResolver) => buildQuery<QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse>({
encode: QueryAccountAddressByIDRequest.encode,
decode: QueryAccountAddressByIDResponse.decode,
Expand All @@ -33,10 +24,6 @@ export const createGetAccountAddressByID = (clientResolver?: RpcResolver) => bui
clientResolver,
deps: [QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse]
});
export const useGetAccountAddressByID = buildUseQuery<QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse>({
builderQueryFn: createGetAccountAddressByID,
queryKeyPrefix: "AccountAddressByIDQuery"
});
export const createGetParams = (clientResolver?: RpcResolver) => buildQuery<QueryParamsRequest, QueryParamsResponse>({
encode: QueryParamsRequest.encode,
decode: QueryParamsResponse.decode,
Expand All @@ -45,10 +32,6 @@ export const createGetParams = (clientResolver?: RpcResolver) => buildQuery<Quer
clientResolver,
deps: [QueryParamsRequest, QueryParamsResponse]
});
export const useGetParams = buildUseQuery<QueryParamsRequest, QueryParamsResponse>({
builderQueryFn: createGetParams,
queryKeyPrefix: "ParamsQuery"
});
export const createGetModuleAccounts = (clientResolver?: RpcResolver) => buildQuery<QueryModuleAccountsRequest, QueryModuleAccountsResponse>({
encode: QueryModuleAccountsRequest.encode,
decode: QueryModuleAccountsResponse.decode,
Expand All @@ -57,10 +40,6 @@ export const createGetModuleAccounts = (clientResolver?: RpcResolver) => buildQu
clientResolver,
deps: [QueryModuleAccountsRequest, QueryModuleAccountsResponse]
});
export const useGetModuleAccounts = buildUseQuery<QueryModuleAccountsRequest, QueryModuleAccountsResponse>({
builderQueryFn: createGetModuleAccounts,
queryKeyPrefix: "ModuleAccountsQuery"
});
export const createGetModuleAccountByName = (clientResolver?: RpcResolver) => buildQuery<QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse>({
encode: QueryModuleAccountByNameRequest.encode,
decode: QueryModuleAccountByNameResponse.decode,
Expand All @@ -69,10 +48,6 @@ export const createGetModuleAccountByName = (clientResolver?: RpcResolver) => bu
clientResolver,
deps: [QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse]
});
export const useGetModuleAccountByName = buildUseQuery<QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse>({
builderQueryFn: createGetModuleAccountByName,
queryKeyPrefix: "ModuleAccountByNameQuery"
});
export const createGetBech32Prefix = (clientResolver?: RpcResolver) => buildQuery<Bech32PrefixRequest, Bech32PrefixResponse>({
encode: Bech32PrefixRequest.encode,
decode: Bech32PrefixResponse.decode,
Expand All @@ -81,10 +56,6 @@ export const createGetBech32Prefix = (clientResolver?: RpcResolver) => buildQuer
clientResolver,
deps: [Bech32PrefixRequest, Bech32PrefixResponse]
});
export const useGetBech32Prefix = buildUseQuery<Bech32PrefixRequest, Bech32PrefixResponse>({
builderQueryFn: createGetBech32Prefix,
queryKeyPrefix: "Bech32PrefixQuery"
});
export const createGetAddressBytesToString = (clientResolver?: RpcResolver) => buildQuery<AddressBytesToStringRequest, AddressBytesToStringResponse>({
encode: AddressBytesToStringRequest.encode,
decode: AddressBytesToStringResponse.decode,
Expand All @@ -93,10 +64,6 @@ export const createGetAddressBytesToString = (clientResolver?: RpcResolver) => b
clientResolver,
deps: [AddressBytesToStringRequest, AddressBytesToStringResponse]
});
export const useGetAddressBytesToString = buildUseQuery<AddressBytesToStringRequest, AddressBytesToStringResponse>({
builderQueryFn: createGetAddressBytesToString,
queryKeyPrefix: "AddressBytesToStringQuery"
});
export const createGetAddressStringToBytes = (clientResolver?: RpcResolver) => buildQuery<AddressStringToBytesRequest, AddressStringToBytesResponse>({
encode: AddressStringToBytesRequest.encode,
decode: AddressStringToBytesResponse.decode,
Expand All @@ -105,19 +72,11 @@ export const createGetAddressStringToBytes = (clientResolver?: RpcResolver) => b
clientResolver,
deps: [AddressStringToBytesRequest, AddressStringToBytesResponse]
});
export const useGetAddressStringToBytes = buildUseQuery<AddressStringToBytesRequest, AddressStringToBytesResponse>({
builderQueryFn: createGetAddressStringToBytes,
queryKeyPrefix: "AddressStringToBytesQuery"
});
export const createGetAccountInfo = (clientResolver?: RpcResolver) => buildQuery<QueryAccountInfoRequest, QueryAccountInfoResponse>({
encode: QueryAccountInfoRequest.encode,
decode: QueryAccountInfoResponse.decode,
service: "cosmos.auth.v1beta1.Query",
method: "AccountInfo",
clientResolver,
deps: [QueryAccountInfoRequest, QueryAccountInfoResponse]
});
export const useGetAccountInfo = buildUseQuery<QueryAccountInfoRequest, QueryAccountInfoResponse>({
builderQueryFn: createGetAccountInfo,
queryKeyPrefix: "AccountInfoQuery"
});
43 changes: 43 additions & 0 deletions libs/injective-react/src/cosmos/auth/v1beta1/query.rpc.react.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { buildUseQuery } from "../../../react-query";
import { QueryAccountsRequest, QueryAccountsResponse, QueryAccountRequest, QueryAccountResponse, QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse, QueryParamsRequest, QueryParamsResponse, QueryModuleAccountsRequest, QueryModuleAccountsResponse, QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse, Bech32PrefixRequest, Bech32PrefixResponse, AddressBytesToStringRequest, AddressBytesToStringResponse, AddressStringToBytesRequest, AddressStringToBytesResponse, QueryAccountInfoRequest, QueryAccountInfoResponse } from "./query";
import { createGetAccounts, createGetAccount, createGetAccountAddressByID, createGetParams, createGetModuleAccounts, createGetModuleAccountByName, createGetBech32Prefix, createGetAddressBytesToString, createGetAddressStringToBytes, createGetAccountInfo } from "./query.rpc.func";
export const useGetAccounts = buildUseQuery<QueryAccountsRequest, QueryAccountsResponse>({
builderQueryFn: createGetAccounts,
queryKeyPrefix: "AccountsQuery"
});
export const useGetAccount = buildUseQuery<QueryAccountRequest, QueryAccountResponse>({
builderQueryFn: createGetAccount,
queryKeyPrefix: "AccountQuery"
});
export const useGetAccountAddressByID = buildUseQuery<QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse>({
builderQueryFn: createGetAccountAddressByID,
queryKeyPrefix: "AccountAddressByIDQuery"
});
export const useGetParams = buildUseQuery<QueryParamsRequest, QueryParamsResponse>({
builderQueryFn: createGetParams,
queryKeyPrefix: "ParamsQuery"
});
export const useGetModuleAccounts = buildUseQuery<QueryModuleAccountsRequest, QueryModuleAccountsResponse>({
builderQueryFn: createGetModuleAccounts,
queryKeyPrefix: "ModuleAccountsQuery"
});
export const useGetModuleAccountByName = buildUseQuery<QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse>({
builderQueryFn: createGetModuleAccountByName,
queryKeyPrefix: "ModuleAccountByNameQuery"
});
export const useGetBech32Prefix = buildUseQuery<Bech32PrefixRequest, Bech32PrefixResponse>({
builderQueryFn: createGetBech32Prefix,
queryKeyPrefix: "Bech32PrefixQuery"
});
export const useGetAddressBytesToString = buildUseQuery<AddressBytesToStringRequest, AddressBytesToStringResponse>({
builderQueryFn: createGetAddressBytesToString,
queryKeyPrefix: "AddressBytesToStringQuery"
});
export const useGetAddressStringToBytes = buildUseQuery<AddressStringToBytesRequest, AddressStringToBytesResponse>({
builderQueryFn: createGetAddressStringToBytes,
queryKeyPrefix: "AddressStringToBytesQuery"
});
export const useGetAccountInfo = buildUseQuery<QueryAccountInfoRequest, QueryAccountInfoResponse>({
builderQueryFn: createGetAccountInfo,
queryKeyPrefix: "AccountInfoQuery"
});
10 changes: 0 additions & 10 deletions libs/injective-react/src/cosmos/authz/v1beta1/tx.rpc.func.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { buildTx, SigningClientResolver } from "../../../helper-func-types";
import { toEncoders, toConverters } from "@interchainjs/cosmos/utils";
import { buildUseMutation } from "../../../react-query";
import { MsgGrant, MsgExec, MsgRevoke } from "./tx";
export const createGrant = (clientResolver?: SigningClientResolver) => buildTx<MsgGrant>({
clientResolver,
Expand All @@ -9,26 +8,17 @@ export const createGrant = (clientResolver?: SigningClientResolver) => buildTx<M
converters: toConverters(MsgGrant),
deps: [MsgGrant]
});
export const useGrant = buildUseMutation<MsgGrant, Error>({
builderMutationFn: createGrant
});
export const createExec = (clientResolver?: SigningClientResolver) => buildTx<MsgExec>({
clientResolver,
typeUrl: MsgExec.typeUrl,
encoders: toEncoders(MsgExec),
converters: toConverters(MsgExec),
deps: [MsgExec]
});
export const useExec = buildUseMutation<MsgExec, Error>({
builderMutationFn: createExec
});
export const createRevoke = (clientResolver?: SigningClientResolver) => buildTx<MsgRevoke>({
clientResolver,
typeUrl: MsgRevoke.typeUrl,
encoders: toEncoders(MsgRevoke),
converters: toConverters(MsgRevoke),
deps: [MsgRevoke]
});
export const useRevoke = buildUseMutation<MsgRevoke, Error>({
builderMutationFn: createRevoke
});
12 changes: 12 additions & 0 deletions libs/injective-react/src/cosmos/authz/v1beta1/tx.rpc.react.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { buildUseMutation } from "../../../react-query";
import { MsgGrant, MsgExec, MsgRevoke } from "./tx";
import { createGrant, createExec, createRevoke } from "./tx.rpc.func";
export const useGrant = buildUseMutation<MsgGrant, Error>({
builderMutationFn: createGrant
});
export const useExec = buildUseMutation<MsgExec, Error>({
builderMutationFn: createExec
});
export const useRevoke = buildUseMutation<MsgRevoke, Error>({
builderMutationFn: createRevoke
});
Loading

0 comments on commit 19fa0c7

Please sign in to comment.